Professional Documents
Culture Documents
Ans:- Batch Data Communication or BDC is a batch interfacing technique that SAP developed. It is
mainly used for uploading data into the SAP R/3 system. BDC works by simulating the user input from
transactional screen via an ABAP program.(or)
It is used to transfer Non-Sap data (legacy system) to SAP R/3 system. The data input data file will come
in the form of a flat file which the user save as file type txt file or prn file from the Microsoft Excel
program. An Abaper will create a program to read the text file and upload into the SAP system.
Steps to develop BDC prog:-
A-Displays all screen,E-it displays only error screen,N-Displays no screen by default mode ‘A’
Update A(Asynchronous):-During asynchronous update a BDC program send a record to update a work
process and will not wait for acknowledgement to came from update work process instead it kepp on
sending the records to update work process wil update data to the data base.
Update S(synchronous):-During synchronous update a BDC program sends a record to the update work
process and will wait for the acknowledgement to come from update work process then only it sends
the next record.by default update work process Asynchronous.
Message into IT_MSG:-This option is use to capture both sucess and failure message into an
internal table it_msg of structure BDCMSGCOLL.
MSGV1, MSGV2, MSGV3, MSGV4 are the field which contain parts of the message.
The structure BDCMSGCOLL also consists of msgid and msgnr -the message id and number..
You can use the FM <b>FORMAT_MESSAGE</b> to combine all these fields together to get
the complete message
GUI_UPLOAD:- This function module is used to upload flat file data present on front end or desktop to
internal table itab.
Exporting parameters:-File name = Flat file name
File type = 'ASC' or 'BIN'
‘ASC’->Means flat file is text file ‘BIN’->Means flat file is a Binary file
F4_FILENAME:-This F.M will display list of files and returns the selected file. It has importing parameters
FORMAT_MESSAGE:- This F.M will collect the complete message and return it.
ALSH_EXCEL_TO_INTERNAL_TABLE:-This F>M will upload the excel file and data to an internal table.
What is Recording?
Ans:-It is capture or record the sequence of steps for particular transcation based on which a system
create BDC Program
Tcode for recording -- SHDB.
1.It is used to upload small amount of data 1.It is used to upload very large amount of data
b because can be put in background with the help of
R RSBDCSUC
What is the difference between Call Transaction Method and the Session method ?
Is there any method apart from BDC for data upload to SAP?
Apart from BDC and LSMW, you can use BAPIs to upload data into SAP.
BAPIs should be preferred over BDCs, because they process data faster than BDC.
A BAPI is faster since it updates Database "directly". Whereas BDC calls transaction and goes through
the whole screen sequence as any user would do.
BAPI BDC
BAPI is faster than BDC. BDC is relatively slower than BAPI.
BAPI directly updates database. BDC goes through all the screens as a normal
user would do and hence it is slower.
No such processing options are available in BAPI. Background and Foreground processing options
are available for BDC.
BAPI would generally used for small data BDCs would be preferred for large volumes of
uploads. data upload since background processing option
is available.
For processing errors, the Return Parameters for Errors can be processed in SM35 for session
BAPI should be used.This parameter returns method and in the batch input program for Call
exception messages or success messages to the Transaction method.
calling program.
The sessions are created at one point of time and processed at other point of time and this may create a
problem: For example: a BDC program creates a session for updating 1500 customers in SAP. However ,
before this session is processed via SM35 , a user inserts 100 customers in the system manually. In this
case , the session will have at least 100 errors when the session is processed from SM35.
One way to avoid this is to use the program "RSBDCSUB" in the batch input program itself so that the
session is processed as soon as it is created.
RSBDCSUB schedules the session to be processed in background.
Sample Screenshot:
Example code:
perform bdc_field using 'BDC_CURSOR'
'PROJ-PSPID'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
What are the 3 methods that we use in sequence in a Batch input session method ?
Identify the Tcode and do the recording in SHDB to populate the BDCDATA.
Once the recording is done , one can Transfer it to the Batch input program.
In the batch Input program , The transactional data is read from the file to an internal table.
Then one can loop over the transactional data in the internal table and start uploading the data in SAP
either by CALL TRANSACTION method or by creating sessions through the batch input program.
Can we write the code both call transaction and session method in single program?
Ans. Yes it is possible to write call transaction and session in one program.
Which BDC you prefer?
Ans. If we want to transfer large amount of data and when we need to use more than one transaction
code we prefer session method. For small or less amount of data and for single transaction use call
transaction.
(This is more genric answer but you can add more on to this if you have worked on BDC)
When u prefer LSMW?
Ans. When we need to update medium amount of data we use LSMW. LSMW is also used when the
person like functional consultant has less programming language.
How can we handle table control in BDC?
Ans.We can handle table control using line index
Line index indicates which line of Table control is to be use for BDC transaction
Ex -
perform bdc_field using ‘RC29K-AUSKZ(01)’
Indicates 1st line of table control is going to be used for transaction which is Line index of Table Control
If i want to execute a BDC program only in background not in foreground is there any option for this?
Ans.The sm37 transaction can be used for running a program in the background. Also in the session
method while processing the session you can specify the processing type as background or foreground.
What is bapi?