0% found this document useful (0 votes)
364 views

Call Transaction 2. Session Method 3. Direct Input Method

Batch Data Communication (BDC) is used to transfer data between SAP systems or from non-SAP systems to SAP. There are three types of BDC: call transaction, session method, and direct input method. Direct input method allows bulk data transfer directly into SAP tables, making it faster than other methods that process screens. It requires knowledge of data structures and uses standard SAP programs and function modules to validate data and update tables.

Uploaded by

Chris Bailey
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
364 views

Call Transaction 2. Session Method 3. Direct Input Method

Batch Data Communication (BDC) is used to transfer data between SAP systems or from non-SAP systems to SAP. There are three types of BDC: call transaction, session method, and direct input method. Direct input method allows bulk data transfer directly into SAP tables, making it faster than other methods that process screens. It requires knowledge of data structures and uses standard SAP programs and function modules to validate data and update tables.

Uploaded by

Chris Bailey
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 9

BDC

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

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.

What is the alternative to batch input session method?


Call transaction & call dialog

What are the steps in a BDC session?

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 table stores online messages?


T100.

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 do you do with errors in BDC batch session?


Analyse and correct input file format and entries in internal table BDCDATA.

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>

Why batch input?


To input a large amount of information at off peak times

Can data be put directly into the database?


Yes , through direct input

What are the function modules associated with batch input?


BDC_OPEN_GROUP,
BDC_CLOSE_GROUP,
BDC_INSERT

What is the structure of the BDC table?


Program / Dynpro /dynbegin / field name /field value.

What are the processing modes for Batch Input?


Process on screen (foreground),
Display errors only,
Process in the background.

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.

Why you choose Call transaction and/or session method?


Call transaction is mainly used when you want to update the database
using a single transaction, you can also update the database in asynchronous
mode, where as session is used to perform huge database updations using more
than one transaction.

How do you trap errors in call Transaction?


Errors while updating the database using call transaction technique are trapped using a
structure BDCMSGCALL, whose field msgtyp become ‘e’ when an error record is
encountered.
Those records are formatted using FORMAT_MESSAGE function call in the desired format
and stored in an internal table for listing of all error records in one shot.
What are different types of Update Modes?
In BDC’s we have two types of updation modes,
1) Synchronous
2) Asynchronous.

What is main difference between session method and LSMW?


In the context of session method, the method of updating is “Batch Input”,we require a program
to be coded,But in the context of LSMW method, the methods of updating using “Batch
input/Direct Input” from an IDOC / from a BAPI structure. No source code is required;
the complete operation is performed in 16 sequential steps.

How do you save data in BDC tables?


The data in BDC tables is saved by using the field name ‘BDC_OKCODE’ and field
value of ‘/11’.

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).

Is it possible to use ‘CALL TRANSACTION’ without a BDC table?


Yes, it is possible to use ‘CALL TRANSACTION’ without a BDC table. In
such case, the current program is suspended, the transaction specified is brought
up, and a user must enter the data into the screens.

How many sessions will be opened using BDC_OPEN_GROUP?


Only one session can be created using the BDC_OPEN_GROUP function.

What is ‘BATCH INPUT’ or ‘BDC’?


The SAP system offers two primary methods (BDC SESSION METHOD,
CALL TRANSACTION METHOD) for transferring data into the system from other
systems and Non-SAP systems. These two methods are collectively called as
‘BATCH INPUT’ or ‘Batch Data Communication’ (BDC).

What are the advantages in Batch Input?


The Batch Input ensures Data integrity.
No manual interaction is required during Data transfer.
What is Synchronous Database update?
During the processing no new transaction is started until the previous
transaction has been written to the Database. This is called Synchronous
Database update.

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?

1:Up to 949 records will upload


2:Except 950th record, all records will be uploaded.

What is the use of OK_CODE in BDC?


BDC_OKC0DE will store all the ok codes in the BDC program, when you
pass the Fields to a screen after filling the fields we need to click any button to
move other screens, so here the Button will be have a OK_CODE internally to
know this we do the recording of the Program, after that we will store this OK
code in the BDC_OKCODE field to trigger the next operation.

How to generate and processing the session in the same program?


Write BDC Program then call “RSBDCSUB” using “Submit” Command.

How to run bdc program in background?


By using RSBDCSUB we can do this

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.

How does u know that updation is successful in BDC?


