Actions in the ABAP Dictionary 
The first step of the implementation phase is to define all the data structures (including domains and data elements) in the ABAP Dictionary. These data structures are required for the parameters of the BAPI to be implemented. You can access the ABAP Dictionary from the project form in the BAPI Explorer.
The conventions below are important:
Conventions for BAPI Data Structures
|
Each parameter must refer to a data structure in the ABAP Dictionary. In the case of structured parameters this is always to the whole BAPI data structure. If the parameter consists of only one field, it must refer to a field in a BAPI structure. |
|
You have to create separate data structures for BAPIs, which are independent of the data structures generally, used in the R/3 application.Reason : When the BAPI is released the underlying structures of the BAPI are frozen and restrictions apply if you want to later change the structures. See also
Enhancements to released BAPIs.
Existing internal structures can be mapped to existing BAPI structures with a field mapping function module that is automatically generated by a mapping tool (Transaction BDBS).
Converting Between Internal and External Data Formats. |
|
All data structure names must begin with <namespace>BAPI. |
|
BAPI structure names should be as meaningful as possible. |
|
You must not use APPENDs and INCLUDEs in BAPI data structures. Reason : APPENDs and INCLUDEs can cause
Incompatibilities, if BAPI data structures are changed. |
|
Always try to use existing central data elements and domains for fields. |

The
Example of the BAPI CompanyCode.GetDetail shows how data structures should be defined.
Conventions for Field Names
|
The fields in structures must have meaningful English names with a maximum of 30 characters.
Use report BAPIFELD to create a list of English field name proposals for an ABAP Dictionary structure. Refer to the report documentation to find out how to use the report. |
|
A meaningful English default field name with a maximum of 30 characters should be defined for each data element.
In the future the default name will always be proposed by the SAP internal report BAPIFELD. Procedure: You can take data objects that still need to be edited from the report BAPIFELD. In the ABAP Dictionary you can define the default field name of the data element by choosing Definition ® Default field name. |
Conventions for Input Help
|
You may have to define single values or a value table for the domain so that F4 help is available for use. |
|
All the useful
Possible entries (which can be used in the service BAPI Helpvalues.GetList) must be defined for the data structures/data elements. To do this a foreign key must be specified in the fields of a BAPI structure. If a value table has been defined in a field domain, a foreign key must also be defined.
|
Technical Conventions
|
The internal data format is used for all parameter fields. See also
Mapping Between Internal and External Data Formats. |
|
If an external key as well as an internal key has been defined in the database, the external key must always be used in the BAPI interface. |
|
For fields relevant to ISO (country, language, unit of measure, currency), additional fields are provided for ISO-Codes. |
|
All currency fields use the domain BAPICURR. In special cases the domain BAPICUREXT can also be used. |
|
You must always use a period for the decimal point. |
|
All currency amounts and units of measure must have the decimal point in the correct place. Reason : The BAPI always uses a standard amount format with commas. So when converting currency amounts use the function modules:BAPI_CURRENCY_CONV_TO_EXTERNAL and BAPI_CURRENCY_CONV_TO_INTERNAL. |
|
With quantity fields the reference field/reference table must be correctly set to the unit of measure field. |
|
All the data elements for date fields must have the format YYYYMMDD. |
Conventions for BAPI/ALE Integration
So that an IDoc for asynchronous communication can be generated from a BAPI, the following conditions must be satisfied:
|
BAPI structure names must not be longer than 27 characters, otherwise the automatically generated name for the associated segment will be too long and will have to be changed manually later. Reason : The segment is generated following the convention <BAPI structure name> + <three digit number>. |
|
Single fields in a data structure can only be a maximum of 250 bytes. |
Conventions for Customer Developments
|
If IBUs, partners and customers are creating data structures (domains or data elements), the
Namespaces provided by SAP must be complied with. |