Data Transfer
Data Transfer
Data Transfer
ABAP Training Data Transfer 2
another system.
Data is regularly transferred from external systems into the SAP
system.
Example: if the data in some areas of the company is created in
external systems and this data has to be integrated into the SAP
system.
A way has to be found to transport the data into the R/3 system.
External data cannot be directly imported into the R/3 database because
data integrity is not guaranteed.
ABAP Training Data Transfer 3
Batch Input
ABAP Training Data Transfer 8
Batch Input
Batch input is a standard technique used to transfer data into the R/3
System. The transaction process is simulated and the data is transferred
as if it had been entered online. The advantage of this process is that all
the transaction checks are carried out and therefore data consistency is
assured.
The batch input process runs in two phases:
1.) A batch input session is created containing all the relevant data.
2.) The batch input session is processed and the data contained in it is
imported into the R/3 System.
Most of the SAP standard data transfer programs use batch input.
The online transaction is used for importing, checking and transferring
the data into the R/3 database.
ABAP Training Data Transfer 9
Call Transaction
ABAP Training Data Transfer 10
Call Transaction
Call transaction is a standard technique used to transfer data into the
R/3 system. The transaction flow is simulated and the data is transferred
as if it had been entered online. The advantage of this procedure is that
all transaction checks are carried out, thereby guaranteeing data
consistency.
Call transaction posts the data directly via the online transaction.
This method provides the same functions as with batch input.
The online transaction is used for importing and checking.
ABAP Training Data Transfer 11
Analyze Results
Recording
1. Use the Transaction Code - SM35 to get to the BDC Input screen.
2. Press Recording to initiate the recording session.
3. Enter the name of the recording session [start always with Z ] and use
the create function.
4. A popup appears requesting the transaction code to be used in the
session. Enter the T/Code and press Enter.
5. The T/Code takes you to the corresponding screen in SAP. Enter the
required data and make any changes if necessary. [Do not repeat any
cursor movements, i.e., do not go back to a field where data has been
changed or entered]. Save the current transaction. During this whole
process, the BDC records the movements of the cursor and the data
changes made in these fields.
6. Finally, a Batch Input: Recording screen appears, listing the screens, data
fields, etc recorded.
ABAP Training Data Transfer 17
Recording
Recording
11. To check the program created, change the data back to the original
values as in the original record. Check the program for any syntax
errors. Use the menu path - Program à Execute. Enter the name of the
session and the authorization group for the session. Press Execute [F8].
Use the T/Code - SM35 to go back to the BDC session overview. Choose
the session and process in the background. Go back to the record to see
the changes made by the current BDC session.
ABAP Training Data Transfer 19
BDC Table
Structured work areas for the data to be transferred in
the form of an internal tables
PROGRAM - Name of the program
DYNPRO - No of Screens
DYNBEGIN - Indicates the first record of the screen.
Set this field to X only in the first record
for the screen. Set ‘ ‘(space) for the rest
of thefields.
Program Structure
ABAP Training Data Transfer 23
Program Structure
ABAP Training Data Transfer 24
BDC_OPEN_GROUP
Opens batch sessions
Import parameters
Client
Group
HOLDDATE
Keep
User
BDC_INSERT
Used to add a transaction to BDC input session
Here we have to provide BDCDATA table that contains all of the data
required to process the transaction completely
Import parameters
TCODE transaction code
Tables
DYNPROTAB table for screens of a transaction
ABAP Training Data Transfer 28
BDC_CLOSE_GROUP
Used for closing the session
No parameters to be passed
Exceptions
Not_open = 1
Queue_error = 2
ABAP Training Data Transfer 29
Call Transaction
In contrast to batch input, you can use call transaction to directly pass
data to the dialog interface, without using a batch input session. You use
an internal table (BDC table, same structure and layout as batch input)
to temporarily store your screen data. Then you call the desired
transaction in your program.
In contrast to batch input, there is no error logging (error sessions)
here. For processing the called transaction, the system uses the
authorizations of the user that called the transaction. The BDC table can
only hold data for one transaction run at a time. Before another
transaction is called and its data can be added, you must execute a
REFRESH for the BDC table.
ABAP Training Data Transfer 32
Reorganises the log file (file is reduced if logs have been deleted)
RSBDCLOG
Generates a list of batch input logs, selected by session name
RSBDCSUB
To start a session in background processing submit this report in
background.
If several sessions have the same name, RSBDCSUB starts them all.