Programming GetDetail() BAPIs 
Use
The BAPI GetDetail() is used to read details of specific object instances.
The BAPI GetDetail() is an instance method.
Features
Import Parameters
You should keep the following points in mind when defining the import parameters:
- Since the GetDetail() BAPI is an instance method, the key fields of the corresponding business object type must be created as import parameters in the function module. The names of these parameters must be identical to the names of the object keys in the BOR and must have the same data elements.

For the associated method definition in the BOR, the key fields must not also be specified as method parameters. For this reason, the BOR/BAPI Wizard does not include the function module parameters for the key fields in the method definition, when it creates a BAPI.
- You can also create additional import parameters that determine the amount of detailed information displayed.
- If customers are to be enabled to enhance the import parameters of the BAPI without modifications being required, you must create the parameter ExtensionIn.
For information about extension parameters and recommendations on how the customer enhancement concept should be implemented in a GetDetail() BAPI, see
Customer Enhancements and Modification of BAPIs.
Export Parameters
You should keep the following points in mind when defining the export parameters:
- The export parameters of a BAPI contain details of the instance. According to the amount of information, this should be structured in several parameters with meaningful names.
- If customers are to be allowed to extend the export parameters of the BAPI without modifications being necessary, you must create the parameter ExtensionOut.
For information about extension parameters and recommendations on how the customer enhancement concept should be implemented in a GetDetail() BAPI, see
Customer Enhancements and Modification of BAPIs.
- To report messages from the method call back to the calling program, you should create the export parameter Return . It is of particular importance when errors occur that messages describing the errors in detail are returned. You should, therefore, use all of the fields of the structure BAPIRET2. You should, in particular, fill the fields Parameter, Row and Field.
For more information about this parameter, see
Return Parameters (Error Handling).
See also:
Example of a GetDetail() BAPI