Professional Documents
Culture Documents
com
LSMW - Tutorial
2 Copyright – www.sapww.com
Table of Contents
TITLE: LSMW 2
Table of Contents 3
Copyrights 5
Acknowledgments 5
Preface 6
Introduction to LSMW Tutorial 7
Step 1 - LSMW Initial screen 7
Step 2 - Create a Project, Subproject and Object 7
Step 2 .1 - Create a Project 7
Step 2 .2 - Create a Subproject 8
Step 2 .3 - Create an Object 8
Step 3 - Record the Customer Master Creation transaction 9
Step 4 - Perform Mapping 12
Step 4.1 - Maintain object attributes 14
Step 4.2 - Maintain source structures 16
Step 4.3 - Maintain source fields 17
Step 4.4 - Maintain field mapping and conversion rules 19
Step 4.5 - Maintain source fields 21
Step 4.6 - Maintain structure relations 25
Step 4.7 - Maintain field mapping and conversion rules 25
Step 4.8 - Maintain fixed values, translations, user-defined
routines 29
Step 4.9 - Excel Spreadsheet 29
Step 4.10 - Specify files 29
Step 4.11 - Assign files 31
Step 5 - Read data 32
Step 5.1 - Display read data 32
Step 6 - Convert data 34
Step 6.1 - Display converted data 35
Step 7 - Create batch input session 36
Step 7.1 - Run batch input session 36
Glossary of Terms 39
Table of Figures 40
3 Copyright – www.sapww.com
4 Copyright – www.sapww.com
Copyrights
This publication is protected under international copyright laws. All
reproduction, duplication and sharing of this publication in full or in
any part, in all printed and digital formats is strictly prohibited unless
express permission is obtained from the author or SAPWW – SAP
Worldwide in writing.
“SAP” is a trademark of SAP Aktiengesellschaft, Systems,
Applications and Products in Data Processing, Neurottstrasse 16,
69190 Walldorf, Germany. The publisher gratefully acknowledges
SAP’s kind permission to use its trademark in this publication. SAP
AG is not the publisher of this book and is not responsible for it
under any aspect of press law.
Acknowledgments
Thank you to Dustin Ainsworth for his technical and functional expertise
and assistance in creating this material. Any queries can be sent to
da@sapww.com.
5 Copyright – www.sapww.com
Preface
The LSMW- Legacy Systems Migration Workbench, is a SAP tool which
supports one during the once-off and periodic transfer of data from non-
SAP systems ("legacy systems") to the R/3 System.
The tool supports the conversion of the legacy system data to be
transferred into the R/3 System in a user-friendly manner.
The LSM Workbench supports the following standard data interfaces in
its newest version (see below):
• Batch input
• Direct input
• BAPIs (Business Application Programming Interfaces)
• IDocs (Intermediate Documents)
Furthermore, the transaction recorder (batch input recorder) is connected
to the LSMW. In this way a data migration object can be generated from
the recording of a transaction.
This tutorial helps you to learn to use LSMW using the standard data
interface method of Batch input.
The LSMW comprises the following main functions:
• Read data (legacy data in spreadsheet tables and/or sequential files).
You can use any combination of PC and server files
• Convert data (from the source into the target format)
• Import data (to the database used by the SAP application).
6 Copyright – www.sapww.com
Introduction to the LSMW Tutorial
In this Tutorial you will learn to use the LSMW to create customer master
records. However this is an example which may be copied to create any
master data within SAP.
7 Copyright – www.sapww.com
• Click on the Enter pushbutton
8 Copyright – www.sapww.com
You have successfully created an LSWM Project, subproject and object.
You use the recording function to create a new object (or a new "import
method") if neither a standard batch input program nor a standard direct
input program nor the BAPI/IDoc method is available for a data object.
You are now in the Recordings of project ‘ZPROJECT’: Overview
screen
9 Copyright – www.sapww.com
• Your SAP logon name will default as the owner name
• Run through the transaction and enter data in the fields that you will
need populated when uploading the LSMW.
• TAKE NOTE – this should be done in the Development client, as
an actual data record will be created. The system will indicate,
“Customer 001000999 has been created.” (Number may vary.)
10 Copyright – www.sapww.com
• TAKE FURTHER NOTE – if you do not enter data into a field,
the LSMW will not record against that field and you will not be able
to load data into that field with this specific recording.
You are now in the Create Recording screen
11 Copyright – www.sapww.com
Figure 11 – Create Recording
• Click on the icon. The system indicates that the data was
successfully saved.
• Once the recording is saved, click on the icon twice.
You are now in the Legacy System Migration Workbench screen:
12 Copyright – www.sapww.com
Figure 13 – LSM Workbench: ZPROJECT, SD, CUSTOMERS: SOLD TO PARTY UPLOAD
13 Copyright – www.sapww.com
Figure 14 – Personal Menu
We are only concerned with the steps selected for the purposes of this
Tutorial.
Tip - Once we have completed Step 4.14 (14. Run Batch Input session)
the LSMW is complete and can be executed
Tip - Remember if you have more than one upload file for the same
Object (i.e. Sold to Party Upload object), steps 1 to 6 need to be
maintained/set up only once, but steps 7 to 14 will have to be revisited
for every upload activity.
You are now in the LSM Workbench: Display object attributes screen:
14 Copyright – www.sapww.com
Figure 15 – LSM Workbench: Display object attributes
15 Copyright – www.sapww.com
Figure 16 – LSM Workbench: ZPROJECT, SD, CUSTOMERS: SOLD TO PARTY UPLOAD
Take note - the system automatically proceeds to the next radio button.
16 Copyright – www.sapww.com
• Enter a name in the Source structure field and a description
• Click on the Save pushbutton. The system will indicate that the
data was successfully saved
17 Copyright – www.sapww.com
You are now in the Source fields of source structure
SOLD_TO_SOURCE screen:
Tip - You can drastically reduce the effort of maintaining every field by
following the next steps carefully.
• Enter only one field name that you maintained data against when
you recorded your Transaction code i.e. BUKRS
• Enter Type C
• Enter Length 4 (Take note, this usually the length of the Field (i.e.
4), but I always extend it to 60.
• Click on the Enter pushbutton
The system automatically populates the Field Description
18 Copyright – www.sapww.com
• Click on the Back arrow again.
• Save the changes by clicking on the Yes pushbutton
19 Copyright – www.sapww.com
Figure 23 – LSM Workbench: Display Fieldmapping and conversion rules
All the fields have been defaulted by the system from the action carried
out in Step 4.3.
TIP - During this step we will also maintain the upload file that will be
used to populate our data in.
• Copy the entire list of Field Names in this screen and Paste the list
into an excel sheet.
Your excel sheet will look something like this
20 Copyright – www.sapww.com
Figure 25 – Microsoft excel paste special
• Delete the entries that run down the columns and save your
spreadsheet someplace where you can find it later.
21 Copyright – www.sapww.com
Figure 28 – LSM Workbench: Display source fields
22 Copyright – www.sapww.com
You should see something like this Source fields of source structure
SOLD_TO_SOURCE screen:
• Before you click on Enter, maintain the same data in the Type and
Length fields - C and 60
• Take note, if the number of fields you paste exceeds the length of
the screen, you must scroll down and copy and paste the remainder
of fields.
• Obviously if the field you intend to input is more than 60
characters, you need to lengthen the field value.
• After you have maintained all the fields and clicked on enter, the
screen should look something like this
You are now in the Source fields of source structure
SOLD_TO_SOURCE screen:
23 Copyright – www.sapww.com
Figure 32 – Source fields of source structure SOLD_TO_SOURCE
24 Copyright – www.sapww.com
Step 4.6 - Maintain structure relations
• This is a very simple step to perform. You establish the field
relationships between the project and the SAP system
• Simple double click step or click on the Execute pushbutton.
• Click on the Display <-> Change pushbutton
• Click once on the Source Structure
You are now in the LSM Workbench: Change structure relations screen:
25 Copyright – www.sapww.com
You are now in the LSM Workbench: Display Fieldmapping and
Conversion Rules screen:
• Click once on any field, then click on the Change <-> Display
pushbutton
• Click on Extras --> Auto Fieldmapping
26 Copyright – www.sapww.com
You are in the Auto-Fieldmapping: Settings screen.
27 Copyright – www.sapww.com
You are in the Auto-Fieldmapping: Proposals screen
Figure 38 – Information
28 Copyright – www.sapww.com
Step 4.8 - Maintain fixed values, translations, user-defined routines
• Ignore ‘# 6 Maintain fixed values, translations, user-defined
routines’
29 Copyright – www.sapww.com
You are in the LSM Workbench: Specify Files (Display) screen:
30 Copyright – www.sapww.com
• Search for your Text file via the File Field.
• Maintain a description
• Select radio button Tabulator
• Tick the “Field names at the beginning of the file” checkbox
The File on Front-end: Edit properties screen should look like this:
31 Copyright – www.sapww.com
Step 5 - Read data
• Double click on # 9 Read data or click on the execute
pushbutton.
The LSM Workbench: Read Data for ZPROJECT, SD, CUSTOMERS
screen is displayed
• The screen above displays the number of records that the Text file
consists of. Check this number to the number of lines in the excel
spreadsheet. There should be one extra line in the spreadsheet,
which is the line containing the SAP Field names.
• Click on the back arrow twice
• Take note, for this Tutorial, only one record has been loaded.
• Click on the record (s) and verify that the data is correct.
The LSM Workbench: Display Read Data screen is displayed
33 Copyright – www.sapww.com
Figure 48 – LSM Workbench: Display Read Data
34 Copyright – www.sapww.com
Step 6.1 - Display converted data
• Double click on # 12 Display converted data or click on the
execute pushbutton.
The Display Converted Data screen is displayed
• Click on the converted data record (s) and verify that the data is
correct.
The LSM Workbench: Display Converted Data screen is displayed
Figure 55 – Information
36 Copyright – www.sapww.com
Figure 56 – Batch Input: Session Overview
Figure 58 – Information
37 Copyright – www.sapww.com
• The batch session is complete
38 Copyright – www.sapww.com
Glossary of Terms
Legacy system – this term indicates a non-SAP system. However, it
usually also refers to the current system (old) which is being replaced.
R/3 System – this term is commonly used when referring to a SAP
system.
The project serves as an organizational unit used to combine mapping
and field assignments
A subproject is an organizational unit subordinated to the project
An object is a unit (Business Object) combined from the business point of
view, which is used to transfer the data of a project to the SAP system.
39 Copyright – www.sapww.com
Table of Figures
Figure 1 – Legacy System Migration Workbench 7
Figure 2 – Create Project 7
Figure 3 – Create Subproject 8
Figure 4 – Create Object 8
Figure 5 – Legacy System Migration Workbench 9
Figure 6 – Recordings of project ‘ZPROJECT’ 9
Figure 7 – Recordings of project ‘ZPROJECT’: Overview 9
Figure 8 – Transaction code 10
Figure 9 – Create Customer: Initial screen 10
Figure 10 – Create Recording 11
Figure 11 – Create Recording 12
Figure 12 – Legacy System Migration Workbench 12
Figure 13 – LSM Workbench: ZPROJECT, SD, CUSTOMERS: SOLD
TO PARTY UPLOAD 13
Figure 14 – Personal Menu 14
Figure 15 – LSM Workbench: Display object attributes 15
Figure 16 – LSM Workbench: ZPROJECT, SD, CUSTOMERS: SOLD
TO PARTY UPLOAD 16
Figure 17 – LSM Workbench: Display source structures 16
Figure 18 – Create source structures 16
Figure 19 – LSM Workbench: Change source structures 17
Figure 20 – LSM Workbench: Display source fields 17
Figure 21 – Source fields of source structure SOLD_TO_SOURCE 18
Figure 22 – Source fields of source structure SOLD_TO_SOURCE 18
Figure 23 – LSM Workbench: Display Fieldmapping and conversion rules 20
Figure 24 – Microsoft excel 20
Figure 25 – Microsoft excel paste special 21
Figure 26 – Microsoft excel paste special Transpose 21
Figure 27 – Microsoft excel paste 21
Figure 28 – LSM Workbench: Display source fields 22
Figure 29 – Source fields of source structure SOLD_TO_SOURCE 22
Figure 30 – Microsoft Excel 22
40 Copyright – www.sapww.com
Figure 31 – Source fields of source structure SOLD_TO_SOURCE 23
Figure 32 – Source fields of source structure SOLD_TO_SOURCE 24
Figure 33 – LSM Workbench: Change structure relations 25
Figure 34 – LSM Workbench: Display Fieldmapping and Conversion
Rules 26
Figure 35 – Auto Fieldmapping screen dump 26
Figure 36 – Auto-Fieldmapping: Settings 27
Figure 37 – Auto-Fieldmapping: Proposals 28
Figure 38 – Information 28
Figure 39 – Microsoft excel 29
Figure 40 – Text File 29
Figure 41 – LSM Workbench: Specify Files (Display) 30
Figure 42 – File on Front-end: Edit properties 30
Figure 43 – File on Front-end: Edit properties 31
Figure 44 – LSM Workbench: Read Data for ZPROJECT, SD,
CUSTOMERS 32
Figure 45 – LSM Workbench: Read Data for ZPROJECT, SD,
CUSTOMERS 32
Figure 46 – Display Read Data 33
Figure 47 – LSM Workbench: Display Read Data 33
Figure 48 – LSM Workbench: Display Read Data 34
Figure 49 – LSM Workbench: Convert Data for ZPROJECT, SD,
CUSTOMERS 34
Figure 50 – LSM Workbench: Convert Data for ZPROJECT, SD,
CUSTOMERS 34
Figure 51 – Display Converted Data 35
Figure 52 – LSM Workbench: Display Converted Data 35
Figure 53 – LSM Workbench: Display Converted Data 35
Figure 54 – LSM Workbench: Create Batch Input Session 36
Figure 55 – Information 36
Figure 56 – Batch Input: Session Overview 37
Figure 57 – Process Session CUSOTMER1 37
Figure 58 – Information 37
Figure 59 – Batch Input: Session Overview 38
41 Copyright – www.sapww.com
42 Copyright – www.sapww.com