To use a BAPI, you have to determine the information you have to forward to call the BAPI or function in your application program.
You can find this information in the BAPI Explorer.
Details of BAPIs of Business Object Types
The following information is required to use BAPIs of SAP business object types:
The import, export and import/export parameters of the BAPI
Standardized parameters supply the same or equivalent data and can therefore be used in different BAPIs. These parameters have the same name in all BAPIs and are implemented using the same guidelines. For more information about these parameters, see Standardized Parameters .
They key fields of the SAP business object type
The key fields of SAP business object types specify the identification structure with which client programs can uniquely access a specific instance of the object type. The key fields are required if the BAPI is using specific instances of an object type. BAPIs are divided into these categories: Instance-dependent BAPIs
Instance-dependent BAPIs
Instance-independent BAPIs use specific instances of an object type, which the client application must specify in the key fields of the business object. An example of an instance-dependent BAPI is CompanyCode.GetDetail() and when used the client application must specify the company code ID, for example, GetSAPObject("CompanyCode","0001") .
Instance-independent BAPIs
Instance-independent BAPIs do not use specific instances of an object type. They usually return a list of object type instances in tables to the calling program. Instance-independent BAPIs are also called class methods. The BAPI CompanyCode.GetList() , which returns a list of company codes, is an example of an instance-independent BAPI.
Some instance-independent BAPIs generate object instances and report back information on the generated object instance to the calling application. An example of this type of BAPI is SalesOrder.CreateFromData() , which creates a customer order and reports back information to the calling program.
The documentation on the business object type, the key fields, the BAPI and its parameters.
The name of the function module, if the RFC calls are sent to the function module underlying the BAPI.
Once you have retrieved all the required information, you can use the BAPI in your application program.
Details of BAPIs of Interface Types
The following information is required to use BAPIs of SAP business object types:
The import, export and import/export parameters of the BAPI
The name of the function module that is to implement the interface
The documentation on the BAPI and its parameters.
Once you have retrieved all the necessary information, you can implement the interface and use the BAPI in your application program.
Log on to an SAP System and choose
, or call transaction BAPI (enter BAPI in the SAP GUI command field).