Run BAPI / function
Run a BAPI or remote-enabled function module with import values (structures as dictionaries) and table rows; returns exports, tables, changing values and the RETURN messages. Fails on error messages (type E or A) unless told otherwise.
Command in the SAP BAPI toolkit · id ooa.sap_bapi/call_function · 10 inputs (1 required), 8 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Function | String | Yes | Function module or BAPI name. | |
| Imports | Dictionary | No | Import parameters: {"MATERIAL": "100-100", "HEADDATA": {"MATERIAL": "X"}}. | |
| Tables | Dictionary | No | Table parameters: name to a Table or a list of dictionaries (one per row). | |
| Changing | Dictionary | No | Changing parameters. | |
| Commit | Boolean | No | false | Run BAPI_TRANSACTION_COMMIT (wait) right after a successful call. |
| Fail on error | Boolean | No | true | Stop with SAP_BAPI.FAILED when RETURN has an error (type E or A); the call is rolled back. |
| Session | String | No | sap | Session name; one SAP logon per session. |
| Return table | String | No | A table parameter to return on its own as Table. | |
| Return structure | String | No | An export or changing structure to return on its own as a dictionary. | |
| Return field | String | No | One value to return on its own: an export field, or STRUCTURE-FIELD. |
Outputs
| Output | Type | What it is |
|---|---|---|
| table | Table | With return_table: that table parameter after the call, on its own. |
| structure | Dictionary | With return_structure: that export or changing structure, on its own. |
| value | Any | With return_field: that one value (an export field, or STRUCTURE-FIELD). |
| exports | Dictionary | Export parameters (structures as dictionaries, tables as Tables). |
| tables | Dictionary | Every table parameter after the call, as Tables. |
| changing | Dictionary | Changing parameters after the call. |
| messages | List | BAPI RETURN messages (type, id, number, message). |
| success | Boolean | True when no RETURN message has type E or A. |