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

SAP ABAP BDC Interview Questions

This document discusses Batch Data Communication (BDC) interview questions. It begins by explaining what BDC is and why it is used to transfer large volumes of data from non-SAP or legacy systems into SAP systems. It then provides details on the two main BDC methods - Session Method and Call Transaction Method - and compares their differences. The document also discusses how to handle errors in each method and introduces other alternatives to BDC, such as using BAPIs and LSMW for data uploads. Finally, it provides sample code to process errors in the Call Transaction Method and explains the use of the RSBDCSUB program to schedule background processing of BDC sessions.

Uploaded by

Mandy banna
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views

SAP ABAP BDC Interview Questions

This document discusses Batch Data Communication (BDC) interview questions. It begins by explaining what BDC is and why it is used to transfer large volumes of data from non-SAP or legacy systems into SAP systems. It then provides details on the two main BDC methods - Session Method and Call Transaction Method - and compares their differences. The document also discusses how to handle errors in each method and introduces other alternatives to BDC, such as using BAPIs and LSMW for data uploads. Finally, it provides sample code to process errors in the Call Transaction Method and explains the use of the RSBDCSUB program to schedule background processing of BDC sessions.

Uploaded by

Mandy banna
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

8/8/13 BDC Interview Questions

BDC Interview Questions


What is BDC and why do we use BDC ?

BDC ( Batch Data Communication ) also known as batch input is a


technique by which large volumes of data can be transferred from
Non Sap or Legacy systems to SAP systems.

[http://4.bp.blogspot.com/-see9jt1s2e8/T-x49NpX-
hI/AAAAAAAAHGs/AqXvA6v6JI8/s1600/Untitled+%2528Network+diagram%2529.png]
Example: A Legacy system that is to be replaced by SAP has say 1000
Customers , 2000 vendors and 3000 materials. All this data needs to
be transferred to SAP . In such cases , We can use BDC.

If the old system is replaced by SAP, such a transfer is


called Conversion.
If the old system runs along with SAP, in that case the transfer is called
an Interface.

The two methods for BDC are:


Session Method
Call TRANSACTION Method
CALL DIALOG (Outdated)

ABAP interview questions on BDC:


Important:
Question 1:What is the difference between Call Transaction
Method and the Session method ?

Session Method Call Transaction


Session method id generally Call transaction method is when
used when the data volume is the data volume is low
huge.

sap-interview-questions-and-answers.blogspot.in/2012/06/bdc-interview-questions.html 1/7
8/8/13 BDC Interview Questions

Session method is slow as Call Transaction method is


compared to Call transaction. relatively faster than Session
method.
SAP Database is updated when SAP Database is updated during
you process the sessions. You the execution of the batch input
need to process the sessions program.
separately via SM35.
Errors are automatically Errors should be handled in the
handled during the processing batch input program.
of the batch input session.

Important:
Question 2: How do you do BDC for a table control?
With other things as usual, there is a special trick that you have to use
while doing BDC for table control.
You need to use the BDC OKCODE '=P+'.
Its the BCD_OKCODE for Page down that can be used for scrolling
down in table control.

Important:
Question3: 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 Background and Foreground
available in BAPI. processing options are available
for BDC.
BAPI would generally used for BDCs would be preferred for
small data uploads. large volumes of data upload
since background processing
option is available.

SAP Interview Ques


For processing errors, the
… search
Return Parameters for BAPI
Errors can be processed in SM35
for session method and in the
should be used.This parameter batch input program for Call
returns exception messages or Transaction method.

sap-interview-questions-and-answers.blogspot.in/2012/06/bdc-interview-questions.html 2/7
8/8/13 BDC Interview Questions

SAP ABAP Interview Qu…


success messages to the calling
program.
SAP ABAP Interview Qu…

SAP Webdynpro ABAP I… Question 4: How do you process errors in Call Transaction
method ?
BDC Interview Questions
Let's have a look at the syntax for CALL TRANSACTION method.
Sample code:
SAP ALE IDocs intervie…
DATA: BEGIN OF G_T_MESSTAB OCCURS 0.
INCLUDE STRUCTURE BDCMSGCOLL.
SAP Webdynpro ABAP I… DATA: END OF G_T_MESSTAB.

CALL TRANSACTION 'MB11'


SAP Web Dynpro ABAP …
USING G_T_BDCDATA
MODE 'E'
UPDATE 'S'
MESSAGES INTO G_T_MESSTAB.

All the error messages will be trapped inside G_T_MESSTAB.

Question 5: What is the use of program RSBDCSUB?


