Skip to end of metadata
Go to start of metadata

Debugging LSMW

LSMW object program can be debugged putting breakpoints.

In our Field Mapping/conversion, we can code BREAK-POINT at the very first field. The program execution will break when it reaches there.

We can also put soft breakpoints in the generated code. To view our generated code, we need to bring it up in the initial screen of our object.

To do so, go to User Menu and check the Display Read Program and Display Conversion Program checkboxes and press ENTER. Now  2 additional options will be seen on the initial screen of our Object. On double-clicking the Display Read Program or Display Conversion Program, the generated code will be seen. Then place a soft breakpoint.

Another option is to go to DISPLAY READ PROGRAM or DISPLAY CONVERSION PROGRAM.
Now we could see the ABAP editor with the code. We can place the breakpoint (soft break point using STOP button on application tool bar) wherever desired.

Difference between LSMW and BDC


The differences between LSMW and BDC are as follows:

LSMW is generally for normal SAP applications, while BDC is mainly for  any customized applications.

LSMW is a Non-SAP to SAP communication TOOL, whereas BDC is a SAP to SAP communication UTILITY.

LSMW(Legacy System Migration Workbench) is a more user-friendly tool, through which one can do the same work as the BDC. One just has to follow the 14 steps. LSMW offers four ways to import data into SAP, and they are:

 BDC, Direct Input, BAPI(BO) and IDOC.

BDC(Batch Data Communication) is basically a program which is either generated by SAP after a recording or programmed by a abaper. It's like running the transaction manually but all the data is populated in the screens automatically. It is a bit complex when the screen contains Table Controls.

LSMW provides various methods for migration of data, namely those of Direct Input, Batch Input recording and IDOC. BDC however simply makes use of recording. There are two ways of implementing  BDC, the Call transaction metod and the Session method.

In LSMW, mapping is taken care of with the help of SAP, whereas in BDC one has to provide explicit mapping directions.

In BDC, we can schedule the job, so the uploading can be done at the same time or later periodically while in LSMW it has to be done at once only. So through LSMW, one 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.

Coding is not very flexible in LSMW, whereas in BDC coding is very flexible and applications can be easily customized. this is mainly because LSMW is devised specially for functional consultants who do not perform coding, while BDC is mainly used by technical consultants, who perform coding. 

 

  • No labels