Language & Region
SAP Wiki

SAP BAPI

SAP BAPI (Business Application Programming Interface) is the stable, standardized interface for integrating SAP systems with internal and external applications.

What is SAP BAPI?

BAPIs enable data exchange between different SAP systems as well as between SAP systems and third-party solutions. In principle, BAPIs can be accessed from any platform that supports the SAP RFC (Remote Function Call) protocol.

BAPIs introduced and released by SAP are long-term stable and backward compatible. Their use therefore ensures that interfaces and parameters will continue to function and remain maintainable in the future.

Understanding and Using SAP BAPIs

How Do BAPIs Work?

SAP BAPIs are functions based on business objects such as CostCenter or Material. They allow targeted access to data and processes within an SAP system without requiring deep knowledge of the internal logic.

BAPIs are RFC-enabled, meaning they can be used to connect not only to other SAP systems but also to non-SAP systems. RFCs (Remote Function Calls) allow access to function modules from other SAP or third-party systems.

So-called standardized BAPIs are available for most business objects, as they fulfill certain core functions. 

Examples of standardized BAPIs include:

  • GetList ( ): Display existing object instances (e.g., material numbers, cost objects, personnel numbers)
  • GetDetail ( ): Display detailed information about a specific object instance
  • Create ( ): Create an instance of a business object type (e.g., purchase order, goods movement, flight booking)
  • Change ( ): Modify an object instance (e.g., purchase order, employee master data)
  • Delete ( ): Delete an object instance
  • Cancel ( ): Cancel an object instance and create a reversal as a new instance (e.g., cancel a flight booking, reverse an invoice)

Using BAPIs

To call an SAP BAPI, the ABAP command CALL FUNCTION is used, followed by the name of the BAPI and its parameters.

Example: BAPI for displaying available cost centers: CALL FUNCTION 'BAPI_COSTCENTER_GETLIST'

Alternatively, there are other ways to access BAPIs depending on the platform from which the call is made. BAPIs are specifically designed to be called from external applications via RFCs. It is also possible to access BAPIs via web services (e.g., via SOAP). Using the SAP Java Connector as a middleware component, BAPIs can also be called directly from Java applications.

The BAPI transaction allows users to launch the BAPI Explorer. The Explorer displays all business object types or interface types for which BAPIs are available in a tree structure. Depending on their preference, users can switch between an alphabetical or hierarchical view. In the tree view, all methods associated with a particular business object type are listed. The Explorer also shows details and documentation for the selected object in the tree. From the detailed view in the BAPI Explorer, users can directly access the Function Builder (transaction SE37) for the corresponding function module by clicking the function module name in the “Details” tab. Within the Function Builder, users can view information such as:

  • Remote availability
  • Release status
  • Import and export parameters
  • Exceptions
  • Source code (coding view)

The documentation in the “Function Module Documentation” section should be properly maintained to avoid issues when using the function, such as misunderstandings about its specific functionality or requirements.  

How an SAP BAPI Interface Works

For an application to use a BAPI method, it needs not only the name of the BAPI but also specific information about its interface – that is, the import and export parameters visible in the Function Builder.

Parameter TypeMeaning
ImportInput data from the system or user
ExportReturn values to the application
TableTable structure for data exchange (should no longer be used in the SAP S/4HANA context)
_X StructureIndicates which fields are actually intended to be changed

SAP BAPI Transactions – Your Tools in the SAP System

Key transactions for viewing and testing BAPIs at a glance:

TransactionPurpose
BAPIEntry point to released BAPIs (BAPI Explorer)
SE80Opens the Object Navigator (by default starts the Repository Browser); used to check and activate function modules
SE37Transaction for the Function Builder
SWO1Analyze business objects

Example Use Cases for SAP BAPIs

[Translate to English:] Einkaufswagen-Icon vor blauem Hintergrund

Integration of a purchasing system or order portal: Creation and, if necessary, modification of purchase orders in SAP (BAPI_PO_CREATE1, BAPI_PO_CHANGE)

[Translate to English:] Klemmbrett-Icon vor blauem Hintergrund

Integration of a sales management system or e-commerce platform: Creation and documentation of invoices in the SAP system following delivery (BAPI_BILLINGDOC_CREATE)

[Translate to English:] Lagerhalle-Icon vor blauem Hintergrund

Integration of a warehouse management system: Posting of goods movements in the SAP system (BAPI_GOODSMVT_CREATE)

[Translate to English:] Nutzer-Icon vor blauem Hintergrund

Integration of an employee self-service (ESS) portal or HR management system: Updating employee master data in SAP (BAPI_EMPLOYEE_CHANGE)

FAQ – Frequently Asked Questions About SAP BAPI

What is SAP BAPI?

A standardized interface that enables access to SAP business objects and their functions, from both other SAP systems and third-party systems.

What are the key benefits of BAPIs?

BAPIs offer a consistent and reliable way to access SAP data and functionality from external systems, ensuring long-term stability and compatibility.

Start your digital future today!

Take advantage of our expertise.
Get TOP advice.

Get in contact now
Handshake icon