You are on page 1of 6

5/2/2019 BDC | SAP ABAP QUESTIONNARE

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 di cult 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 eld 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 at le… so to know the structure rst 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 at le 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 o ers 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 rst step in a BDC session is to identify the screens of the transaction that the program will process.
2. Next
Privacy step is This
& Cookies: to write a program
site uses cookies.to
Bybuild the BDC table
continuing to use thisthat will be
website, youused
agreetotosubmit the data to SAP.
their use.
To 3.nd out more, including how to the
control Close and accept
The nal step is to submit BDCcookies, see
table to here:
the Cookie
system in Policy
the batch mode or as a single transaction by the CALL TRANSACTION command.

https://sapabapfaq.wordpress.com/conversions/bdc/ 1/6
5/2/2019 BDC | SAP ABAP QUESTIONNARE

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 le and run BDC again.

What do you do with errors in BDC batch session?


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

WHAT are the commands that allow you to process sequential le? 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 < eld>
READ DATASET <dataset name > INTO < eld>
CLOSE DATASET <dataset name>
DELETE DATASET <dataset name>
TRANSFER < eld> to <dataset name>

Why batch input?


To input a large amount of information at o 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 / eld name / eld value.

What are the processing modes for Batch Input?


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

What is the e ect of the BDC_CURSOR eld name in the BDC table?
You can set the cursor and enter as a corresponding eld 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 eld 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 di erent types of Update Modes?


In BDC’s we have two types of updation modes,
1) Synchronous
2) Asynchronous.

What is main di erence 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;
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
the complete operation is performed in 16 sequential steps. Close and accept
To nd out more, including how to control cookies, see here: Cookie Policy

https://sapabapfaq.wordpress.com/conversions/bdc/ 2/6
5/2/2019 BDC | SAP ABAP QUESTIONNARE

How do you save data in BDC tables?


The data in BDC tables is saved by using the eld name ‘BDC_OKCODE’ and eld
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 di erent 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 speci ed 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 o ers 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 nd 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 nd 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 lling the elds 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 eld 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.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
How does
To nd outumore,
knowincluding
that updation is successful
how to control insee
cookies, BDC?
here: Cookie Policy Close and accept
Using bdcmsgcol we can nd out it is success or not. After run the BDC PROGRAM (CREATING BATCH SESSION).
https://sapabapfaq.wordpress.com/conversions/bdc/ 3/6
5/2/2019 BDC | SAP ABAP QUESTIONNARE

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 le in application server. How can you upload it and separate it as


per di erent elds?
open dataset p_ le for input in textmode encoding default.
if sy-subrc = 0.
do.
read dataset p_ le into w_rec.
if sy-subrc = 0.
split w_rec at ‘,’ into wa_ nal- d1
wa_ nal- d2
.
.
.
append wa_ nal to i_ nal.
enddo.

You have 5lakh records to transfer to sap from at le. 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 le 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 ag 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 speci c
screen eld in which data need to be inserted.

What is di erence between batch input method and direct input


Direct input method Batch Input Method
1) We cannot send the elds 1) we can send elds as per our
according to our requirement requirement.
2) validations are done based 2) validations are done based
on pre-de ned 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
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To nd out more, including how to control cookies, see here: Cookie Policy Close and accept
clear count.

https://sapabapfaq.wordpress.com/conversions/bdc/ 4/6
5/2/2019 BDC | SAP ABAP QUESTIONNARE

What are the di erences 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 speci es 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 le: Export the data that is to be transferred, to a sequential le.
Create batch input program: ABAP/4 batch input program that will read the data to be
transferred from the sequential le.
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 elds before submitting to a BDC session?
Declare these elds in the internal table as characters and the length of the
eld should be same as the eld length of the eld’s data element. This internal table is
used to hold the data fetched from the sequential le using WS-upload function module

What is CTU_PARAMS?
This is a structure de ned 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 elds to in uence 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
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
calls
To ndto SET_TRANS_VAR for
out more, including activating
how and
to control deactivating
cookies, see here:the recording:
Cookie Policy among other
Close and accept
things, before CTU, there are call ‘SET_TRANS_VAR’ id ‘RECORDING’ eld ‘X’ and CALL
https://sapabapfaq.wordpress.com/conversions/bdc/ 5/6
5/2/2019 BDC | SAP ABAP QUESTIONNARE

‘SET_TRANS_VAR’ ID ‘ACTIV’ FIELD ‘X’, and after CTU, there is call ‘SET_TRANS_VAR’ id
‘RECORDING’ eld ‘ ‘.
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 eld name: MARA-MATNR (if several elds have the same name in the outer dynpro,
the BDC_SUBSCR line is needed)
· A eld name followed by a row number between parentheses, indicating a eld in a
table control or step loop (see FAQ about table control scrolling below): MARAMATNR(
01)
· Coordinates in a list (row/column): 07/04

Advertisements

REPORT THIS AD REPORT THIS AD

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To nd out more, including how to control cookies, see here: Cookie Policy Close and accept

https://sapabapfaq.wordpress.com/conversions/bdc/ 6/6

You might also like