Introduction of LSMW
We have often encountered challenges in migrating the mass upload of master records in SAP. Today I will try to explain how to overcome such an issue by using SAP standard tools. LSMW (Legacy System Migration Workbench) is a software-based SAP tool for single or periodic data transfers from non-SAP to SAP (as well as with restrictions from SAP to SAP system). We will also go over step-by-step instructions for using LSMW to update the customer. Master records.
Its core functions are: Importing legacy data from PC spreadsheet tables or sequential files.LSMW can be used across the SAP Module such as SAP SD, SAP MM.
What is Data migration?
The data from the legacy system must be transferred into the Non SAP System to implement SAP R/3 system. It is also necessary to regularly move the data from the Trading Legacy system to the R/3 system (interfacing).
At the end of the R/3 implementation, data migration comes into the picture where all master data, Transactional data need to transfer into Newly configure SAP System. The first configuration should be completed & move to production then we to begin with the data migration activity. In this phase, we will move all master data to the SAP system before the system is Operational for the user.
Data migration is a very significant step for any successful SAP Implementation. The migration of data is approximately 20% to 40% of total implementation costs.
There are two tools we often use to migrate data
- BDC (Batch Data Communication)
- LSMW (Legacy System Migration Workbench)
Today we will be focusing only on LSMW. Let’s get started
What is the LSMW|What is lsmw in sap
LSMW full form is Legacy System Migration Workbench. The LSMW Workbench is an R/3-based tool that allows us to transfer data once or regularly from Non-SAP Systems to R/3.It’s a very simple & easy to use tool which makes mass data migration in a few simple steps. Data imports into R/3 should be of better quality and consistency than data immigration speed and performance.
How LSMW works in sap?
The LSMW main functions are:
- Import data ( legacy data in MS excel or text format sequential file)
- Conversion of data (from the source format to target format)
- Import the data into the application R/3 database
Advantages of LSMW
- The advantage of LSMW import to be used in each case is defined by the business object as well as the availability of standard input programmes.
- R/3 is integrated, making it independent of individual platforms.
- Consistency of the data by standard methods used for import
- Batch Inputs
- Direct Inputs
- BAPI (Business Application Programming Interfaces)
- IDOC(Intermediate Documents)
- Existing skills and coding be utilised.
Types of LSMW in sap
The LSMW tool offers four different upload options. let’s understand what is advantages & disadvantages
- Advantages: Easy to modify, all fields are accessible, and reprocessing is quick.
- Disadvantages: Relatively slow; to use new screens or tabs, a new recording must be created; not easily available for enjoying transactions; differences in foreground and background processing can occur depending on user settings.
- Advantages: Well-proven method, quick loading, and simple processing.
- Disadvantages: There are no enjoy transactions, and transactions are not always completed with all input fields.
- Advantages: Quick to load, simple to process, and logical interface for functional/end users focused on business processes. on contrary to common opinion, there is a range of drawbacks to using this form.
- Disadvantages: Not all transaction input fields are always completed
- Advantages : Fast loading, simple processing, and low programming for standard IDOCs
- Disadvantages: Knowledge of IDOC processing is needed, and making changes to a previously generated IDOC can be time-consuming.
Difference between BDC & LSMW ?
- Direct input, BAPI, Idoc, and batch input recording are some of the data migration techniques offered by LSMW whereas on the other hand, BDC primarily employs batch input sessions and the CALL TRANSACTION process.
- There is a limit to the number of records that can be submitted in a single BDC session (999 records). In LSMW, there is no such restriction.
- LSMW is more concerned with setup, while BDC is more concerned with programming.
How many steps are there in Lsmw?
LSMW contains 14 essential steps in addition to project/subproject/object creation and recording.
What are the steps to create a new LSMW in SAP | How do you use LSMW?
Here’s an example of how to use the LSMW conversion method in SAP. Since LSMW is an extra transaction, it is not available in the regular SAP menu. Enter the transaction code LSMW.
In this example, We will create customer master records using LSMW
Every conversion activity is organized into Projects, Subprojects, and Objects. Here we need to define Project, Subproject & Objects
The main screen of LSMW offers wizard-like step-by-step activities. We must complete these steps in order to complete our data conversion. The cursor is automatically moved to the next step after each step is completed.
Step 1: Maintain Object Attributes
In this example, We will create a new customer in SAP hence we will be updating the customer master records with transactions in this case (XD01). To record the R/3 transaction, select the radio button Batch Input Recording as we are going to use simple recording methods and press the recording summary icon. Enter XD01 REC as the recording name, Customer Master Create Recording as the summary and XD01 as the transaction code.
Alternative, we may used other methods
The system calls XD01 to Create customer change transactions as shown below
Specify mandatory key fields for custom creation. In this case, we have specified the account group, name salutation, Customer Name & Search term for creating a customer master. Once the recording is completed R/3 logs the flow of screens and fields and saves information. Default values are set when the transaction was recorded.
Note that field names are stored in a technical format by the transaction recording process. The system displays technical names by pressing the F1 key on each screen and then pressing the F9 key. Then you can substitute descriptive names for technical names.
Step 2. Maintain Source Structures
Give the source structure a name and description
Step 3. Maintain Source Fields
In this step, the fields in the source structure must be listed. The easiest way to enter field names, types, and lengths for each field is by clicking on the ‘Maintenance Table’ icon
Use field names with the same names as the target field names, since in step 5 ‘Maintain field mapping and conversion rules,’ you can use the function ‘auto-field mapping.
Step 4: Maintain Structure Relations
Execute a ‘Structure Relations Maintain’ step. . The relationship automatically defaults, because there is only one Source/Target structure.
Step 5: Maintain fields mapping & Conversion rules
Use the auto fields mapping to Maintain fields mapping & conversion rules.
Step 6: Maintain fixed values, translations, User-defined routines for LSMW
We can also reuse user-defined routines and reusable translations that can be used for transformation tasks. This step is not necessary in this case.
Step 7: Specify the local files
We need to specify how the input file is layout in this step. The input file is with field names in the first row. It’s available as C:\Users \test\1.txt on my pc (local disc).
Here we have specified Tab-delimited file format
Step 8: Assign files
Perform the Assign Files step as below and the system defaults to the source structure by the filename automatically.
Step 9: Read data
In this Step,LSMW reads the data from the source file (from the local PC drive).& read and convert selected rows into internal format data values.
Step 10: Display read data
It is an optional step. If necessary, the field contents for the read data rows can be reviewed.
Step 11: Convert data
This is the step by which the source data (in source format) is actually converted into a target format. The source fields are mapped to the target areas on the basis of the conversion rules defined.
Step 12: Display Converted data
This is another optional step to see how the source data is transformed into internal SAP format
Step 13: Create batch input session
We can create a batch session to process updates when the source data is converted to an internal format.
Step 14: Run Batch Input Session
Run batch input session allows us to execute the BDC session. A standard SM35 transaction for BDC session management is the performance of a batch input session. The client master logs are updated on the system once you have successfully completed the batch entry session. By viewing the client masters records, you can confirm this (XD01).
Now it is recommended to validate your changes in the SAP System before you perform mass data upload. Alternatively, you may use LSMW in your Quality system. If everything working correctly, then use the same lsmw in your Production system
How do you import and export Lsmw in SAP?
It’s very easy to move LSMW from one server to any other server using the export and import functions of any project/object. Choose the objects you want to Export -import. The system automatically downloads the mapping rule in a text format file by clicking on the Export Project.
Similarly, In the target server, you need to upload the existing project /object mapping rule using the import functionality
Is it possible to use Lsmw in S/4 Hana?
In S/4 Hana SAP provides predefined migration objects you can use. Migration is done with LTMC – the tool (Legacy Transfer Migration Cockpit) The SAP S/4HANA migration cockpit can be accessed through LTMC transaction.
Hope this article helps you to explore how to leverage LSMW, Data migration tools. Here are a couple of other articles that you check
You might also like the below articles.
- SAP Solution manager
- SAP C4HANA
- SAP Successfactors
- MRP live
- SAP Best Practices
- SAP Modules
- SAP SD Vistex
- SAP Credit Management
- Sap learning hub
- SAP Redwood Scheduler
- SAP BTP
- SAP GUI
- Asap methodology
- SAP Ewm
- Variant configuration