Invoke RFC BAPI in SAP
Use the Invoke RFC BAPI in SAP activity to invoke RFC/BAPIs in the SAP system.
Request/reply and tRFC (asynchronous) requests are supported.
General Tab
On the General tab, establish connections to the SAP system, and download the schema of the RFC/BAPI to be invoked in the SAP system.
The following table lists the configurations on the General tab of the Invoke RFC BAPI in SAP activity:
Field | Visual diff | Module Property? | Description |
---|---|---|---|
Name | Yes | No | Specify the name to be displayed as the label for the activity in the process. |
SAP Connection | Yes | Yes | Click
![]() If no matching SAP Connection shared resources are found, click Create Shared Resource to create one. For more information, see Creating and Configuring an SAP Connection. Note: When a process contains multiple Invoke RFC BAPI activities, if you want the activities to use different SAP Connection shared resources, you have to create process properties for the shared resources to be used, and then choose the corresponding process property for the activity. If you choose different SAP Connection shared resources for the Invoke RFC BAPI activities in a process clicking ![]() |
RFC/BAPI | Yes | No | Click
Fetch Function Module to download the schema of the RFC/BAPI to be invoked in the SAP system.
In the Fetch Function Module dialog, you can use the RFC/BAPI tab or BOR tab to download the schema of the RFC/BAPI to be invoked in the SAP system. The RFC/BAPI tab is useful when the name of the function module, function group, or both are known. The BOR tab is useful for browsing SAP business objects based on application objects. In the RFC/BAPI tab, complete the following tasks:
In the BOR tab, complete the following tasks:
After the RFC/BAPI schema is downloaded, an XSD file is created. The XSD file is intentionally invisible in the project, but it can be picked from the activity if required. Note:
|
Description Tab
On the Description tab, enter a short description for the Invoke RFC BAPI in SAP activity.
Advanced Tab
On the Advanced tab, select the Transactional checkbox to support one or more RFC/BAPI calls to be executed as a transaction or logical unit of work in the SAP system.
The following configurations are displayed on the Advanced tab of the Invoke RFC BAPI in SAP activity when you select the Transactional checkbox:
Field | Visual diff | Module Property? | Description |
---|---|---|---|
Invocation Protocol | Yes | No | Specify the invocation protocol for the activity. They are:
The default value is Request/Reply. Note: For one way invocation protocol, the confirmation report following the invocation is not available.
|
SAP Queue Name | Yes | Name of the queue. This field is only enabled when invocation protocol is set to qRFC. |
|
Context End | Yes | No | If you want to end the RFC/BAPI transaction at this activity, select this checkbox.
This checkbox is cleared by default. This checkbox is the same as the Terminate Connection checkbox in the Advanced tab of the Dynamic Connection activity. When a dynamic connection with the selected Transactional checkbox is used, if you want to end the transaction, you must select the Terminate Connection checkbox instead of selecting the Context End checkbox. |
Auto Commit | Yes | No | If you want the transaction or logical unit of work to be committed automatically when the transaction or logical unit of work consists of only one RFC/BAPI call and the RFC/BAPI call does not return any errors, select this checkbox.
This checkbox is cleared by default. |
Commit Expiry(ms) | yes | No | Specify the timeout value in milliseconds for the activity to wait for the subsequent activity to be invoked.
The default value is 30000. This field is the same as the contextTimeout input item in the Input tab of the Dynamic Connection activity, and can overwrite the contextTimeout input item. |
Input Tab
On the Input tab, enter the request of the RFC/BAPI to be invoked, the session ID of the previous activity, and the timeout value for the activity to wait for invoking the RFC/BAPI.
The following table lists the input elements on the Input tab of the Invoke RFC BAPI in SAP activity:
Input Item | Data Type | Description |
---|---|---|
sessionID | String | Enter the session ID of the previous activity when the
Transactional checkbox in the
Advanced tab is selected.
Note: If the Invoke RFC BAPI in SAP activity invokes the first RFC/BAPI in the context of the transaction, leave this element blank |
timeout | Long | Enter the timeout value in milliseconds for the activity to wait for invoking the RFC/BAPI.
The default value is 600000. Note: The module property of the long type cannot be left blank, and its value range does not include the negative numbers.
|
RfcRequest | Complex | Enter the request of the RFC/BAPI to be invoked. |
Output Tab
The Output tab shows the session ID of the activity and the response of the invoked RFC/BAPI. It also shows the CPIC_ID associated to the SAP connection. If the invocation protocol of tRFC is selected, the output shows SessionID, CPIC_ID and TID.
Fault Tab
On the Fault tab, you can find the error codes and error messages of the Invoke RFC BAPI in SAP activity and the SAP system. The SAP system exceptions are returned by the RFC/BAPI invoked in the SAP system.
For more information on errors for the Invoke RFC BAPI in SAP activity, see Error Codes
- If you want to catch the SAP system exception in a process, it is good practice to use the Catch fault handler, instead of the Catch ALL fault handler.
- If the exception that is sent back to the SAP system has more than 50 characters, then the SAP system can only retrieve the first 50 characters.
- If you catch a SAPSystemException, then the schema is inline with the Invoke RFC BAPI in SAP activity, which will cause issues if the corresponding RFC or BAPI changes in terms of exceptions.
The following table lists error schema elements in the Fault tab of the Invoke RFC BAPI in SAP activity:
Error Schema Element | Data Type | Description |
---|---|---|
msg | String | Displays the error message. |
msgCode | String | Displays the error code. |