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

BDC DATA MIGRATION

The document outlines the steps involved in Data Migration and BDC (Batch Data Communication) processes, including the use of LSMW (Legacy System Migration Workbench) and the differences between LSMW and BDC. It details the methods for data migration, error handling, and the use of various function modules and transaction codes. Additionally, it discusses the handling of screen resolution, table control, and batch input sessions, along with best practices for deciding between call transaction and session methods based on data volume.

Uploaded by

gyanadaps
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

BDC DATA MIGRATION

The document outlines the steps involved in Data Migration and BDC (Batch Data Communication) processes, including the use of LSMW (Legacy System Migration Workbench) and the differences between LSMW and BDC. It details the methods for data migration, error handling, and the use of various function modules and transaction codes. Additionally, it discusses the handling of screen resolution, table control, and batch input sessions, along with best practices for deciding between call transaction and session methods based on data volume.

Uploaded by

gyanadaps
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

BDC DATA

MIGRATION/CONVERSION
❖ What are the common steps involved in Data Migration/BDC?
➢ 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 the flat file internal table
(gt_flat_file).
■ Copy the system generated subroutines which start 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 a local pc.
■ An icon read form file is used to generate a program using the given recording file.
❖ What is LSMW?
➢ Legacy System Migration Workbench.
➢ It is the system provided tool to migrate or convert the legacy system data.
➢ The T-Code 'LSMW' is used to work with this tool.
➢ An icon export is used to download the recording into Local PC.
➢ An option read from file is used to generate a program using the given recording file.\
❖ What are the steps for LSMW?
➢ There are a total of 14 steps in LSMW.
■ Maintain object attributes
■ Maintain source structures
■ Maintain source fields
■ Maintain structure relations
■ Maintain field mapping conversion rules
■ Maintain fixed values, translations & user-defined routines
■ Specify files
■ Assign files
■ Read data
■ Display read data
■ Convert data
■ Display converted data
■ Create batch input session
■ Run batch input session
❖ What are the differences between LSMW and BDC?

LSMW BDC

It is the system provided tool. It is the Utility to develop a program.

Doesn’t require any programming It requires programming knowledge.


knowledge.
The data can be imported in different The data is processed or migrated in
import methods such as Batch Input Batch Input Method only
Recording, BAPI and IDOC.

The Field mapping is done The Field mapping should be done


automatically by The System. manually by Passing the Flat data.

The T-Code LSMW is used. The T-Code SM35 is used to


develop BDC program

Mostly used for both Huge & small BDC can be used for Small amount of
amount (Master) of data. data only.

LSMW is possible for custom screens / BDC can be used for custom
standards with custom fields of screens/custom fields of application
applications. also.
➢ SHDB: It is the T-code used to record the screen flow as the T-codes.
❖ What are the differences between Session Method and Call Transaction
Method?

Session Call Transaction


The standard Function modules The ABAP statement CALL
'BDC_OPEN_GROUP’, 'BDC_INSERT' and TRANSACTION
'BDC_CLOSE_GROUP' is used to work ….is used.
with the session method.

The data is updated in The data is updated in both


Synchronously mode (Record by synchronous and Asynchronous modes.
Record).
An Error LOG File is generated by the The messages/errors are manually
system to handle the errors. handled explicitly using the structure
BDCMSGCOLL & the function modules
'FORMAT_MESSAGE’ or 'WRITE_MESSAGE’
or the table T100.
Session method can process any no of Call Transaction can process
transactions at a time. only one transaction at a time.

After processing the session Immediate database updation


through SM35 only, the
database is updated.
Session method is slower. Call transaction method is faster

We can schedule the session We can’t schedule the call


method in background. 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.
❖ Is it possible to write an ABAP code in LSMW?
➢ Yes, by clicking on the change(pencil) icon that appears beside the recording structure
field.
❖ What are the Function Modules associated with the BDC Session Method?
➢ 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 “CTUPARMS” is used to handle the screen resolution in
case of table control to process the multiple line items in the session method.
➢ 'BDC_CLOSE_GROUP’: It is used to close the opened batch input session.
❖ How to handle messages in Call Transaction Method?
➢ Get the message details such as message type, message number into an internal
table (gt_bdcmsgcoll) of the type BDCMSGCOLL using an addition “….MESSAGES
INTO” with CALL TRANSACTION statement.
➢ Set a loop into an internal table (gt_bdcmsgcoll) of the type “bdcmsgcoll”.
➢ Use any of the function modules “FORAMT_MESSAGE”/”WRITE_MESSAGE” to get
the corresponding message text, since the structure “BDCMSGCOLL” does not have
any message text field.
➢ Display the populated messages with message text either list or ALV.
➢ Note: The standard table ‘T100’ can also be used to populate the message text.
❖ What is the syntax to make use of Call Transaction?
➢ CALL TRANSACTION '<T-CODE>' USING <gt_bdcdata> MODE <A/N/E>
UPDATE<S/A> MODE
<A/N/E> UPDATE <S/A> MESSAGES INTO <GT_BDCMSGCOLL>.
➢ Here <T-CODE> is the required transaction code through which the flat file data to be
migrated.
➢ <gt_bdcdata> is an internal table of type “bdc data” structure
➢ <A/N/E> are different data process modes
➢ A = All screens, N = No screens, E = Error screens
➢ <S/A> are the different update modes
❖ Which method do you prefer to migrate the data if the method is not
mentioned?
➢ CALL TRANSACTION.
❖ What are the fields in BDCMSGCOLL structure?
➢ 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 (E/W/I/S….)

** MSGSPRA Message language

MSGID Message ID

MSGNR Message Number

❖ What are the fields in BDC DATA structure?


➢ 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?


➢ Yes, Using No Screen Mode in 'CALL TRANSACTION'
❖ Can we use call transaction and session method in the same program?
Explain?
➢ Yes, we can call, call transaction and session methods in the 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?
➢ 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.
❖ What Is BDCRECCX1?
➢ 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?
➢ Execute RSBDCLOG.
❖ How to Export the Session?
➢ From SM35 ---> Utilities ---> Export Session.
❖ While Uploading a flat file through BDC Call Transaction, The system (not
SAP Server i.e. the currently working Machine) suddenly gets CRASHED .
How do I know how many records have been updated?
➢ Even though it is BULK Data Processing, updating the database is always record by
record only. So After Calling the Transaction, Maintain the status of the calling
transaction into one custom table including the record details. So that we can know the
custom table for the latest details.
❖ After running a BDC program in the background, the next morning when
you see the results, few records are not updated (error records). What will
you do then?
➢ We will look into the incorrect session, analyze the error screen, and reprocess the
session after correcting the data.
❖ 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 will you
decide?
➢ Based on the amount of data (number of records to update), I will decide what method
to use.
➢ Ex: If data is less than 5000, I will use a call transaction. If data is more than 5000
records I prefer a 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 additional ‘OPTIONS’.
❖ How to handle Table Control in BDC?
➢ Table control is used to migrate/update the multiple records (line items) in
BDC.
➢ Note: 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 the batch input process different from processing
online?
➢ If the user forgets to opt for a keep session then the session will be
automatically removed from the
session queue (log remains). However, if a session is processed we may
delete it manually.
➢ If session processing fails, data will not be transferred to SAP database table.

You might also like