✒️ABAP El concepto de Batch Input
ABAP El concepto de Batch Input
What is a Batch Input?
When implementing a new transaction in the production environment, a crucial step is to load all the necessary information for its proper functioning. This information, in some cases, can involve handling large amounts of data, such as a massive load of 10,000 records. This process is called initial data load.
Through the Batch Input technique, we can create, modify, or delete large amounts of data in the SAP system automatically, using the same transactions and their respective validations, just as we would manually handle one piece of data at a time.
Batch Input: It's an automatic technique through which we can perform massive data loading in the SAP system using the validations inherent to the transactions.
Typically, the initial data load is done by extracting data from a file, either locally or located on the SAP application server.
Batch Input Techniques
There are two techniques for performing Batch Input: one is done online, and the other is done in batch or background.
- CALL TRANSACTION: It's done online, executing updates at the moment the Batch Input program runs. This is done using the standard statement CALL TRANSACTION.
- BATCH INPUT SESSION (DATA SET): It's done in batch or background and is stored in SAP for later execution using the standard transaction SM35. It involves the execution of a series of standard function modules for opening, executing, and closing the batch input session.
There is another alternative to Batch Input called DIRECT INPUT where consistency checks are performed. It updates data directly in the database tables so it is not possible to write Z "Direct Inputs", we must use the existing ones with the BMV0 transaction. SAP has created those to improve the performance of certain operations, some examples are:
FI: RFBIL00
MM: RMDATIND
SD: RVAFSS00
AM: RAALTD11
CO: RKEVEXCO
Steps for creating a Batch Input - CALL TRANSACTION
- Declaration of Batch Input-specific data.
- Reading data from the input file.
- Loading data into the internal table BDCDATA.
- Execution of the CALL TRANSACTION statement.
BDCDATA structure: This standard structure is widely used in Batch Inputs as it defines the type of data in the internal table that stores the data to be loaded in the Batch Input.
Steps for creating a Batch Input - BATCH INPUT SESSION
- Declaration of Batch Input-specific data.
- Reading data from the input file.
- Opening the Batch Input session.
- Loading data into the internal table BDCDATA.
- Inserting the Batch Input session.
- Closing the Batch Input session.
- Executing the Batch Input session through the standard transaction SM35 or by creating a job and executing the standard program RSBDCBTC.
RSBDCBTC program: this standardsystem program allows us to execute a Batch Input session online.
Loading data into the internal table BDCDATA
The most important step in executing a Batch Input is loading data into the internal table BDCDATA. As mentioned, the BDCDATA table will be an internal table with the same fields as the BDCDATA structure.
* Internal table for Batch Input with the structure of BDCDATA
DATA: BEGIN OF lt_batch_input_data OCCURS 0.
INCLUDE STRUCTURE bdcdata.
DATA: END OF lt_batch_input_data.
* Structure for Batch Input
DATA: ls_batch_input_data TYPE bdcdata.
For each new screen entered into the BDCDATA table, a BDC_OKCODE must be entered.
Screen numbers, or dynpros as they are known in SAP, must always have 4 digits.
 
 
 
Sobre el autor
Publicación académica de Jaime Eduardo Gomez Arango, en su ámbito de estudios para la Carrera Consultor ABAP.
Jaime Eduardo Gomez Arango
Profesión: Ingeniero de Sistemas y Computación - España - Legajo: SW34C
✒️Autor de: 99 Publicaciones Académicas
🎓Cursando Actualmente: Consultor ABAP Nivel Avanzado
🎓Egresado del módulo:
Disponibilidad Laboral: FullTime
Presentación:
Ingeniero de sistemas y computación con 8 años de experiencia el desarrollo frontend & backend (react/node) y en cloud (aws), actualmente desarrollando habilidades en sap btp, ui5, abap y fiori.
Certificación Académica de Jaime Gomez