Ads

Interview Questions on SAP ABAP BDC

Interview Questions on SAP ABAP BDC(Batch Data Communications)

These Questions on BDC helpful for any fresher and experienced SAP ABAP Consultants and which are collected  from real time interviews faced in the MNC companies.

What is BDC and use of it ?

BDC ( Batch Data Communication ) is a process of  batch input technique .It can used to migrate data from Non-SAP or Legacy System to SAP System .This Require when client converting his business applications into SAP. 
Interview Questions on SAP ABAP BDC


The two methods for BDC are:
Session Method
Call TRANSACTION Method
CALL DIALOG (Outdated)

What is the difference between Call Transaction  and the Session method ?

Session Method
Session method is used when the data volume is huge.
Session method is slow.
SAP Database is updated when you process the sessions. You need to process the sessions separately via SM35.

Errors are automatically handled during the processing of the batch input session.

Call Transaction

when the data volume is low

Call Transaction method is fast.

SAP Database is updated during the execution of the batch input program.

Errors are handled in the batch input program.

What is LSMW


LSMW is a  tool that supports the transfer of data from non-SAP systems ("Legacy Systems") to SAP  R/3 systems. This can be a one-time transfer as well as a periodic one.

LSMW also supports conversion of data of the legacy system in a numerous way. The data can then be imported into the SAP R/3 system via batch input, direct input, BAPIs or IDocs.

Furthermore, the LSM Workbench provides a recording function that allows generating a "data migration object" to enable migration from any required transaction.


The main functions of the LSM Workbench are:
Import data (legacy data in spreadsheet tables and/or sequential files)
Convert data (from source format to target format)
Import data (into the database of the R/3 application)
To start the LSMW workbench use transaction LSMW

TCODE  -  LSMW.

What is the Syntax of BDC call Transaction method?

Syntax:
CALL TRANSACTION <tcode>
 USING <bdc_tab>
 MODE  <mode>
 UPDATE  <update>
<tcode> : Transaction code
<bdc_tab> : Internal table of structure BDCDATA.
<mode> : Display mode:

What is the message table in BDC CT?

The MESSAGES specification indicates that all system messages issued during a CALL TRANSACTION USING are written into the internal table <MESSTAB> . The internal table must have the structure BDCMSGCOLL .
Example
You can record the messages issued by Transaction TFCA in table MESSTAB 

SY-MSGID       Message-ID
SY-MSGTY      Message type (E,I,W,S,A,X)
SY-MSGNO      Message number
SY-MSGV1       Message variable 1
SY-MSGV2       Message variable 2
SY-MSGV3       Message variable 3
SY-MSGV4      Message variable 4

What are Returning Values of Message table in the call transaction?


     0        Successful
<=1000   Error in dialog program
> 1000   Batch input error

What are the Display MODES in call transaction?


A - is all screen mode. All the screen of transaction are displayed.
N - is no screen mode no Screen is displayed when you executed the transaction.
E - is error screen Only those Screen are displayed where in you have error record.

What are UPDATES parameters in Call Transaction method?


S - is for Synchronous updates in which if we change data of one table then all the related tables get updated and them SY-SUBRC is returned i.e., SY-SUBRC is returned for once and all.

A - is for asynchronomous update when we change data of one table, the Sy-subrc is returned. And then updation of other affected tables takes a place so if system fails to update other tables still sy-subrc returned is O. 

 How do you do BDC for a 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.

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.

BAPI

BAPI is faster than BDC.
BAPI directly updates database.
No such processing options are available in BAPI.
BAPI would generally used for small data uploads.

For processing errors, the Return Parameters for BAPI should be used.This parameter returns exception messages or success messages to the calling program.

BDC

BDC is relatively slower .

BDC runs through all the screens as a normal user would do and hence it is slower.

Background and Foreground processing options are available for BDC.

BDCs would be preferred for large volumes of data upload since background processing option is available.

Errors can be processed in SM35 for session method and in the batch input program for Call Transaction method.

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.

Does the BDC-INSERT function allow multiple transactions to be processed by SAP?


Yes.

What is the t-code to display batch input sessions?

SM35


What is the t-code for transaction recorder?


SHDB

If i want to excute a program only in background not in forground is there any option for this?


In Session method, in SM35 when you process the batch, you need to select the radio button Background, 

By using SE38, we can run the program in back ground. it wil generate a spool number.

What do you do with errors in BDC batch session?

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


Can data be put directly into the database?

Ans :- No, only after the data has been entered via transaction.

 How do you process errors in Call Transaction method ?


Let's have a look at the syntax for CALL TRANSACTION method.
Sample code:
DATA: BEGIN OF G_T_MESSTAB OCCURS 0.
        INCLUDE STRUCTURE BDCMSGCOLL.
DATA: END OF G_T_MESSTAB.

CALL TRANSACTION 'MB11'
    USING G_T_BDCDATA
          MODE 'E'
          UPDATE 'S'
          MESSAGES INTO G_T_MESSTAB.

All the error messages will be trapped inside G_T_MESSTAB.

What is the use of program RSBDCSUB?

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


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.


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.

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


If there are n records , the BDC_INSERT method should be called n times.
BDC_OPEN_GROUP and BDC_CLOSE_GROUP are called only once.

What is your approach for writing a BDC program?


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.


How do you process errors in Session method ?

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

What are the different modes of processing batch input sessions? 


The three modes are:

Foreground

Display Errors Only

Background


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.

What is the transaction for Recording BDC ?


The Tcode is SHDB.


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 .


How do you read files from the presentation server ?

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

 How do you find the information on the current screen?

The information on the current screen can be found by SYSTEM à
STATUS command from any menu.


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

 What is the last entry in all BDC tables?


In all BDC tables the last entry is to save the data by using the field name BDC_OKCODE and a field value of ‘/11’.

How do you find the transaction number, program number and field names?

Ans :- Transaction no.,program no. – System -> status
Field names - F1, Technical help

What are the available OK Codes that can be utilized during batch input processing?

/n – terminates current batch input transaction and marks as incorrect.
/bdel – delete current batch input transaction from session.
/bend – terminate batch input processing and mark session as incorrect.
/bda – change display mode to process the session on screen instead of displaying only errors.
/bde – change display mode to display only errors instead of processing the session on the screen.


What is the effect of the BDC_CURSOR field name in the BDC table?

Ans :- 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, whereas session is used to perform huge database updations using more than one transaction and which will last for a long time.

 What are different types of Update modes

In BDC’s we have two types of updation modes –
Synchronous
Asynchronous

What is Synchronous Database update?

During the processing, no transaction is stored until the previous transaction has been written to the Database. This is called Synchronous Database update.

Also Read

Real Time ALV interview Questions

Comments

Popular posts from this blog

BADI Interview Questions in SAP ABAP

Sample SAP ABAP Programming Examples for Practice

Module Pool Programming Interview Questions and Answers in SAP ABAP

Step by Step tutorial on BDC Session Method Program in SAP ABAP

SAP ABAP Interview Questions and Answers for 10 Years Experienced