Auto-create variable names for Function Module/Method Call

When you are making a Function Module call or a Method call from your program, it is required to declare the variables matching with the interface of the function module. The variables have to be of the same type of import/export parameters to avoid a mismatch short dump.

Traditionally,  one has to navigate to SE37, copy the declaration type and use it in the program. This approach is fine for function modules with simple parameters, but it would get too boring for a Function Module that is loaded with a large number of parameters, especially standard BAPIs.

SAP has introduced a very nice feature in the latest Netweaver versions, that automatically declares the variables with the respective types.  This has been there for a while but I have seen very few developers that are aware of this feature.

For example, see below auto-code generation for a call to  BAPI_GOODSMVT_CREATE“.

font-family: "Courier New";
font-size: 10pt;
color: #000000;
background: #FFFFFF;
.L0S31 {
font-style: italic;
color: #808080;
.L0S33 {
color: #4DA619;
.L0S52 {
color: #0000FF;
.L0S55 {
color: #800080;
goodsmvt_header               = goodsmvt_header
goodsmvt_code                 = goodsmvt_code
*   TESTRUN                       = ' '
goodsmvt_item                 = goodsmvt_item
return                        = return
*   EXTENSIONIN                   = EXTENSIONIN

How to turn on this feature?

This option can be turned on in the user-specific settings of ABAP editor. Below are the step-by-step instructions,

  1. Go to transaction code SE38
  2. Choose Menu->Utilities->Settings
  3. Choose Tab, ABAP Editor
  4. Navigate to the tab Pattern
  5. Here you will find multiple options for code-generation, enable “Name of Actual Parameters same as Formal Parameter”

After this feature is turned-on, anytime you add a Function Module by a pattern, the variables names are automatically declared with the respective types.

About the author

Ramprasad Burugu

Technology professional with over 15 years of experience in leading business transformation initiatives. With a passion for technology and business, specialize in applying innovations in consumer technology to address the business needs.


  • Thanks for valuable tip Ram,

    It should be used by all the ABAPer for better understanding of variables.

By Ramprasad Burugu
Welcome to Miracle's Blog

Our blog is a great stop for people who are looking for enterprise solutions with technologies and services that we provide. Over the years Miracle has prided itself for our continuous efforts to help our customers adopt the latest technology. This blog is a diary of our stories, knowledge and thoughts on the future of digital organizations.

For contacting Miracle’s Blog Team for becoming an author, requesting content (or) anything else please feel free to reach out to us at

Who we are?

Miracle Software Systems, a Global Systems Integrator and Minority Owned Business, has been at the cutting edge of technology for over 24 years. Our teams have helped organizations use technology to improve business efficiency, drive new business models and optimize overall IT.

Recent Posts