Programming with BAPIs 

Use

Assume that the application you developed is to use the data held in business objects in the R/3 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 more than one BAPI call.

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. As the BAPI definition is separation from its actual implementation, you can access a BAPI in two ways:

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:

With dialog applications the caller usually waits until the method call has been processed, for example, waits for the results of a GetList() BAPI.

For more information see Programming Dialog Applications.

BAPIs can also be used in Application Link Enabling (ALE) to exchange and replicate data between two distributed systems. For more information see Distributed Applications Programming.

Activities

Regardless of the approach you use, you need to complete the following tasks in order to invoke BAPIs from your application program:

Task

For Further Information:

  1. Identify the SAP business object type or the SAP interface type and the required BAPI and determine the parameter information for the BAPI interface.

Determining BAPI Details

  1. Include 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.