ABAPintermediate

BAPI Development & Usage

Business Application Programming Interfaces as SAP's stable, released API layer for external and cross-module access.

BAPIs are the classical answer to "how do I create a sales order / post a goods movement / change a vendor from outside SAP (or from another module) without touching the database directly," and interviewers use them to check whether a candidate respects SAP's business logic layer rather than writing raw INSERT statements into transparent tables, which is one of the fastest ways to corrupt SAP data integrity.

A BAPI is like using a bank's official teller window instead of reaching behind the counter into the vault yourself - you get validation, receipts (RETURN messages), and consistency, instead of silently corrupting the books.

Key Concepts

1
A BAPI is a released, stable remote-enabled function module registered in the Business Object Repository (transaction BAPI or SWO1), following SAP naming and interface conventions - importing/exporting parameters, a RETURN or RETURN table structure carrying messages with type/id/number, and (critically) requiring an explicit BAPI_TRANSACTION_COMMIT to persist changes, since BAPIs generally do not commit automatically. This differs from a normal custom function module, and forgetting the explicit commit is one of the most common bugs junior developers introduce.
BAPISWO1BAPI_TRANSACTION_COMMIT
2
Common interview examples include BAPI_SALESORDER_CREATEFROMDAT2, BAPI_PO_CREATE1, BAPI_MATERIAL_SAVEDATA, and BAPI_GOODSMVT_CREATE. Candidates should be able to describe testing a BAPI via SE37/BAPI transaction test tools, checking the RETURN table for error type messages before committing, and calling a BAPI remotely via RFC destination from an external system or another SAP system.
BAPI_SALESORDER_CREATEFROMDAT2BAPI_PO_CREATE1BAPI_MATERIAL_SAVEDATABAPI_GOODSMVT_CREATESE37
3
A senior-level point is knowing when NOT to use a BAPI - if no BAPI exists for a requirement, the correct escalation path is checking for a released API (OData/CDS-based in S/4HANA) rather than reverse-engineering the standard transaction's underlying function modules, which are not supported or stable across releases.