LSMW (Legacy System Migration Workbench)

LSMW is a standard tool provided by SAP. Normally, LSMW is used for data migration. But in some case that we have to create/update huge volume of data, LSMW is the good choice as well. SAP provides 4 types of LSMW which are:

1. Standard Batch/Direct Input

Standard Batch/Direct Input is a program provided by SAP. To use this method, you have to know object, method and program name (SAP required to enter these parameters before start execution). Moreover, you have to create structure as SAP required.

The advantages of this method are:

1) you can create/update data in the same time.

2) you can update many record of sub-information in the same time such as create/update/delete bank information in vendor master.

3) You can post document with many line items.

Each document doesn’t need to have the same no. of line item. This method also have disadvantage that you may take much more time to create structure and read document before starting.

2. Batch Input Recording

Batch Input Recording is a method that you have to record your own structure. This method is easy to start. You just do what you exactly do when you create/update data in system. System will record all field that you click and update value. Then, you just create file as same as the structure of recording and let system update. The advantage of this method is easy to understand and use. But it’s not flexible enough to update complicate data.

3. Business Object Method 

4. IDoc

The mostly used method is Standard Batch and Batch Input Recording.

These 2 methods are easy and cover most of transactions in system.

T-Code: LSMW

1. Create Project, Sub-Project and Object

Pasted Graphic 4.tiff

Pasted Graphic 5.tiff

Pasted Graphic 6.tiff

Pasted Graphic 6.tiff

Pasted Graphic 8.tiff

If you never have LSMW Project before, you have to create LSMW’s Project first. It’s like you create a folder in system to keep your LSMW object.

2. Maintain Object Attributes

Pasted Graphic 9.tiff

Once object is created, the next step is to setup LSMW. The first step is to maintain object attributes. In this step, you have to choose LSMW method. You will see 4 methods here. Each method has different advantages as I mention above. For now, start with “Standard Batch/Direct Input”.

Assign Object  = 0040 – Vendor Master

Assign Method  = 0001 – Standard

Program Name and Program Type will be assigned automatically. Click button <save> and press F3 to go back to main screen. You will see that system update your last action for each step.

3. Maintain Source Structures

Pasted Graphic 10.tiff

In this step, you have to create structure. For recommendation, your structure should follow standard structure. If you don’t know how to check standard structure, you just double click in step “Maintain Structure Relations” and you will see standard structure.

4. Maintain Source Fields

Pasted Graphic 11.tiff

You create fields under structure that is created in above. You don’t need to create all fields but just create only the fields that you need to update value.

5. Maintain Structure Relations

Pasted Graphic 12.tiff


You have to assign source structure in previous step to standard structure. System will use this mapping for input value.

6. Maintain Field Mapping and Conversion Rules

Pasted Graphic 13.tiff

In this step, you can do a mapping between your structure and standard structure in level of field. You don’t need to do a mapping manually. System provide mapping function “Auto-Field Mapping or press <Ctrl + Shift + F3>” (Menu Bar >> Extras >> Auto-Field Mapping). For recommendation, Auto-Field Mapping work from field name. So, it would be an advantage if you create structure with the same name as standard structure.

7. Maintain Fixed Values, Translations, User-Defined Routines (Nothing to do here)
8. Specify Files

Pasted Graphic 14.tiff

Right now you are almost finishing your LSMW. This step, you have to create how system read your input file. SAP allows you to upload file from your PC and SAP directory. You just click on the type of input file that you want and press button ‘Create’.

9. Assign Files

Pasted Graphic 15.tiff

In this step, you have to assign input file from your PC/SAP directory to your structure. System will know where to read input file from this step.

10. Read Data

Pasted Graphic 16.tiff

Pasted Graphic 17.tiff

Execute this step to read data from input file. System read data from your file that assign in previous step. Once system read data successfully, it shows message as below:

11. Display Read Data

Pasted Graphic 18.tiff

Pasted Graphic 19.tiff

To make sure that input data is correct, system allows you to display input data in this step.

12. Convert Data

Pasted Graphic 20.tiff

Pasted Graphic 21.tiff

Press execute button to convert data. Convert data means system convert input data to fit with standard structure. Please note that in this step you will see at least 3 records (refer to step  5).

13. Display Converted Data

Pasted Graphic 22.tiff

Check your input data again. In this step you will see that your input data is split into 3 structures. Check each structure carefully. If everything is OK! Then go to next step.

14. Create Batch Input Session

Pasted Graphic 23.tiff

In this step, system will let you create batch session. You just follow the standard parameter by press execute button only.

15. Run Batch Session

Pasted Graphic 9.tiff

This is the last step that leads you to the new screen for running batch session. It’s the same screen as SM35. You just select your batch session and press ‘Process / Execute’.


Average Rating
0 out of 5 stars. 0 votes.
My Rating:


Leave a Reply

Your email address will not be published. Required fields are marked *