Determining the Object Type and Its Key Fields 
Purpose
Object type
You have to identify the SAP business object type required for your BAPI in the Business Object Repository or if necessary, create one. For information about creating SAP business object types see the documentation,
SAP Object Builder.

For SAP internal development, you have to complete a business object request form in the BAPI Explorer.
Key Fields
A key is defined in the BOR for the majority of SAP business object types. This key may consist of several key fields which are used to identify an individual single instance of the SAP business object type.
You can differentiate between instance-dependent (instance methods) and instance-independent (class methods) BAPIs. Unlike instance-independent methods, instance-dependent methods relate to one instance (one specific occurrence) of an SAP business object type, for example to one specific sales order.
In the case of instance-dependent BAPIs, the key fields of the corresponding SAP business object type must be used as parameters in the function module the BAPI is based on so that the associated object instance can be identified.
The names of the key fields in the SAP business object type and the corresponding parameters in the BAPI function module must be the same, because the name links the key fields to the parameters.

The SAP business object type, CompanyCode, has a key field named CompanyCodeId.
This key field must be defined as a parameter with the name COMPANYCODEID in the function modules of the instance-dependent BAPIs for this business object type.
Process Flow
To display a business object type and its key fields:
Choose Generate Function Module to Map Fields.
Alternatively, you can use the Business Object Repository: