Execute BAPIs/Function Modules
This section contains a list of available resources for the BAPI/Function Module classes.
Call BAPIs/Function Modules
Follow the steps below to call BAPIs/Function Modules:
- Connect to the SAP system using
R3Connection. - Create an RFCFunction object using
CreateFunction. - Provide values to export parameters, table parameters or import parameters for the RFCFunction objects.
- Export parameters:
Exports["parameter_name"].ParamValueor
Exports["structure_name"].ToStructure()["parameter:name"]. - Table parameters:
Tables["table_name"]["parameter_name"].ParamValue - Import parameters:
Imports["parameter_name"].ParamValueor
Imports["structure_name"].ToStructure()["parameter:name"].
- Export parameters:
- Execute the BAPIs/function modules using
Execute.
The following sample code calls the BAPI BAPI_REQUISITION_GETDETAIL to get the processing status of a purchase requisition:
Output:

Samples
For a list of sample applications and sample codes refer to Samples: BAPIs and Function Modules.
Last update: January 30, 2024