SAP Connector Guide > Part V: Data Integration Using BAPI/RFC Functions > BAPI/RFC Mapplets > BAPI/RFC Mapplet Parameters
  

BAPI/RFC Mapplet Parameters

BAPI/RFC functions use function parameter values to perform tasks. A BAPI/RFC mapplet includes input and output groups based on the BAPI/RFC transformation.

Function Parameters

BAPI/RFC functions can have the following parameters:
Function Parameter
Description
Scalar input parameters.
Scalar input values. Some BAPI functions require scalar input values to perform tasks such as changing data.
Scalar output parameters.
Scalar output values that a BAPI function returns after performing a task.
Table parameters.
SAP structures with more than one row. Table parameters can be input, output, or both. Input table parameters pass table input values to a BAPI/RFC function. For example, some BAPI/RFC functions require table inputs to change data.

Input and Output Groups

The BAPI/RFC transformation can contain the following groups:
Group Name
Description
Scalar input
Input group for scalar parameters. Contains a field for each scalar input parameter. The group name is SCALAR_INPUT and the field names are SI_<FieldName>.
Table input
One group for each table parameter. The fields represent import structures. The group name is TABLE_INPUT_<structure name> and field names are TI_<StructureName>_<FieldName>.
Scalar output
Output group for scalar parameters. Contains a field for each scalar output parameter. The group name is SCALAR_OUTPUT and field names are SO_<FieldName>.
Table output
One group for each table parameter. The fields represent output structures. The group name is TABLE_OUTPUT_<structure name> and field names are TO_<StructureName>_<FieldName>.
Error output
Passes data from data conversion errors and invalid BAPI/RFC calls. Map the error output field to a target to see error messages about data conversion and BAPI/RFC calls.

BAPI/RFC Parameter Properties

When you generate a BAPI/RFC mapplet, you can view the parameter properties and return structures.
You can also change the direction of the BAPI/RFC table parameters. The direction of the table parameters determine which groups in the transformation are input groups and which are output groups.
If the BAPI return structure is custom, you can edit the return structure properties that you selected during import for reusable BAPI/RFC transformations. Otherwise, you can view the BAPI/RFC return structure parameters.
The following table describes the BAPI/RFC function parameter properties:
Parameter
Description
Name
Name of the export, import, and table parameters and columns.
Associated Type
Definition of the parameter in SAP.
Short Description
Short description of the export, import, and table parameters and columns.
Optional
Indicates if the Secure Agent should pass a value to the parameter when it calls the BAPI.
Direction
Indicates if the parameter requires input or provides output. Values are: Input, Output, Both, or None.
Datatype
Object data type.
Precision
Object precision.
Scale
Object scale.
Default
Default value of the parameter in SAP, if any. SAP uses the default value when the Secure Agent does not pass a value to SAP.
The following table describes the parameter properties in the Return Structure tab:
Return Structure Parameter
Description
Return Structure
Return parameter name to determine the status of function calls. Value is RETURN if the BAPI contains a default return structure. If the BAPI does not contain a default return structure, select any table output parameter or scalar output parameter of type STRUCTURE. Default is None.
Status Field
Required if you select a value for the return structure. Select a field from the structure for status. If you select None for the return structure, this parameter is blank.
Text Field
Required if you select a value for the return structure. Select a field from the structure for status messages. If you select None for the return structure, this parameter is blank.
Status Indicator For Warning
Enter an indicator message for warning. If you select None for the return structure, the value is W. Default is W.
Status Indicator for Error
Enter an indicator message for error. If you select None for the return structure, the value is E. Default is E.
Status Indicator for Abort
Enter an indicator message for abort. If you select None for the return structure, the value is A. Default is A.

BAPI/RFC Functions with Nested Structures

You can import metadata for a BAPI/RFC functions with nested structures.
A BAPI/RFC transformation includes multiple groups. When a BAPI function contains a nested structure, ports for the input and output groups in a BAPI/RFC transformation use the following naming convention:
<group_name>_<parameter_name>_<field name>
For example:
SCALAR_INPUT_PARAM1_FIELD1
If there are multiple input or output structures, the BAPI/RFC transformation includes each structure parameter name in the port names. For example, BAPI Z_TST2 has the parameter INPUT1, which is of the type ZTYPE1. ZTYPE1 has several components such as FIELD1 and FIELD2. FIELD2 is a component of the type structure. It contains field F1. The naming convention in the BAPI/RFC transformation for FIELD 1 is:
SCALAR_INPUT_INPUT1_FIELD1
The naming convention in the BAPI/RFC transformation for the field F1 is:
SCALAR_INPUT_INPUT1_FIELD2_F1

System Variables

SAP uses system variables to set default values for some BAPI import parameters. The variables provide information, such as current date and time for the operating system on which SAP runs. System variables start with “SY-”. For example, SY-DATLO represents the local date of the SAP system.
The Secure Agent provides values for some system variables to define default input values for BAPI/RFC parameters. The Secure Agent uses the values as default input values for some ports of BAPI/RFC transformations. The Secure Agent uses the default values when there is no input for a port or when the port is not connected to an upstream transformation or source.
You can use the following system variables:
System Variable Name
Description
SY-LANGU
Log in language from the SAP application connection properties.
SY-MODNO
RFC handle value.
SY-MANDT
Value taken from the SAP application connection properties.
SY-DATUM
Local date on the Security Agent machine processing the data.
SY-UZEIT
Local time on the Security Agent machine processing the data.
SY-UNAME
Logon user ID from the SAP application connection properties.
SY-HOST
SAP host name from the SAP application connection properties.

Integration ID in BAPI/RFC Mapplet

The Integration ID field is a key field in the BAPI mapplet. Each BAPI/RFC mapplet includes an Integration ID input field and output field.
When you run a mapping with a BAPI/RFC mapplet, the Secure Agent makes a BAPI/RFC call to SAP to process the data. When it reaches the end of file, the Secure Agent makes the BAPI/RFC call. Depending on the mapping configuration, the Secure Agent can also issue a commit.
The BAPI/RFC call is based on the input data of the Integration ID ports. The Secure Agent makes one call to SAP for each Integration ID. Pass a value to the Integration ID ports in the scalar input group and all mandatory table input groups of the BAPI/RFC mapplet.
Note: You must map the Integration ID input field even when a BAPI or RFC does not require other input fields.
If the BAPI/RFC call fails or if there is a data conversion error, SAP passes the data for the integration ID in comma-separated format to an error output group. If the mapping contains a target instance that is connected to the error output group, the Secure Agent writes the data to the target.