Ads

What is the Difference between BDC and LSMW

What is the Difference between BDC and LSMW in SAP ABAP

For migrating data from Legacy system to SAP system in SAP ,we are using two ABAP tchniques which are LSMW( Legacy System Migration Workbench) and BDC(Batch Data Communication) .Both are data transfer methods from non-SAP to SAP system.ABAP developers using the BDC technique and Functional consultants using the LSMW technique .BDC can be done using recording or programming methods as well as LSMW can be done using step by step configuration of data .Using both methods ,we can import data from excel format and 'txt' format files.Now let us learn the one by one methods.

What is LSMW( Legacy System Migration Workbech)?

Now let us know what is the LSMW? ,is a Legacy System Migration workbench using which we can import the data from Non-SAP system to SAP system.It is specially designed for functional consultants who are not experts in the coding and it can be done in 14 steps to complete the LSMW for this we have to map the all steps and LSMW has  four ways to import data into SAP, and they are: BDC, Direct Input, BAPI(BO) and IDOC..Here steps are:

First of all ,go to transaction LSMW.

Enter Project name    : zs_lsmw.
      Subproject name : zs_lsmw.
      Object name     : zs_lsmw.

Now ,Click on Create entry  button.

It will ask for description, Give description for
      Project name    : zs_lsmw project.
      Subproject name : zs_lsmw subproject.
      Object name     : zs_lsmw object.

Click on Continue(f8) button.

It will takes u 2 the LSMW steps screen and first step radio button already selected. 

Step1   Maintain object attributes 

Step2  Maitain source structures 

Step3  Maitain source fields 

Step5  Maitain field mapping coversion rules 

Step6   Maintain fixed values, translations, user-defined routines

Step7   Specify files 

Step8   Assign files 

Step9   Read data 

Step10   Display read data 

Step11   Convert data

Step12  Display converted data 

Step13  Create batch input session 

Step14  Run batch input session 

Data upload using "LSMW" is succesfully completed.

Finally ,Go to SE11 and check whether  data is uploaded or not.


What is BDC(Batch Data Communication)?

Batch Data Communication is a programming technique which can be developed by ABAP developer with help of program or recording the transactions using the tcode SHDB .We can implement the this method in two ways that are Call Transaction method and Session method .Data is populated through the screens automatically by running the transaction into the internal table BDCDATA  .

 CALL TRANSACTION method can be done  to do the recording of the corresponding transaction  &  flat file in which data is stored. Flat file can be Text file or Excel File. In CALL TRANSACTION we need to be create the Error Log file.

In BDC ,we use structure BDCDATA for Batch Input, which has following fields.

PROGRAM  -   BDC module pool

DYNPRO-        BDC Screen number

DYNBEGIN-    BDC screen start                                                          

FNAM-            Field name

FVAL-              BDC field value

A BDCDATA structure can contain the batch input data for only a single run of a transaction

In CALL TRANSACTION method, we need to create Log for the Error Message, for this we use structure BDCMSGCOLL.

In Session Method, we need to record flat file in which data is stored. Flat file can be Text file or Excel File.

In Session Method following function Modules are used.

1.       BDC_OPEN_GROUP.

2.       BDC_INSERT.

3.       BDC_CLOSE_GROUP.

In  BDC we are using the structure BDCDATA  for Batch Input, Which has following fileds.

PROGRAM  -   BDC module pool

DYNPRO-        BDC Screen number

DYNBEGIN-    BDC screen start                                                          

FNAM-            Field name

FVAL-              BDC field value

A BDCDATA structure can contain the batch input data for only a single run of a transaction


Difference between LSMW and BDC

LSMW:

LSMW is basicaly designed for a fuctional consultant because they don not know coding.

LSMW can be done many ways for migrating data: Direct input ,BAPI,Idoc,Batch input recording. 

LSMW mapping is done by SAP

LSMW is basically for standard SAP application 

Coding need to done in BDC when compared to LSMW

LSMW is a more user-friendly tool, through which one can do the same work as the BDC.  14 steps to be done to complete lsmw . 

We cannot upload huge amount of data. Hence we use LSMW for updating or inserting below 5000 records and we use BDC to upload records more than 5000.

BDC:


Batch Data Communication (BDC) is the oldest batch interfacing technique .

BDC works on the principle of simulating user input for transnational screen, via an ABAP program. Typically the input comes in the form of a flat file. 

The ABAP program reads this file and populates the input data screen by screen into an internal table (BDCDATA). The transaction is then started using this internal table as the input and executed in the background.

In Call Transaction method, the transactions are triggered at the time of processing itself and so the ABAP developer  must do the error handling.

It can also be used for real-time interfaces and custom error handling & logging features. Whereas in Batch Input Sessions, the ABAP program generates a session with all the transnational data, and this session can be viewed, scheduled and processed (using Transaction SM35) at a later time. The latter technique has a built-in error processing mechanism too.

Batch Input (BI) programs still utilise the classical BDC approach but do not need an ABAP program to be written to format the BDCDATA. 

The user has to format the data using predefined structures and store it in a flat file. 

From this lesson ,we have learnt the what is BDC and LSMW and their definitions and difference between them.

BDC Call Transaction Method Program Tutorial

BDC Session Method Program Tutorial

BDC 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