SAP BAPI
This section provides information on how to connect to SAP BAPI. Before creating a Function, ensure you have already created the corresponding System within a System Line.
Connect to SAP BAPI
In order to connect to SAP BAPI, create a new Function in the menu 'Virtual Datasets' and directly assign it to a Category.
Next, select the relevant Technical Handler 'BAPI'.
All other configuration (e. g. a descriptive Short Name and Description) has to be made as usual.
For the Technical Parameters, please specify the following options. The options in BOLD are REQUIRED:
- FUNCTION: BAPI function name
- RESULT_PATH: Result locator for BAPI result.
The valid options for the RESULT_PATH are defined by the exports of the BAPI function that is called. The BAPI function BAPI_USER_GET_DETAIL for instance returns these parameters and tables:
All exported parameter names are valid RESULT_PATHs. VDP functions always return tables, hence BAPI export parameters will be handled accordingly:
- Atomic values (e. g. IDENTITY): returned as a table with one column and one row
- Structure: returned as a table with one row and columns for all included fields (fields in structures that are structures or tables are shown as JSON strings)
- Table: returned as table identical to the BAPI parameter table (cells in tables that are structures or tables are shown as JSON strings)
To have VDP return only one field of a structure, you can specify the export parameter and the field name. The result path of the user's last name in this example is ADDRESS/LASTNAME.
Parameters
You can specify parameters that will be used as parameters for the BAPI function call. A parameter is a single values of one of these types:
- String
- Integer number
- Decimal number
- Date & Time
You need to specify the following settings:
- Short Name: VDP parameter name
- PARAMETER (optional): default value for the parameter
- TECHNICAL_NAME: name of the BAPI function parameter in your SAP system