Programming with BAPIs
Use
In this section it is assumed that the application you developed is to use the data stored as SAP business objects in an SAP System and that this data is to be accessed by calling BAPIs. Your application can be as simple or as complex as you like and can include calls for one or more BAPIs.
Integration
BAPIs are defined in the Business Object Repository (BOR) as methods of SAP business object types or SAP interface types, and are implemented as function modules. The separation of a BAPI definition from its actual implementation enables you to access a BAPI in two ways:
-
You can call the BAPI in the BOR through object-oriented method calls (see Object-Oriented Access to BAPIs).
-
You can make RFC calls to the function modules on which the BAPI is based (see Function-Oriented Access to BAPIs).
The two approaches are illustrated in the graphic below.
Ways of Accessing BAPIs
Features
Applications that access BAPIs can be broadly divided into two categories:
-
Dialog applications
With dialog applications the caller usually waits until the method call has been processed, for example, they wait for the results of a GetList() BAPI.
For more information, see Programming Dialog Applications.
-
Distributed Applications
BAPIs can also be used in Application Link Enabling (ALE) to exchange and replicate data between two distributed systems. For more information, see Programming Distributed Applications.
Activities
Irrespective of the technology used, you have to carry out the following steps to call BAPIs from your application program:
|
Task |
More information: |
|
Identify the SAP business object type or SAP interface type and the necessary BAPI, and determine the parameter information for the BAPI interface. |
|
|
Integrate the BAPI call or function call and the parameter declarations in your application program. |
Programming Dialog Applications or Programming Distributed Applications For examples of calling BAPIs from various development platforms, see Examples of BAPI Calls. |