BAPI Conventions
BAPI Conventions
Methods
Parameters
Standardized BAPIs
Standardized Parameters
Important things to remember..
BAPI/ALE Integration
Methods
Parameters
If standardized parameters are used, you have to use the names specified for
standardized parameters.
BAPI parameter names should be as meaningful as possible. Poorly chosen
names include abbreviations and technical names (e.g. "flag", table names, etc.).
The parameter and field names must be in English with a maximum of 30
characters.
The components of a parameter name in the BOR are separated by upper and
lower case letters to make them easier to read. Example: CompanyCodeDetail
Values that belong to each other semantically should be grouped together in one
structured parameter, instead of using several scalar parameters.
For ISO-relevant fields (country, language, unit of measure, currency),
additional fields for ISO codes are provided.
Unit of measure fields must accompany all quantity fields and currency
identifiers must accompany currency amount fields.
Standardized BAPIs
Some BAPIs provide basic functions and can be used for most SAP business object
types. These BAPIs should be implemented the same for all business object types.
Standardized BAPIs are easier to use and prevent users having to deal with a number of
different BAPIs. Whenever possible, a standardized BAPI must be used in preference to
an individual BAPI.
GetList ( )
With the BAPI GetList you can select a range of object key values, for
example, company codes and material numbers.
The BAPI GetList() is a class method.
GetDetail() With the BAPI GetDetail() the details of an instance of a business object
type are retrieved and returned to the calling program. The instance is
identified via its key. The BAPI GetDetail() is an instance method.
BAPIs that can create, change or delete instances of a business object type
The following BAPIs of the same object type have to be programmed so that they can
be called several times within one transaction. For example, if, after sales order 1 has
been created, a second sales order 2 is created in the same transaction, the second BAPI
call must not affect the consistency of the sales order 2. After completing the transaction
with a COMMIT WORK, both the orders are saved consistently in the database.
Create( ) and
CreateFromData( )
Change( )
Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business
object type from the database or sets a deletion flag.
The BAPI Undelete() removes a deletion flag. These BAPIs
are instance methods.
Cancel ( )
Add<subobject> ( ) and
Remove<subobject> ( )
Standardized Parameters
There are some parameters that can be created for various BAPIs because they contain
the same or the equivalent data in all BAPIs. They should be implemented the same in
all BAPIs.
Address
parameters
Change
Parameters
Extension
parameters
Return
Parameters
Selection
Parameters
Test Run
Parameters
Text Transfer
Parameters
BAPI/ALE Integration
When you use the BAPIs for asynchronous messagning, the application in the sendig
systen calls the generated ALE IDoc interface isntead of the BAPI.
Asynchronous BAPIs use the ALE interface this way: