The SAP BAPI connector allows you to integrate your flow with the SAP ERP through Business Application Programming Interfaces (BAPIs), which are standardized functions to access business processes and data in the SAP system.
In other words, a BAPI is like an "official gateway" that SAP provides so that external systems can query or manipulate data and processes without needing to directly access internal tables or write ABAP code.
Query data
Retrieve information about customers, vendors, materials, sales orders, inventory, etc.
Example: BAPI_CUSTOMER_GETDETAIL returns complete customer data.
Create records
Insert new business data into SAP.
Example: BAPI_SALESORDER_CREATEFROMDAT2 creates a sales order.
Update records
Modify existing data.
Example: BAPI_EMPLOYEE_CHANGE updates employee data.
Execute business operations
Trigger internal SAP processes (release documents, perform calculations, generate accounting entries).
Example: BAPI_GOODSMVT_CREATE records an inventory movement.
Test connection and availability
Validate if SAP is responding.
Example: STFC_CONNECTION (returns system information, client, user, etc.).
Communication with this connector uses a specific key-value structure to map BAPI parameters.
Command: always starts with CALL FUNCTION <BAPI_NAME>.
Parameters: are defined after the colon ":".
Groupings:
Syntax:
Check out examples of instructions for the SAP BAPI connector:
Instruction:
In the instruction below, the SAP BAPI connector calls the STFC_CONNECTION function in SAP. This function is a standard SAP BAPI, used to test connectivity between the client system (in this case, Sensedia Integrations) and the SAP server.
NOTEThe brackets [] indicate that no additional parameters were passed in the call.
Return (log):
STFC_CONNECTION test function.NOTERead about log details.
Instruction:
The instruction below reads the first 5 rows of table T001 in SAP, returning only the BUKRS and BUTXT fields, separated by semicolons.
Instruction parts:
QUERY_TABLE: T001: indicates the table to be queried (T001, which contains Company Codes information).DELIMITER: ;: defines that returned fields will be separated by semicolons.ROWCOUNT: 5: limits the return to the first 5 rows of the table.FIELDS: specifies the table fields that should be returned (if omitted, returns all columns, which may cause slowness or memory overflow).
BUKRS: company code (Company Code).BUTXT: company description (Company Name).Return (log):
Check two excerpts of the response payload recorded in the logs:
INPUT: shows the query parameters: queried table, maximum number of records, delimiter, and additional options.
DATA (excerpt): brings the values returned from the query.
In this example:
Below we list some common errors that may occur when using the SAP BAPI connector and recommended solutions.
Error calling BAPI function in SAP
Generic execution error.
S_TABU_DIS) to the requested table or execution permission in the BAPI.FIELDS exist in the table.Empty return (DATA: [])
No record matches the criteria defined in OPTIONS.
ROWCOUNT ignored
SAP returned more rows than requested.
NOTEThis occurs in certain versions of the function module when there is no primary index in the filter.
We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more