Entering content frameProcedure documentation Getting Information about Interface Parameters Locate the document in its SAP Library structure

A function module's interface determines how you can use the module from within your own program. It is important that you understand a module's programming interface before you use the module. There are five different interface parameters:

Name

Explanation

Import

Values transferred from the calling program to the function module. You cannot overwrite the contents of import parameters at runtime.

Export

Values transferred from the function module back to the calling program.

Changing

Values that act as import and export parameters simultaneously. The original value of a changing parameter is transferred from the calling program to the function module. The function module can alter the initial value and send it back to the calling program.

Tables

Internal tables that can be imported and exported. The internal table's contents are transferred from the calling program to the function module. The function module can alter the contents of the internal table and then send it back to the calling program. Tables are always passed by reference.

Exceptions

Error situations that can occur within the function module.
The calling program uses exceptions to find out if an error has occurred in the function module. It can then react accordingly.

 

To find out what parameters are needed to call a function module, enter the module's name in the initial screen of the Function Builder and display the object component Interface:

The following display uses a tab, with separate pages for various parts of the interface information (administration, formal parameters, exceptions, and documentation). Our example contains a list of all import parameters and their further attributes:

This graphic is explained in the accompanying text

Particularly important here is the information about which parameters must be passed when the function module is called. If a parameter does not have to be passed, select the Optional checkbox.
If the parameter does have to be passed, the checkbox is deselected.

Choose Changing or Tables to see the changing and tables parameters and whether they are optional or required.
There is no Optional checkbox for export parameters, since they are always optional.
You can also specify the data type of a formal parameter by linking it to a data type in a type pool. Type pools are ABAP Dictionary objects that allow you to define your own global types. If you want to use the types in a type pool for formal parameters, you must declare the type pool in the TOP include of the function group. You can then enter the types in the Reference type field for formal parameters.
In the Reference field/structure field, you can enter ABAP Dictionary reference structures, against which the system checks the actual parameters at runtime.
Use the Default field to assign a default value to a parameter. In the Reference field, you can indicate whether you want to pass the parameter by reference or by value.

For more information about setting the attributes of parameters, see Specifying Parameters and Exceptions

 

The Documentation tab page contains short descriptions of the parameters and exceptions. To display further information about a particular parameter or exception, double-click its name.

For a full description of the task of the function module, double-click the Short text field, or choose Function module doc.

 

Displaying Function Module Attributes

The Administration feature of the Function Builder shows you a function module's attributes. Administration information includes the function module's:

If you want to print out all a module's interface information, choose Function module ® Print. This option lets you specify the aspects of the function module (documentation, code, and so on) you want.

 

 

Leaving content frame