How to Create LSMW in SAP

How to Create LSMW in SAP

LSMW (Legacy System Migration Workbench) is a standard SAP tool used to transfer data from legacy systems into an SAP system. It is commonly used during data migration projects to upload both master data (like customers, vendors, materials) and transactional data (such as open invoices or po’s).

LSMW provides a step-by-step process that helps map data fields, convert legacy data into SAP format, and import it using methods:

  • Standard Batch or Direct Input.
  • Batch Input Recording. (We are following this method)
  • Business Object Method (BAPI).
  • Intermediate Document (IDOC)

LSMW has 14 steps to complete. We can separate the LSMW into 2 parts:

Go to T code: LSMW.

How to Create LSMW in SAP

A popup will appear; simply click the “Continue” button to proceed.

Now, we will create an LSMW project. Enter a project name and click the “Create” icon to proceed.

How to Create LSMW in SAP

A popup will appear; enter the project description and click the “Continue” button.

How to Create LSMW in SAP

Similarly, enter the subproject name and description, followed by the object name and description. Finally, click the “Continue” button.

How to Create LSMW in SAP

Note: A single project can contain multiple subprojects and objects, based on your requirements.

Click on Execute button.

Now, the main LSMW screen with all 14 steps is open. For better understanding, we’ve divided the process into two parts: LSMW Setup and File Upload.

How to Create LSMW in SAP

Sap96 – Premium Content

Select ‘Maintain Object Attributes’ and click Execute, or double-click the line item directly.

How to Create LSMW in SAP. Maintain object attributes

We are currently in display mode; let’s switch to change mode.

In this blog, we are creating LSMW with Batch Input Recording method.

Select the ‘Batch Input Recording’ radio button and click the Overview icon.

How to Create LSMW in SAP. Maintain object attributes

Click on create icon.

A pop-up will appear; enter the recording name and description, then click the Continue button.

Now, enter the T-code to start the recording. In this example, we are creating an LSMW to upload 11 G/L accounts, so enter T-code FS00. During the recording process, make sure to create a G/L account as part of the steps.

How to Create LSMW in SAP. Maintain object attributes

Recording started – The recording begins once you enter T-code FS00 in LSMW. The system will then navigate to the FS00 transaction to start the recording process.

After entering the required data to create the G/L account, click the Save button.

Recording completed.

Click ‘Default All’ to automatically populate field names and descriptions.

How to Create LSMW in SAP. Maintain object attributes

The name and description values have now been populated.

How to Create LSMW in SAP. Maintain object attributes

Click the Save button, then press the Back button twice.

Important: Enter a recording name and click the Save button.

How to Create LSMW in SAP. Maintain object attributes

After navigating back, the system will auto-select the next step: Maintain Source Structures.

Select ‘Maintain Source Structure’ and click Execute, or double-click the line item directly.

How to Create LSMW in SAP. Maintain source structure

We are currently in display mode; let’s switch to change mode.

Now, select the Create icon, provide a name and description for the source structure, and click Continue.

How to Create LSMW in SAP. Maintain source structure

Click on save button.

We need to prepare the source fields in excel and then need to maintain those source fields in this LSMW step.

Note 1: This is a crucial step in the entire LSMW setup.

Note 2:

  • Source Fields – The fields coming from external files such as Excel, text, or other file formats.
  • Target Fields – Fields captured from the SAP transaction during the LSMW recording.

Follow the process by clicking on Object Overview.

A pop-up will appear; click the Table button.

Now, SAP will display all the fields recorded in LSMW. Copy the fields (as shown below) by pressing Ctrl + Y and paste in a Excel.

How to Create LSMW in SAP. Maintain source fields

Now in the meantime, Select ‘Maintain Source Fields’ and click Execute, or double-click the line item directly.

If it is opened with display mode; switch to change mode.

Put cursor on the source field heading and click on ‘Table Maintenance’.

Now, open the Excel file you pasted earlier (can see on the left side) and prepare the data as shown on the right side.

How to Create LSMW in SAP. Maintain source fields

Once the data is ready, simply copy it from the Excel file and paste it into the Maintain Source Fields table, as shown below.

How to Create LSMW in SAP. Maintain source fields

Click on back.

Click on save button now.

Select ‘Maintain Structure Relations’ and click Execute, or double-click the line item directly.

How to Create LSMW in SAP. Maintain structure relations

We are currently in display mode; let’s switch to change mode.

How to Create LSMW in SAP. Maintain structure relations

There’s not much to do on this screen—you’re simply mapping the source and target structures. Just click the Save button.

Select ‘Maintain Field Mapping and Conversion Rules’ and click Execute, or double-click the line item directly.

How to Create LSMW in SAP. Maintain field mapping and conversion rules

We are currently in display mode; let’s switch to change mode.

Now we need to map the source and target fields by following the path below: click on Extras, then select Auto-Field Mapping.

How to Create LSMW in SAP. Maintain field mapping and conversion rules

A pop-up will appear; simply click the Continue button.

Take a look at how the source and target fields are mapped.

How to Create LSMW in SAP. Maintain field mapping and conversion rules

Click on save button.

Select ‘Maintain Fixed Values, Translations, User-Defined Routines’ and click Execute, or double-click the line item directly.

Note: This step is optional, but we will demonstrate it with a basic scenario. In this LSMW, we want one specific field to have a fixed value, while the remaining data will be taken from the upload file. For example, we want the Company Code to always be set to 1008. Even if a different company code—such as 1100 or 1200—is provided in the upload file, SAP will override it and use 1008 as the fixed value.

How to Create LSMW in SAP. Maintain fixed values

Place the cursor on Fixed Values, click the Create icon, and a pop-up will appear. Enter the field’s technical name and description, then click the Continue button.

Now double click on the company code.

How to Create LSMW in SAP. Maintain fixed values

A pop-up will appear in display mode; let’s switch it to change mode.

Now, we need to define the field’s length, data type, and output value.

How to Create LSMW in SAP. Maintain fixed values

Just click on back icon.

SAP FICO Sub module wise:

How to Create LSMW in SAP How to Create LSMW in SAP How to Create LSMW in SAP How to Create LSMW in SAP


Discover more from sap96.com

Subscribe to get the latest posts sent to your email.

Comment Here

Discover more from sap96.com

Subscribe now to keep reading and get access to the full archive.

Continue reading