I’ve just been dumped into the middle of a SAP project and I need to use SAPs BAPIs to pull a bunch of information out of the client SAP system.
Given that SAP is a closed platform I’ve been having trouble finding a high-level overview of what is BAPI. I realize you could spend a lifetime working with these ERP system and still not understand the whole thing, so I just want a basic overview so I can talk intelligently with “The Client’s” SAP folks.
Specifically my questions are:
Is BAPI just a wrapper for SOAP and/or XML-RPC, or is it a completely proprietary communication format?
How can these APIs be consumed from external PHP?
I’ve seen the acronym ABAP in relation to these BAPIs, is it somewhat related?
Advertisement
Answer
BAPI stands for Business Application Programming Interface.
SAP’s goal when introducing BAPI’s was to provide …
- well-defined
- stable
- implementation-independent
- well-documented
business API’s that provide standardized access to SAP solutions on a semantic level.
Still, BAPI’s are proprietary SAP interfaces.
The BAPI interfaces provide a unified access to the application level functionality, independent of the type of call: Both synchronous and asynchronous processing can be triggered by using these interfaces.
Synchronous processing of a BAPI will result in the execution of a RFC (Remote Function Call, SAP’s proprietary RPC protocol).
Asynchronous processing makes transparently use of ALE (Application Link Enabling, SAP’s proprietary EDI format).
Products like the webMethods SAP Adapter (aka SAP Business Connector) provide bidirectional service level access to BAPI’s as well as the lower level RFC and ALE protocols from/to a remote destination.
Using these tools there is no need to bother about ABAP, the 4GL programming language all the SAP business logic is implemented in.
There are also several XML mappings defined for BAPI’s (as well as RFC’s and IDocs) that allow to transmit business documents within an XML envelope. These are most noticeable
- bXML (Content-Type: application/x-sap.busdoc)
- RFC-XML (Content-Type: application/x-sap.rfc)
- IDoc-XML (Content-Type: application/x-sap.idoc)
as well as SOAP.