Actions in the ABAP Dictionary
Use
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. But 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 that are independent of the data structures generally used in the SAP 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 SAP Enhancements to Released BAPIs.
-
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.
Conventions for Field Names
-
The fields in structures must have meaningful English names with a maximum of 30 characters.
-
SAP internal: Use report BAPIFELD to create a list of English field name proposals for an ABAP Dictionary structure.
Conventions for value 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 input help (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 search help 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.
-
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 for ISO (country, language, unit of measure, currency), additional fields for ISO codes are provided.
Always try to use the standard domains listed below for fields. We recommend that you use your own data elements for the fields. If it does not make sense to use your own data elements, use the standard data elements that are listed below.
Field
Standard Domains
Standard Data Element
Country (SAP code)
LAND1
LAND1
Country (ISO code)
INTCA
INTCA
Currency (SAP code)
WAERS
CURCY or WAERS
Currency (ISO code)
ISOCD
ISOCD
Language (SAP code)
SPRAS
SPRAS
Language (ISO code)
LAISO
LAISO
Unit of measurement (SAP code)
MEINS
MSEHI or MEINS
Unit of measurement (ISO code)
ISOCD_UNIT
ISOCD_UNIT
-
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 date 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.