Developing BAPIs for Mass Data Transfer

Process Flow

The following aspects are relevant for developing a BAPI that can be used for mass data transfer in the DX Workbench:


       1.      Implementing a BAPI

BAPIs for mass data transfer must be developed as described in the BAPI Programming Guide. All write BAPIs can potentially be used for mass data processing. In detail, we differentiate between the following standardized write BAPIs:

Ў        Create() or CreateFromData()

The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, such as a purchase order.

Ў        Change()

The BAPI Change() changes an existing instance of an SAP business object type.

Ў        Delete() and Undelete()

The BAPI Delete() deletes a complete instance of an SAP business object type from the database or sets a deletion flag. The BAPI Undelete() removes a deletion flag.

Ў        Cancel()

Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object, that is the instance to be cancelled remains in the database and an additional instance is created that is canceled.

Ў        Replicate() and SaveReplica()

The BAPIs Replicate() and SaveReplica() are implemented as methods of replicable business object types. They enable specific instances of an object type to be copied to one or more different systems. The replicated instances are usually created under the same object key as the original object. These BAPIs are used mainly to transfer data between distributed systems within the context of Application Link Enabling (ALE).

Ў        Add<sub-object>() and Remove<sub-object>()

The BAPI Add<sub-object>() adds a sub-object to an existing object instance and the BAPI Remove<sub-object>() removes a sub-object from an object instance.

2.       Generating the BAPI-ALE Interface

Since the data for the BAPI call is received in the SAP System in IDoc format, the BAPI-ALE interface has to be generated to automate the mapping of the IDoc to the parameters of the BAPI.

3.       Writing a report

The report is responsible for writing existing objects in IDoc format to a file. Because users are normally only familiar with the online transactions, but not the BAPIs or IDocs, the reports can be used to find out how the objects that are created in the online transaction have to be represented in the IDoc. This information is required during the mapping process to correctly structure the IDocs for the objects to transfer.
This report is required, since it is the only way for users to establish the connection between the online transaction, the BAPI, and the IDoc.

4.       Registering the BAPI

This step is required if the BAPI will be used in the DX Workbench. To register the BAPI, including its corresponding report, use transaction BDLR.

The individual aspects are described in detail below:

See also:

Implementing a BAPI

Generating the BAPI-ALE Interface

Writing a Report

Registering the BAPI