BDC Questions & Answers - SAP ABAP



What are the Function Modules associated with BDC Session Method?

A: The System provided Functional Modules are

  • BDC_OPEN_GROUP: It is used to create the session using the T-code SM35.
  • BDC_INSERT: It is used to insert the flat file data of the structure ‘BDCDATA’ with transaction into session.

Note: An export parameter “CTUPARAMS” is used to handle the screen resolution in case of table control to process the multiple line items in session method.

  • BDC_CLOSE_GROUP: It is used to close the opened batch input session.

Batch Input Vs Direct Input?

A: Direct Input (DI) programs work exactly similar to BI programs. But the only difference is, instead of processing screens they validate fields and directly load the data into tables using standard function modules. For this reason, DI programs are much faster (RMDATIND - Material Master DI program works at least 5 times faster) than the BDC counterpart and so ideally suited for loading large volume data. DI programs are not available for all application areas.

What is a Batch Input Session?

A: In this method transfer data from internal table to database table through sessions.

Session is intermediate step between internal table & database table. Unless session is processed, the data is not transferred to the database table.

 Data along with the action is stored in session i.e. data for screen fields, to which screen it is passed, program name behind it, and how next screen is processed.

What are the common steps involved in Data Migration/BDC?

A: Common steps involved in Data Migration: -

  • Record the Screen Flow of the required functional T-code using the T-Code ‘SHDB’.
  • Convert the recorded screen Flow into a temporary program.
  • Upload the Flat file data from the Legacy System (Local PC /Al11) into an Internal Table.
  • Convert the uploaded flat file data within the loop of flat file internal table(gt_flat_file).
  • Copy the system generated subroutines which starts with BDC_DYNPRO & BDC-FIELD from the temporary program & paste them within the loop of Flat file internal table.
  • Comment screen default values & pass the flat file data.
  • Use any one of either session/call transaction to update/migrate the data.

Note: An icon export is used to download the recording into local pc.

          An icon read form file is used to generate a program using the given recording file.

What is the syntax to make use of Call Transaction?

A: CALL TRANSACTION '<T-CODE>'

          USING < IT_BDCDATA >

  MODE <A/N/E>

   UPDATE <S/A>

  MESSAGES INTO <IT_BDCMSGCOLL>.

in above,

<T-CODE> is the required transaction code through which the flat file data to be migrated.

<IT_BDCDATA> is an internal table of type “bdcdata” structure

<A/N/E> are different data process modes

A = All screens, N = No screens, E = Error screens

Update<S/A> are synchronous and Asynchronous

   

What are the fields in BDCMSGCOLL structure?

A: BDCMSGCOLL is one structure in DDIC which contains the below fields


Field

Description

TCODE

BDC Transaction code

    DYNAME

Screen program name

DYNUMB

Screen number

MSGTYP

Message Type (S/E/W/I/A/X)

 MSGSPRA

Message language.

MSGID

Message ID

 MSGNR

Message Number

 

 What are the fields in BDC DATA structure?

A: It is a structure in DDIC which contains 5 fields.  


Field

Description

PROGRAM

BDC Module pool

DYNPRO

BDC Screen number

DYNBEGIN

BDC Screen Start

FNAM

field Name of the screen

FVAL

BDC Field Value(flat file)

 

Can you set up background processing using CALL TRANSACTION?

A: Yes, Using No Screen Mode in 'CALL TRANSACTION'

What are the differences between Session Method and Call Transaction Method?


Session

Call Transaction

1. The standard Function modules 'BDC_OPEN_GROUP’, 'BDC_INSERT' and 'BDC_CLOSE_GROUP' are used to work with the session method.

1. The ABAP statement CALL TRANSACTION ….is used.

2. The data is updated in Synchronously mode (Record by Record) & flat file data is processed Asynchronous.

2. The data is updated in both synchronous and Asynchronous modes. Flat file data is processed synchronously.

3. An Error LOG File is generated by the system to handle the errors.

3. The messages/errors are handled explicitly using the structure BDCMSGCOLL & the function modules 'FORMAT_MESSAGE’ or 'WRITE_MESSAGE’ or the table T100.

4. Session method can process any no of transactions at a time.

4. Call Transaction can process only one transaction at a time.

