Show TOC

 XStep: Function Module Parameters Locate this document in the navigation structure

Use

ABAP function modules, which you use in XStep process instructions, contain import , export, changing or table parameters, according to how they have been defined. You must assign either a fixed value or an XStep parameter to these.

Caution Caution

The Type of Function Module Parameter indicates the data flow of the parameter from the point of view of the PI sheet view and not of the function module. A parameter of the type Export means that the value of the parameter is transferred from the PI sheet to the function module. From the function module's point of view, they are import parameters.

End of the caution.

Prerequisites

If you want to assign values to a function module parameter using an XStep parameter the XStep parameter must first be defined in the higher-level XStep.

See also: XStep Parameters

Features

  • Export parameters

    You use export parameters in dynamic function calls and input validations that are carried out using a check function. You must assign either a fixed value or an XStep parameter to the export parameters (see below).

  • Import parameters

    You use import parameters in dynamic function calls. You assign values to the import parameter using an XStep parameter. The value of the import parameter is written to the XStep parameter and imported from the function module to the PI sheet. You can output the value of the XStep parameter in the PI sheet. You can also use the XStep parameter to forward the value to subsequent XSteps in the same XStep tree.

  • Changing parameters

    You define changing parameters in dynamic function calls. You assign values to the changing parameters using an XStep parameter. The value of the changing parameter is written to the XStep parameter and imported from the PI sheet to the function module. Once the function has been executed the value of the changing parameter is again written to the XStep parameter and re-imported to the PI sheet.

    You can output the value of the imported changing parameter in the PI sheet. You can also use the XStep parameter to forward the value to subsequent XSteps in the same XStep tree. When doing so you should note the following:

    • The function can be execute more than once in the PI sheet

    • The value of the changing parameter may be changed by the function

  • Table parameters

    You use table parameters in dynamic function calls. You can use table parameters to export values of a table column from a PI sheet to a function module. The function module can change the contents of the table and return the result to the PI sheet. You assign values to the table parameter using an XStep parameter. The value of the table parameter is written to the XStep parameter and exported from the PI sheet to the function module. Once the function has been executed the value of the table parameter is again written to the XStep parameter and resent to the PI sheet.

    Note Note

    You should note that the system only accepts XStep parameters that come from a table (repeated data request). Equally, you can only output an XStep parameter again within one table. The XStep parameter refers to the entire table column.

    If the function call is executed outside the table, all values of the table column are transferred to the function module.

    End of the note.

If you want to the display the value of an XStep parameter in the PI sheet you must have defined an output for it. For more information, see XStep: Outputs .

Assigning Values to Function Module Parameters

You assign a fixed value or an XStep parameter to a function module parameter.

  • Value assignment with fixed value

    If you want to export a parameter value from the PI sheet to the function module you can enter it as a fixed value, provided that it already exists in the process order. The data type of the fixed value must match the data type of the function module parameter.

  • Value assignment with XStep parameter

    If the value is only available in the PI sheet you copy it using an XStep parameter. This must first be defined in the same XStep. The data type of the XStep parameter must match the data type of the function module parameter.

Function Module Parameters of TypeTable

Import, export and changing parameters can be typed with reference to a table type. In contrast, a function module can also possess concrete table parameters (see Table Parameters).

If the function module parameter is typed with reference to a table type , you can export an entire table from the PI sheet to the function module and back again. If you want to output the table in the PI sheet you must define the XStep process instruction as a table (repeated data request). If you have defined a simple data request, the system only outputs the value of the first table line. The system can only process single-column tables.