There are two ways to process the BDC sessions:
1) Go to SM35 ---> Choose session ---> hit process.
Now See Question no. 10.
2) Use program RSBDCSUB.
RSBDCSUB schedules the session to be processed in background.

Let's take an example to understand this.

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.
Send feedback
Question 6: What is the structure of the BDC table?

The BDCDATA consists of the following fields:


§ PROGRAM [CHAR 40] - Online program name.
§ DYNPRO [NUMC 4] - Screen number.
§ DYNBEGIN [CHAR 1] - Flag to indicate the start of a new screen.
§ FNAM [CHAR 132] - Field name of a screen field to be filled with data.
§ FVAL [CHAR 132] - The actual value to be filled into the specified screen field.

Sample Screenshot:
sap-interview-questions-and-answers.blogspot.in/2012/06/bdc-interview-questions.html 3/7
8/8/13 BDC Interview Questions

[http://4.bp.blogspot.com/-mXPaoNnamzs/T-
yZB2eWN7I/AAAAAAAAHG4/Bqzx2vacOmc/s1600/BDCDATA.PNG]
BDCDATA table structure

Question 7: What is the difference between BDC_OKCODE and


BDC_CURSOR?

BDC_OKCODE: is used for storing commands during the recording.


like '/00' is the command for 'ENTER' Key.
BDC_CURSOR: contains the cursor position. it contians the field in
which cursor will be.

Example code:
perform bdc_field using 'BDC_CURSOR'
'PROJ-PSPID'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.

Question 8: What are the 3 methods that we use in sequence in a


Batch input session method ?

1) BDC_OPEN_GROUP for opening the Batch Input Session


2) BDC_INSERT for inserting the transactional data into SAP
3) BDC_CLOSE_GROUP for closing the Batch Input Session

[http://3.bp.blogspot.com/-ciupAsDttL8/T-
ygRIdSISI/AAAAAAAAHHE/tDioM1uXprs/s1600/BDC1.PNG]

If there are n records , the BDC_INSERT method should be called n


times.
sap-interview-questions-and-answers.blogspot.in/2012/06/bdc-interview-questions.html 4/7
8/8/13 BDC Interview Questions

BDC_OPEN_GROUP and BDC_CLOSE_GROUP are called only once.

General Information about a session is stored in table APQI.


Transaction data for a session is stored in table APQD.

Question 9: What is your approach for writing a BDC program?

Identify the Tcode and do the recording in SHDB to populate the


BDCDATA.

[http://2.bp.blogspot.com/-
_q1SuOwWhiM/T-yyvp9GNrI/AAAAAAAAHHk/BMkHj2FtWME/s1600/SHDB.PNG]

Once the recording is done , one can Transfer it to the Batch input
program.

[http://3.bp.blogspot.com/-GkiGntG89SE/T-
yxwlPQIRI/AAAAAAAAHHc/9O9nSxkyd9I/s1600/BDC.jpg]

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.

Question 10: How do you process errors in Session method ?


You can go to Transaction SM35 , Choose the session name and click on Process.

sap-interview-questions-and-answers.blogspot.in/2012/06/bdc-interview-questions.html 5/7
8/8/13 BDC Interview Questions

[http://1.bp.blogspot.com/-Fb5wS9UOeN4/T-yj8Ji9x4I/AAAAAAAAHHQ/kHjPx8-
mupU/s1600/BDC2.PNG]

Question 11: What are the different modes of processing batch


input sessions?

The three modes are:

Foreground

Display Errors Only

Background

Question 12: What is the difference between Synchronous and


Asynchronous Update ?
In Synchronous update , the database is updated before the next
transaction is taken for processing in a batch input.
In Asynchronous update , the system doesn't wait for updating the
database before the next transaction is taken for processing in a batch
input.

Question 13: What is the transaction for Recording BDC ?



The Tcode is SHDB.

Question 14: How do you read files from the Application server ?

You can use the commands:
OPEN DATASET ---> opens the file(dataset) either in read /write
mode.
READ DATASET ---> Read the file
CLOSE DATASET ---> Close the dataset once the date has been read .

Question 15: How do you read files from the presentation server ?

sap-interview-questions-and-answers.blogspot.in/2012/06/bdc-interview-questions.html 6/7
8/8/13 BDC Interview Questions

You can use the Function Modules :


GUI_UPLOAD --> To read data from file into an internal table
GUI_DOWNLOAD --> To write data from internal table to a file on presentation
server

If you found the post helpful , consider hitting the Google plus button------>

Thanks and all the best for your interview :).

Posted 29th June 2012 by Amby


Labels: BDC

sap-interview-questions-and-answers.blogspot.in/2012/06/bdc-interview-questions.html 7/7

You might also like