SAP LSMW Hands on – Step by Step Instructions

The LSMW (Legacy System Migration Workbench) is a free SAP-based tool that supports the one-time or periodic transfers of data from non-SAP systems to SAP. The LSMW can be used in conjunction with the Data Transfer Workbench. The LSMW assists in organizing your data migration project and guides you through the process by using a clear sequence of steps. The most common conversion rules are predefined. Reusable conversion rules assure consistent data conversion for different data objects.

LSMW an abbreviation for Legacy System Migration Workbench is a tool in SAP which is used to migrate Legacy data into SAP. It is a very important tool and easy to learn and master it. LSMW has a recording tool which can record the transaction and the fields to be uploaded. Thus upload of master data and transaction data is made very simple in this tool. You can use this tools in almost all modules for upload of master data and too some extent transaction data also.

The LSMW performs the following steps:

  • Reads the legacy data from one or several files (such as spreadsheets or sequential files)
  • Converts the data from source format to target format
  • Imports the data using standard interfaces (Batch Input, Direct Input, BAPI, IDoc, etc.)

Documents to get you started on LSMW:

Quick Reference Guide on LSWM
Examples:
Processing IDOC (Powerpoint)
Customer Adress via BAPI
Material Master IDOC
Open Items via Direct Input
Customer Master Creation & Some LSMW Exercises.

Here is one of the LSMW Project to walk you through all the steps

Here you have to first Define Project, Sub Project and Object. It is mainly for grouping the objects. One can have multiple subprojects and Object in a Project.

Execute the transaction and you will get navigated to the second screen: LSMW Work Bench. Here one can choose the required steps by pressing the ‘User Menu’ button.

The following 14 steps are sufficient for Support person for the LSMW update.

Step1. Maintain Object Attributes

Define the method of upload. i.e. batch recording , direct update , BAPI etc. Go inside this step and choose the radio button for the options. This document explains only about the transaction recording method.

One can toggle between the Display or change option using the standard button. Select the object type and Import method as ‘Batch Input Recording’.

Once you have selected this click on the overview button so that you can go to the recoding overview

Example of a recording

After recording default those fields that you want to update /use in batch update.

Step 2. Maintain Source Structures

Give any name, which can be easily identifying the input data structure. (It is equivalent to defining an internal table in a ABAP program). Can define multiple structures also (if required).

Step3. Maintain Source Fields

Define all those fields that you are giving in the input file here. The order should match the order of fields in the file. Otherwise it will get updated into the wrong fields. (Most of the errors might be in this step)

Step 4. Maintain Structure Relations

Define the source and destination structure relation ships.

Step 5. Maintain Field Mapping and Conversion Rules.

You have to define the mapping rules.., eg. Customer = customer. Or if any default value has to be passed , or some fixed value is given like that ( company code can be a default value if processing for a particular company code.

After making all the mappings and initialization you can even do a syntax check to see your mappings are correct or not

Step 6. Specify Files

You have to specify the input file location in this step.

Step 7. Assign Files

Assign the physical file path to the structure

Step 8. Read Data

Reading the file to the source structure

Step 9. Display Read Data

This is very useful step where we can review the field values that got read.

Step 10. Convert Data

Converting the source structure data to the destination by applying the conversion rules that have mentioned in step 4 and step 5.

Step 11. Display Converted Data

Also useful for checking the values converted.

Step 12. Create Batch Input Session

This will create a BI session in SM35.

Step 13. Run Batch Input Session

This step will call SM35 .One can run the session in SM35. You can run in foreground, Error mode or background. Preferably run in Foreground for testing some few records…once confirmed the update then run in back ground.

How to transport the LSMW project from Test to Production system;

The LSMW projects can be transported between systems via export /Import method. You can export the entire project as a text file and that can be imported to another system.

In MSS no changes are allowed, so before importing to MSS , give the MSS file path in MST and then do an export .

Comments