Professional Documents
Culture Documents
This document has been created for knowledge sharing purpose and it is purely public.
Legacy System Migration Workbench
As we all know LSMW is very helpful and easy when it comes to upload heavy data into SAP system in
less time. It’s a tool used to upload master data in SAP
Let’s create a LSMW to upload condition type PR00, to upload new price for large set of materials.
Process:
SAP has provided user to segregate there LSMW’s in a proper manner by divided it into 3 parts
“Projects, sub projects and objects”.
Click on the highlighted button to create a new LSMW a pop up will appear as shown below asking for
project name and description -
Project: Is the highest node in this hierarchy, in simple terms you can say category.
Fill in the appropriate project name and description of your LSMW and press ok. Again a pop up appears
asking for more details as shown below-
Sub project: It is 2nd node in the hierarchy; in simple terms you can say it’s a sub category
Fill in the appropriate Sub project name and description of your LSMW and press ok. Pop up demands
for more details as shown below-
Object: Object can be list of entities falls under the sub category.
Example:
Project Eatables
Vegetable
Object Fruit salad Fruit juice
soup
After you fill in all details press the highlighted execute button or press F8, this will take you to below
screen.
Here in this step we decide which process we used to input out legacy data into SAP system, SAP has
provided some of the process as shown below-
We will be using the Batch input recording method which I feel is bit simple when compare to other
process.
Click on the highlighted radio button of batch input record and then click on overview button which
is highlighted as well in the right side of above screen; it will take you to below screen-
Now click on create button highlighted in above screen to create a new recording, system will ask
you name the recording and describe it as shown below-
As soon as you name the recording and describe it system will ask for which transaction you want to do
recording.
Recording: As the name goes recording means recording step by step process how you key data in that
particular transaction, system uses this recorded example as skeleton to feed those thousands of entries
which you hold in sheet.
System takes you to VK11 (condition record maintenance screen) fill in data and complete one record as
shown below-
Click on save after you completes the transaction then system will take you to below screen
Click on the highlighted entry of the recording a pop up will appear as shown
Name the field as KSCHL in name column and then describe it as condition type in next name field, and
keep PR00 as default value if all of the records you want to feed in is on PR00 only otherwise make it
blank.
In this example I have all records for PR00 only so I will keep it as default only, as shown below-
In the same way click on second field and repeat the process again as shown below
As I don’t want sales organization to be default I removed it from default value which was recorded by
system.
Repeat the same process for rest fields in the list and it always better to keep name of field as same
highlighted in above screen (standard) this will help in future step 5 when we try to map these fields.
This complete the first step and as soon as you save changes system takes you to below screen for next
step, cursor goes to next step automatically as shown below
Source structure is all about structure of you data file, it’s like a group name, system ask you to key the
name and description of structure, give some sensible name as shown below-
Source fields: It’s a set of field’s names which we have in our source data file and details about them
Click on highlighted button of table content and system will take you to below screen where you can
feed in all source fields.
Fill all the fields in this table with their technical name, data type, field length and description as shown
above.
And it should be in the same order as you have positioned in the source data file with correct process as
per transaction.
It’s always betted to keep source data file in text format with tab delimited as shown above.
The above screen shows that the recently created source structure contains the recently create source
fields, both highlighted source structure and fields.
This is the step where you relate your source structure which contains all source fields to the recording
which we created in first step, it’s just an assignment.
System automatically relates the recent created source structure with the recording which we have
created in first step,
LSMW by Mohammed Mubeen Ahmed SAP CRM
15
Legacy System Migration Workbench
Field mapping:
This is the critical and most important step in LSMW; it is used to map the fields of recording (Step1)
with the source structure fields (step 4&5).
System shows all the fields which we have recorded in first step as shown above.
Then click on auto field mapping which hides under extras tab in menu bar to automatically map the
recording field with source structure fields. The below pop up appears-
Just make sure highlighted radio button is opted then system will map the same field name from
recording with same field name in source structure field name.
You can see that under target field, name of field is KSCHL from recording name REC8 (step 1) and under
source filed, name is the field is also KSCHL of source structure PR00_SOURCE_STRUCTURE (step 4)
Click on the accept proposal and continue doing same for rest all fields.
When it comes to dates and values system smartly ask for the format of date as shown below
This is used to give fix value to some filed after mapping and to validate the date by using user define
routine. We will skip this step as this is optional and of no use for our LSMW.
Specify file: It is the step where we show and specify where we store our source data file in our
directory.
Place the cursor “on the PC” first line and click on create button a pop will appear asking for
directory path
Here we just assign our source data file to the source structure which we have created in step 4.
This will read all the records from the source data file, system shows that what will be the date and
value format as shown below-
After successful execution system display how many records has been traced from the source data file.
This is an optional step which shows the traced record from the source data file.
Double click on one record and system shows the record and its value traced while reading the source
data file.
1. File path where system stores the traced data from source date file, file path ends with read.
2. Source structure which has been assigned to source data file.
3. Field name of source fields of source structure.
4. Value extracted again field names from the source data file.
System converts the list of records traced from source data file into its own transactional format of VK11
in this step.
This is an optional step which shows the converted records from the source data file.
Click on any record it will show the converted data according to transaction VK11 as shown below
1. Path where system stores the converted data and file path ends with CONV.
2. Recording name which has been used as skeleton to convert the data from source data file.
3. Field names based on recording.
4. Values converted against the field names from source data file.
In this step we will create batch session which can be run in next step to run the heavy source data file.
An information pop up appears saying these many records has been created in this batch folder.
In this step we will run the batch input session which we had set in last step.
Select the latest session based on session name and user id and click on highlighted process button
Process/foreground: It runs the file in foreground, this is recommended when you run sample file to see
how system creates entry through batch input recording.
Background: System runs the file in background, this is recommended when you run huge file to avoid
manual work of pressing entry every single time.
Extended log: By enabling this system give detail analysis or log about both successful and unsuccessful
transactions.
Go to VK13 (display mode of condition record) transaction and check random entries to confirm created
entries are accurate and correct.
Thank you for taking out time and going through this document, you can use it as reference and create
LSMW as per your business need. If you have any doubts and need my assistance you can reach me out,
I have pasted my details below.
You can provide your Valuable feedback, suggestions & corrections, thank you.
My details: