Specifying Key Fields of Business Object Types


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 in question is using specific object type instances. BAPIs are divided into these categories:

  • Instance-dependent BAPIs

Instance-dependent 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 object instances. The usually return a list of object instances in tables to the calling program. Instance-independent BAPIs are also called class methods. An example of this BAPI is CompanyCode.GetList(), which returns a list of company codes.

Some instance-dependent 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.


To display the key fields, select the business object type in the BAPI Browser and expand the node Key fields, as described in Determining BAPIs of Business Object Types.

Select the relevant icon in the BAPI Browser to display further information about the individual key fields. Choose Utilities ® Color Key to display a description of individual icons in the BAPI Browser.