Using bdcmsgcol we can find out it is success or not. After run the BDC PROGRAM
(CREATING BATCH SESSION).

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 .

We give KEEP in BDC structure…what is its purpose?


It is Indicator to keep processed sessions. I.e. if this flag is set, then
session is kept after processing also. Otherwise, session will be deleted after
processing.

How to run bdc program in background?


1. By using RSBDCSUB we can do this.
2. In session method goto SM36 to schedule a background job.

Utility of bdc cursor?


In BDC program BDC_CURSOR is used to move cursor location to a specific
screen field in which data need to be inserted.

What is difference between batch input method and direct input


Direct input method Batch Input Method
1) We cannot send the fields 1) we can send fields as per our
according to our requirement requirement.
2) validations are done based 2) validations are done based
on pre-defined function on applications.
modules

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].

How to use table control in bdc?

Table control is used for entering multiple line items in BDC.


For table control in bdc declare two variables as integer. set the variable
value as 0.
In the program before the line item perform statement set the counter
value as 1.
Count=count+1.then u have to use the concatenate statement for the line
items for example concatenate'(lfa1-banks(‘count’))’ into cval. Perform bdc using
cval.
During recording for the line items we have to record for the next page also
for the line item. goto standard tool bar u hv to press the next page button.
if count=5.
perform bdc using p+ ->this for next page
endif
clear count.

What are the differences between CALL TRANSACTION and BATCH


INPUT SESSION?
– The most important aspects of the batch session interface are:
– Asynchronous processing
– Transfers data for multiple transactions
– Synchronous database update during processing, no transaction is started
until the previous transaction has been written to the database.
– A batch input processing log is generated for each session
– Sessions cannot be generated in parallel.
The most important aspects of the CALL TRANSACTION USING interface
are:
– Synchronous processing
– Transfers data for a single transaction
– Synchronous and asynchronous database updating both possible
The program specifies which kind of updating is desired.
– Separate LUW for the transaction
The system performs a database commit immediately before and after the CALL
TRANSACTION USING statement. No batch input processing log is
generated.

What does the message parameter indicates?


The message parameter indicates there all system messages issued during a CALL
TRANSACTION are written into the internal table <itab>. The internal table must have
the structure of BDCMSGCOLL.
How do you set up batch process?
Data analysis: Analyze the data that is to be transferred to the SAP System.
Generate SAP structures: Generate SAP data structures for incorporation into your
data export program.
Develop transfer program: You can write the program in ABAP/4 or as an external
program.
Create sequential file: Export the data that is to be transferred, to a sequential file.
Create batch input program: ABAP/4 batch input program that will read the data to be
transferred from the sequential file.
Process batch input data: Process the data and add it to the SAP System. You can do
this either by: batch-input session method or Call transaction method.
Analyze results: Check that all data has been successfully processed.
Analyze Error session: Correct and re-process erroneous data.

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.

Why SHDB didn’t record some screens?


There was probably a COMMIT WORK. By default, the recording stops after
COMMIT WORK (for more information
When you start the recording, you have a check box “not possible, but anyway
it makes no sense to transport them: the recordings have no vocation to remain in the
system, and are usually converted into programs or function modules, which are crossclient.

How does recording work?


It works the same as CTU with Display Mode “A”, but it’s surrounded by kernel
calls to SET_TRANS_VAR for activating and deactivating the recording: among other
things, before CTU, there are call ‘SET_TRANS_VAR’ id ‘RECORDING’ field ‘X’ and CALL
‘SET_TRANS_VAR’ ID ‘ACTIV’ FIELD ‘X’, and after CTU, there is call ‘SET_TRANS_VAR’
id
‘RECORDING’ field ‘ ‘.
The main function module for recording is BDC_RECORD_TRANSACTION, which
returns the BDC data. The SHDB recorder records the BDC data into APQI and APQD
tables.
LSMW recorder uses this same technology, but saves the BDC data into
/SAPDMC/LSGBDC* tables.

What values may contain BDC_CURSOR?


It may contain 3 kind of values:
· A field name: MARA-MATNR (if several fields have the same name in the outer dynpro,
the BDC_SUBSCR line is needed)
· A field name followed by a row number between parentheses, indicating a field in a
table control or step loop (see FAQ about table control scrolling below): MARAMATNR(
01)
· Coordinates in a list (row/column): 07/04

You might also like