top of page

LSMW Step-by-Step Guide in SAP

In the world of SAP, data migration plays a critical role during implementation, rollout, and support projects. One of the most popular tools provided by SAP for this purpose is LSMW (Legacy System Migration Workbench).


During SAP implementations, rollouts, or data migration phases, one of the major challenges is bringing legacy data into the SAP environment without compromising accuracy and consistency. LSMW bridges this gap by:

  • Simplifying the data load process

  • Allowing functional consultants to perform uploads without ABAP

  • Supporting multiple data migration techniques


Common Use Cases for LSMW

Here are a few common business scenarios where LSMW is widely used:

Use Case

Object Type

T-code

Material Master Upload

Master Data

MM01

Asset Master Upload

Master Data

AS01

Purchase Order Upload

Transactional Data

ME21N

Financial Postings

Transactional Data

FB01


>> Go to Transaction Code LSMW


Define Project, Subproject, and Object :


Project : A Project is the main container or top-level category for your LSMW task, you can create different projects for different clients, modules, or business processes.

Subproject : A Subproject allows you to break down your project into smaller components or phases. Useful when you have multiple data sets or when you want to separate work by teams or functions.

Object : An Object refers to the specific data you are migrating within that subproject. This is where you define the actual data structure and mapping task.

Level

Name

Purpose

Project

FI_MIGRATION

Migration related to Financial Accounting

Subproject

GL_MASTER

Focused on GL Master Data

Object

FS00_UPLOAD

LSMW Object to upload GL Master Data


STEP 1 : Click on Create to create Project > Subproject > Object

LSMW

STEP 2 : Click on Execute button.

LSMW




NOTE: In LSMW the Steps are always in Display mode by default so always change it to Edit mode to make any changes in in every step


There are typically 14 Steps in the LSMW process. Below is a simplified overview:



  1. Maintain Object Attributes

Choose the import method (e.g., Batch Input Recording).


Here, you define the technical method you’ll use to transfer data from your legacy system into SAP.

You’ll select one of the following methods:

  • Batch Input Recording (most commonly used)

  • Standard Batch/Direct Input

  • BAPI (Business Application Programming Interface)

  • IDoc (Intermediate Document)


STEP 3 : Select Define Object Attributes and click on Execute

LSMW

STEP 4 : After changing the screen to Change Mode > Select Batch Input Recording then click on Recordings Overview Button

LSMW

STEP 5 : Click on create button and Provide the Recording Name & Description then Transaction Code of Screen for which you want to bring Create/Change.

LSMW

STEP 6 : Create/Change in the T code Screen Entered so that the system can Capture it.

LSMW

STEP 7 : Click on Default All then SAVE and Go back.

LSMW

STEP 8 : Click on Recording Field or Select the Proper Recording saved from F4.


  1. Maintain Source Structures

To define the structure of your input (legacy) data file - basically, how your data is organized before it's mapped to SAP fields.


STEP 9 : Select Define Source Structures and Execute.

LSMW

STEP 10 : Click on Create & Enter the Source Structure field Name and Description.

LSMW

  1. Maintain Source Fields

Map the structure fields to individual fields from the legacy system.


STEP 11 : Before creating the Source Field, select Object Overview then click on Table

LSMW

STEP 12 : Copy the below Highlighted fields except first Two fields.


STEP 13 : Paste it in Excel Sheet and Change the Type from CHAR to "C" for all

LSMW

STEP 14 : Select Source Fields and Click on Execute

LSMW

STEP 15 : then, position cursor on Source fields and click on Table Maintenance and click on SAVE.

LSMW

STEP 16 : Copy the Fields maintained in STEP 12 and Paste it here

LSMW

  1. Maintain Structure Relations

To Link source structure to SAP (Target) structures.


STEP 17 : Select Define Structure Relations


STEP 18 : Position the cursor to Structure Relations and click on Relationship Button > SAVE.


  1. Maintain Field Mapping and Conversion Rules

Map source fields to target SAP fields. You can also add transformation logic here.


STEP 19 : Select the Define Field Mapping and Conversion Rules and Execute


STEP 20 : Click on More > Extras > Auto-Field Mapping





STEP 21 : Without making any changes in Auto Field Mapping: Settings save it and the click on Accept Proposal by matching the Target Field and Source Field.


STEP 22 : Click on SAVE.


  1. Maintain Fixed Values, Translations, User-Defined Routines

Optional step to apply rules and mappings.



To Prepare File


STEP 23 : Prepare the Excel sheet as shown below with Row 1 (Field Name) and Copy it


STEP 24 : Paste and Save it in txt file.


  1. Specify Files

Upload or specify the location of the source file (usually a .txt or .csv file).


STEP 25 : Select Specify Files and click on Execute


STEP 26 : Position the cursor on the PC (Frontend) and click on Create


STEP 27 : Select the File and Enter Name of file.

Select the check box of Tabulator, Field names at start of file and Proceed



STEP 28 : Click on SAVE and Go back to main Screen


  1. Assign Files

Link source files to source structures.


STEP 29 : Select Assign Files and click on execute


STEP 30 : Position the cursor on Source Structure file and click on Assignment


  1. Read Data

Read the contents of the source file into LSMW.


STEP 31 : Select Read Data and click on execute button


STEP 32 : Click on execute and then allow


Read Data Records


  1. Display Read Data

Review the imported data for accuracy.


STEP 33 : Select Read Data and click on execute button


Click on file to check the Information Captured



  1. Convert Data

Convert legacy data to the SAP format.


STEP 34 : Select Convert Data and click on execute button


STEP 35 : Click on Execute


Converted Data Records


  1. Display Converted Data

View the converted data before upload.


STEP 36 : Select Read Data and click on execute button


To Display Converted data click on any Row to see



  1. Create Batch Input Session / Start Direct Input

Execute the upload into SAP.


STEP 37 : Select Create Batch Input Session and click on execute button


STEP 38 : Click on Execute





  1. Run Batch Input Session


STEP 39 : Select the Batch Input Session and Click on Process


STEP 40 : You can Execute in either Background/Foreground.


Result :


Conclusion

LSMW remains a powerful and widely-used tool for data migration in SAP environments. Whether you are a functional consultant or part of a project team, learning LSMW can significantly reduce manual effort, minimize errors, and speed up your project delivery.


By mastering LSMW, you can confidently take ownership of migration tasks and contribute significantly during implementation and rollout phases.





1件のコメント


Musaif Ahmad
Musaif Ahmad
3 days ago

You explained it very well

いいね!
bottom of page