Académique Documents
Professionnel Documents
Culture Documents
To load data into your SAP System, you can use the standard techniques BAPIs, batch input or direct input: 1. BAPIs as interfaces Business Application Programming Interfaces (BAPIs) are standardized programming interfaces that provide external access to SAP business processes and data. BAPIs are defined in the Business Object Repository (BOR) as methods of SAP business objects or SAP interface types. BAPIs enable an object-oriented access to SAP application components. BAPIs are implemented and stored as RFC-enabled function modules in the Function Builder of the ABAP Workbench. For more information about BAPIs, see the BAPI User Guide.
When using BAPIs as interfaces to the SAP System, the Workbench uses the same technology as used with permanent data transfer via ALE between SAP Systems or between SAP Systems and non-SAP systems. The data to be loaded must be in IDoc format (see Creating Example Files and Analyzing Structures). The IDoc numbers in the file must be unique. When the task is started, the IDocs from the specified input files are read and transferred to the BAPI. Note the following: If parallel loading is used, a separate process is started on one of the application servers in the server group for each input file. If more than one application server is assigned to the server group, you have to make sure that the files can be accessed with the specified path from each of these servers. If you load the data sequentially, the input files are edited in sequence in the same process. If errors occur during loading (and the BAPI can therefore not process certain objects), the corresponding error message is recorded in the log of the run. If you store these objects as IDocs in the SAP System, you need to transfer the Idocs to the application again after the cause of the error has been removed. You can then terminate the task manually and continue the run with the subsequent task. If you write the objects with errors to files, you can continue the run after the cause of the error has been removed. The input files are then overwritten by the error files and the system reads from these new input files.
This means that the original input files are deleted if the run is continued, even if you did not choose the Delete input files after processing option. IDoc Loading using the program type IDoc is essentially the same as loading using BAPIs. The only difference is that ALE inbound processing and the Idoc type are not generated from a BAPI but instead have to be programmed by the relevant application itself. 2. Batch input Batch input is a standard technique for transferring large sets of data into the SAP System. The transaction flow is simulated and the data is transferred as if it were entered online. The advantage of this is that all relevant checks of the transaction are executed, thereby ensuring that the data is consistent. The batch input process is divided into two steps: 1. The data transfer program creates a batch input session that contains all the relevant data. 2. The batch input session is processed and the data it contains is transferred into the SAP System. The Data Transfer Workbench only executes step 1. The majority of SAP standard data transfer programs use the batch input technique. The data transfer program creates a batch input session which is processed later. Batch input sessions can be processed in various ways: In the foreground In the background During processing, with error display You should process batch input sessions in the foreground or using the error display if you want to test the data transfer. If you want to execute the data transfer or test its performance, process the sessions in the background. For more information, see the Basis documentation on 3. Direct input (DINP) With direct input, data from the data transfer file undergoes the same checks as with the online transaction and is then transferred directly into the SAP System. The database is updated directly with the transferred data. For more information, see the relevant program documentation. Batch Input Sessions.
There are two types of direct input programs: Direct input programs supported by transaction BMV0. There are two ways to trigger direct input: Start the program directly: Note that the system does not generate error logs and that it is not possible to restart the system if an error occurs. This is only appropriate for test purposes. Direct input in the background (transaction BMV0): In this case, you can restart processing if the program terminates or logical errors occur (material missing, for example). The ability to restart the system ensures that data cannot be posted twice to the database, as the program can be reset to where it terminated. Using the trace, you can correct or post subsequently any errors that occurred. Direct input also has the advantage that it places little load on the system.
If you are working with test data, start the direct input directly. For the final data transfer, SAP strongly recommends that you use Transaction BMVO. Direct input programs that are not supported by transaction BMV0. Theses programs always provide error handling. Defining attributes Define the following attributes, using the F4 input help and F1 field help: Report Name of a registered program for this program type Variant You can only specify a variant with programs that are started directly. Note that with background processing, the input file cannot be stored on the presentation server. Access to presentation server files is only possible when you are working online. For more information about direct input, see Interfaces. BC - Basis Programming
Variants cannot be specified for direct input programs that only enable error handling when they are called from the Direct Input Monitor (transaction BMV0). This is because the Direct Input Monitor is interactive and runs with tasks of this kind cannot be started in the background.
Common Data Transfers (usually from customers ERP system) o Company Master (Business Unit Master) o Vendor Master o Employee Master o Purchase Order Master o Warrant Master o GL Master o TCR data (Check data) o EDI to Image Conversion
1. How should the data be transferred to the SAP System? You have to determine the data transfer technique to use for each involved business object type. The techniques BAPI, batch input, and direct input are available for loading the data into the target system. For details of each technique, refer to the description of the Transferring the Data into the SAP System phase. In our case BAPI will be used.
Process Flow
The key feature of the data transfer is that data can only be transferred from a non-SAP system to an SAP System when it is available in SAP format. For this reason, the data from the non-SAP system initially has to be extracted into a file, and then copied into a transfer file in SAP format. In turn, this transfer file is the foundation for the actual data import into the SAP System. The entire data transfer usually takes place in five technical phases, which are illustrated in the following diagram
These phases are described in detail below: 1. Analysis and cleanup of data in the non-SAP system
This phase involves answering three related questions: Which data exists in the non-SAP system? How is this data structured (length, sequence)?
This step is required to assign the transferred data to the correct SAP structures later.
Which data can be transferred unchanged, which data has to be supplemented, and which data cannot be transferred at all? Example A power company manages its customers for electricity, gas, and water in three separate systems. The company wants to merge these three systems in one SAP System. If customers exist who purchase both gas and water from this company, for example, then the data on these customers may have a different status in the different systems. For this reason, the customer data in each system first has to be cleaned up or merged before it can be transferred to the SAP System.
This question must be answered because dependencies may exist between business object types that require the data to be transferred in a specific order.
Which data transfer technique will be used for the individual business object types?
The following three standard techniques are available for the data transfer: 1. BAPIs
Calling a BAPI in the appropriate application transfers the data to the SAP System. If BAPIs are used as interfaces to the SAP system, the same technique is used as for the continuous data transfer between SAP Systems or between non-SAP systems and SAP Systems with ALE. For more information on data transfer using BAPIs, see Process Flow of Mass Data Transfer Using BAPIs.
1. Batch input
Batch input is a standard technique for transferring large volumes of data into the SAP System. In the process, the transaction flow is simulated, and the data is transferred as if it were entered online. The advantage of this procedure is that all the transaction checks are performed, which guarantees data consistency. For detailed information on batch input, please refer to the documentation on batch input sessions under Data Transfer: Overview of Batch Input.
1. Direct input
During direct input, the data in the data transfer file is first subjected to various checks, and is then imported directly into the SAP System. The SAP database is updated directly with the transferred data. Important: You should use BAPIs exclusively to transfer data in Release 4.6A and later.
Tool Support
SAP created the DX Workbench for Release 3.1 and later to support the transfer of mass data. As of Release 4.6A, this tool provides integrated project management for all the steps involved in transferring data to the SAP System. In particular, the Data Transfer Workbench offers the following functions: 1. Managing and organizing data load projects 2. Tools for analyzing the required SAP structures 3. Integration of the standard data transfer programs 4. Registration and integration of separate data transfer programs 5. Support of various techniques for loading data into the SAP System For more information, please refer to the documentation for the DX Workbench under
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
Generate default IDocs for a BAPI without application data 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.
3.
Once the data transfer is complete, more comprehensive consistency checks can be performed.