Call Transaction 2. Session Method 3. Direct Input Method
Call Transaction 2. Session Method 3. Direct Input Method
BDC
Batch Data Communication (BDC) is the process of transferring data from one SAP System to
another SAP system or from a non-SAP system to SAP System.
Types of BDC
1. call transaction
2. session method
3. direct input method
Direct Input method is used for bulk transfer of data into SAP system.It results in faster
execution since no screens are processed and the SAP database will be updated directly using the
standard function modules.
Better example where direct input method will be used is… uploading the data for material
master…..it includes lot of views so its very much difficult to capture all the views and record
the tcode and map the data in such conditions its better to go with DI methods
Advantages:
In session method or Call Transaction method while uploading the data u do the validation by
fallowing the screen sequence and field sequence where as in Direct Input validations can be
done set of code so this make the process very fast so its advantageous to upload large amout of
data.
you always use the standard sap provided program for this.
Here in Direct Input method very important thing is structure of flat file… so to know the
structure first of all you have to download the data for one record into the internal table with the
use of the same program then with the use of that structure u have to desing the flat file and
upload the data.
Direct Input:
With direct input, the SAP function modules execute the consistency checks. However with
batch input, these consistency checks are executed with help of the screens. This means that
direct input has considerable performance advantages. But there are a few programs for direct
input, you can use them if it accomplishes your goal. Direct Input programs work like that they
update database tables directly. As you know that it is forbidden to update SAP database tables
directly, since consistency and security should be considered. Exceptions are these direct input
programs. So you are not able to write custom ABAP direct input programs. But of course you
can write ABAP programs to update custom database tables (Z tables), if you are sure all about
consistency.
SAP has created direct input programs because SAP wanted to enhance the batch input
procedure, since batch input is slower. SAP offers the direct input technique, especially for
transferring large amount of data. In contrast to batch input, this technique does not create
sessions, but stores, updates, inserts data directly. To enter the data into the corresponding
database tables directly, the system calls a number of function modules that execute any
necessary checks. In case of errors, the direct input technique provides a restart mechanism.
However, to able to activate the restart mechanism, direct input programs must be executed in
the background only. To maintain and start these programs, use program RBMVSHOW or
transaction BMV0.
Examples for direct input programs are:
RFBIBL00 – FI
RMDATIND – MM
RVAFSS00 – SD
RAALTD11 – AM
RKEVEXTO – CO-PA
In contrast to batch input, this technique does not create sessions, but stores the data directly. It
does not simulate the online transaction. To enter the data into the corresponding database tables
directly, the system calls a number of function modules that execute any necessary checks. In
case of errors, the direct input technique provides a restart mechanism. However, to be able to
activate the restart mechanism, direct input programs must be executed in the background only.
Direct input checks the data thoroughly and then updates the database directly.
1. The first step in a BDC session is to identify the screens of the transaction that the
program will process.
2. Next step is to write a program to build the BDC table that will be used to submit the data
to SAP.
3. The final step is to submit the BDC table to the system in the batch mode or as a single
transaction by the CALL TRANSACTION command.
What do you do when the system crashes in the middle of a BDC batch session?
Check no. of records already updated and delete them from input file and run BDC again.
WHAT are the commands that allow you to process sequential file? And what
is their syntax?
READ DATASET : reading and TRANSFER: writing
OPEN DTASET <dataset name>
for <input/ output /appending>
in <binary/ text > mode
at POSITION <position>
MESSAGE <field>
READ DATASET <dataset name > INTO <field>
CLOSE DATASET <dataset name>
DELETE DATASET <dataset name>
TRANSFER <field> to <dataset name>
What is the effect of the BDC_CURSOR field name in the BDC table?
You can set the cursor and enter as a corresponding field value, the name of the Field, on which
the cursor is to be positioned.
Does the CALL TRANSACTION method allow multiple transactions to be processed by SAP?
No. The CALL TRANSACTION method allows only a single transaction to be processed by
SAP.
An ABAP program creates a batch input session. We need to submit the Program and the batch
session in back ground. How to do it?
Go to SM36 and create background job by giving job name, job class and job steps (JOB
SCHEDULING)
What are the problems in processing batch input sessions? How is batch input process different
from processing online?
If the user forgets to opt for ‘keep’ session then the session will be automatically removed from
the session queue (log remains).
When using call transaction method for 1000 records, if u found error in64th record then how
can u find it and how can u send this to user?
Using BDCMSGCOLL structure you can capture the error records.By using T.code [SLG1] we
can find 64th record or we can know by BDCMSGCOLL.
1.I am uploading 1000 records using session method.I have an error in 950th record. What will
happen and how many records will upload?2.I am uploading 1000 records using Call Transaction
method.I have an error in 950th record. What will happen and how many records willupload?
If I want to insert 10 laks MM records and for inserting one record it takes 1
min by using call transaction or session method. So here is there any
alternative ?
Break the records into 100/1000 sessions and process your session it will
take same time as it takes for single sessions.We can go through LSMW direct input method, in
real time for Master datauploading we are used it. It is fast and performance wise also good.Use
bapi run in background.
Using SM35 you can proceed batch session, if updation is successfully done
then status showing green tick. If any errors over there then its showing red tick.
There is a file in application server. How can you upload it and separate it as
per different fields?
open dataset p_file for input in textmode encoding default.
if sy-subrc = 0.
do.
read dataset p_file into w_rec.
if sy-subrc = 0.
split w_rec at ‘,’ into wa_final-fld1
wa_final-fld2
.
.
.
append wa_final to i_final.
enddo.
You have 5lakh records to transfer to sap from flat file. Which method of bdc
you wiil choose and why?
If u want to process the large amount of data that we have to use the
session method because of, while u are Processing the records any errors are
processed these errors Create the error log file for each error record.
In the same way this method not possible in call transaction Method .
How does u write a program in session method so that it creates the session
and run the session itself without going to sm35 ?
After writing the program submit the session using the syntax submit
rsbdcsub with mappe ‘<session name>’ [via selection screen] [and return].
What has to be done to the packed fields before submitting to a BDC session?
Declare these fields in the internal table as characters and the length of the
field should be same as the field length of the field’s data element. This internal table is
used to hold the data fetched from the sequential file using WS-upload function module
What is CTU_PARAMS?
This is a structure defined in the ABAP Dictionary (SE11) that must be used to
declare the type of variable after the OPTIONS FROM keyword of CALL TRANSACTION
… USING … (“CTU”) statement. It contains many fields to influence the CTU behavior.
For more information, refer to CALL TRANSACTION ‘SM04′ USING
lt_bdcdata MODE ‘N’
UPDATE ‘S’.
is the same as:
DATA ls_ctu_params TYPE ctu_params.
ls_ctu_params-dismode = ‘N’.
ls_ctu_params-updmode = ‘S’.
CALL TRANSACTION ‘SM04′ USING lt_bdcdata OPTIONS FROM ls_ctu_params.