5. After processing the session through SM35 only, the database is updated.

5. Immediate database updating.

6. Session method is slower.

6. Call transaction method is faster

7. We can schedule the session method in background.

7. We can’t schedule the call transaction in background.

 

Synchronous: In this mode, the data is not continuously updated in case of error records.

Asynchronous: It is used to update the data continuously by skipping the error records.

 

Can we use call transaction and session method in the same program, Explain?

A: Yes, we can call, call transaction and session method in same program, generally we use call transaction for updating and session method for logging errors in the same program.

How to run the Session in Background?

A: The standard report program RSBDCSUB is used to schedule the Batch Input Sessions in        Background. (OR)

          We can also SUBMIT the program RSBDCSUB within the BDC session program itself.

Can you call a Bdc program from report program?

A: yes, we can call a Bdc program from a report using SUBMIT key word for standard program RSBDCSUB.

What Is BDCRECCX1?

A: In a standard program, generated from recording which contains all the re-usable declarations and also the re-usable Subroutine Definitions for all the BDC Programs.

How can you PRINT a session log file?

A: Execute RSBDCLOG. 

How to Export the Session?

A: From SM35 -> Utilities -> Export Session.


After running a BDC program in background, next day morning when you see the results, few   records are not updated (error records). What will you do then?


A: We will look into incorrect session, analyze the error screen, and reprocess the session after    correcting the data.

While running Bdc call transaction method for user defined table, all the records are saved except the last record. what’s the problem? can anybody clarify me?

A: first analyze the transaction by using SM35 and find the error and reprocess the same

from where the error has occurred.

How does u know that updating is successful in BDC?

 A: Using BDCMSGCOLL we can find out it is success or not

            After run the BDC PROGRAM (CREATING BATCH SEESION).

Using sm35 you can proceed batch session, if updating is successfully done then status showing green tick. if any error over there then it’s showing red tick.

If BDC is developed in Development system with no data, where do we do the recording?

A: We can do the recording in QA system that has data and export the recording from QA system to notepad and import it into development system's transaction recorder.

You are given functional specs for a BDC program and you need to decide whether to write a    method call transaction or a session. How u will decide?

A: Based on the amount of data (number of records to update), I will decide what method to use.

->If data is less the <10,000 -> use call transaction.

->If data is more than >10,000 records -> prefer session method.

How to handle screen Resolution?

  • Declare a structure data variable of the type ‘CTU_PARAMS’.
  • Pass the required data such as default size, display mode, update mode etc. to the defined ctu_params structure variable.
  • Use the populated structure variable of type ‘ctu_params’ with CALL TRANSACTION using an addition ‘OPTIONS’.

 How to handle Table Control in BDC?

A:  Table control is used to migrate/update the multiple records (line items) in BDC.

  • Press Page Down in the table control to record the function code for page down.
  • The next item no is the 1st item no when the Page Down is pressed.

  • Record the Screen flow with line items using the T-Code 'SHDB'.
  • Convert the recording into a program using the button program.
  • Make the changes in the original main program like,

  • Upload the flat file data which contains both Header & Item data.
  • Split the uploaded Flat file data into the Header and Item tables, using the Control Break Statements.

  • Set a loop to Header internal table then process the Header related data by copy & paste the system generated header related sub-routines from the temporary recording program
  • Set a loop to Item table data to process the multiple line items.
  • Make the Item number as dynamic by concatenating the screen field name with the screen number.'
  • Use the function code “p+” to handle page down in table control.
  • Use any one of methods with BDC_INSERT(Session) or CALL TRANSACTION to migrate the data from internal table GT_BDCDATA.

Note: The Header & Item data can be processed separately using the control break statements without splitting the flat file data.

  • The control break statements can also be used to process Header & Item data separately by avoiding nested loops.

What are the problems in processing batch input sessions? How is batch input process different from processing on line?

A: 1) If the user forgets to opt for keep session then the session will be automatically removed      from the session queue (log remains). However, if session is processed we may delete it      manually.

        2) If session processing fails, data will not be transferred to SAP database table.

 

 

 

Comments

Post a Comment

Popular posts from this blog

SAP ABAP-Internal Table Operations and Example Program

HR ABAP Interview Questions and Answers

BDC (Batch Data Communication) - SAP ABAP