Process Flow of Mass Data Transfer Using BAPIs


To perform mass data transfer using BAPIs, SAP supplies the DX Workbench, which integrates all the required steps in a single user interface. This section describes, at a conceptual level, the process flow of mass data transfer using BAPIs in the DX Workbench. For a detailed description of the process flow, see the documentation for the DX Workbench under Data Transfer Workbench.

Mass data transfer using BAPIs utilizes the same ALE technology that is used for continuous data transfer. This means the data to be copied from the source system is imported into the target system in IDoc format. In the target system, the IDocs are then used to generate BAPI calls that ensure the data is written to the database.

Before the mass data transfer can be performed, you have to identify the relevant business objects in the target system and determine which BAPIs will be used to import the data. To determine which objects are involved, you have to establish a connection between the online transactions used during production operation and the underlying business objects.

For a BAPI to be suitable for mass data transfer, it has to have certain attributes, which are described in Developing BAPIs for Mass Data Transfer.

In the description below, we assume that the data to transfer is already available in a file in the external format. The steps that resulted in the creation of this file are the same as those described in the Basics of Mass Data Transfer, and are therefore not repeated here.

The resulting process flow is described in more detail below.

Process Flow

If the data to transfer is available in a file with an external format, then we differentiate between analyzing the underlying structures, mapping the data in IDoc format, and performing the actual data import.


       1.      Analyzing the underlying structures

The transfer file into which the data is imported from the external file and which forms the foundation for importing the data into the SAP System must be available in IDoc format. For this reason, an IDoc must be generated during the mapping process in the transfer file for each object to generate in the SAP System.

To implement the object mapping in an IDoc, you have to analyze how the structure appears to the corresponding BAPI call that will generate the object in the SAP System. Therefore, you have to determine how the data used for the BAPI call has to be represented in the IDoc, to allow the BAPI call to be generated automatically from the IDoc during ALE inbound processing.

The DX Workbench supports this analysis by integrating reports that


                            a.      Generate default IDocs for a BAPI without application data

                            b.      Generate IDocs for a BAPI whose parameters have been filled with data from an existing object

Therefore, you could perform the analysis as follows, for example:

Ў        Use the corresponding online transactions to create test objects of the business object types in the SAP System that you want to transfer from the non-SAP system.

Ў        Call the corresponding reports, which generate IDocs for these objects.

This allows you to determine how the values that are involved in the online transaction are represented in the corresponding IDoc. In turn, this information can be used during the mapping process to correctly structure the IDocs for the objects to transfer.

2.       Mapping the non-SAP system data in SAP format

Once you have identified how the individual IDocs are structured in the transfer file, you can transfer the data from the external-format file to this transfer file. Mapping is usually required to transform the external-format data into the IDoc format of the transfer file. You can use the SAP mapping tool (LSM Workbench) or an external mapping tool for the actual mapping. These mapping tools require the information you determined during the above structural analysis.

We plan to integrate an SAP mapping tool in the DX Workbench starting in Release 4.6C.

Once mapping is complete, the transfer file is imported into the target system.

3.       Performing the actual data import

Once the transfer file is received in the target system, the following steps are performed for each IDoc contained in the file:

Ў        The IDoc is read and its contents are mapped to the parameters of the corresponding BAPI.

Ў        The BAPI is then called with the data from the IDoc, and fills the database tables with this application data. The BAPI carries out all the required business checks on the data before writing it to the database.

If a BAPI call fails, an appropriate error message is returned in the BAPI Return parameter.

Once the data transfer is complete, more comprehensive consistency checks can be performed.