Developing BAPIs for Mass Data Transfer

Use

Process

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 (CA-BFA). 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 an 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 type, that is the instance to be cancelled remains in the database and an additional instance is created which is actually 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<subobject> ( ) and Remove<subobject> ( )

      The BAPI Add<Subobject>() adds a sub-object to an existing object instance and the BAPI Remov<Subobject>() 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. This occurs with transaction BDBG.

  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: