Training Manual – Technical Module(LSMW

)

PROJECT

Training Manual End Users

LSMW (Data Migration) - Process

INDEX

Page No.

Page 1 of 50

Training Manual – Technical Module(LSMW)

Creation of Flat File……………………………. Steps of LSMW………………………………….

3 3

Creation of flat file
Create a flat file in notepad with some fields of MARA as shown in the following Page 2 of 50

Training Manual – Technical Module(LSMW)

Go to the command field.

Enter LSMW (Legacy System Migration Work Bench) transaction code in the command field.

Give the Project as ZPROJ then click on Create button from application tool bar as shown in the above figure. Then the following information message will appear.

Page 3 of 50

Training Manual – Technical Module(LSMW)

Click on

button or press on ENTER as shown in the above screen.

Give the Description as PROJECT then click on

button or press on ENTER as shown in the above figure.

Give the following details on the above screen Subproject – ZSUBPROJ Description – SUB PROJECT Then click on button or press on ENTER as shown in the figure to open the next screen.

Page 4 of 50

Training Manual – Technical Module(LSMW)

Give the following details on the above screen Object – ZOBJECT Description – OBJECT Then click on button or press on ENTER as shown in the figure to open the next screen.

Then click on Execute

button from application tool bar or press F8 to create the project.

Page 5 of 50

Training Manual – Technical Module(LSMW)

STEP 1: Maintain Object Attributes
In this step we can do recording for a particular transaction, say MM01. Select the radio button Maintain Object Attributes as shown in the figure. button from application tool bar as shown in the above figure.

Press CTRL+F8 or click on Execute

Page 6 of 50

Training Manual – Technical Module(LSMW)

Click on Recordings

button as shown in the above figure.

Select the Recordings, Click on Create

button from the application tool bar as shown in the above figure.

Provide the following details in the above figure Recording – ZREC Description – RECORDING TCODE – MM01 Then click on button or press on ENTER as shown in the figure to open the next screen.

Page 7 of 50

Training Manual – Technical Module(LSMW)

Enter the Transaction Code – MM01 then click on

button or press on ENTER as shown in the figure.

Provide the following details in the above screen fields Material – MMAT1 Industry Sector – M Mechanical Engineering Material Type – ROH Raw material Click on Select View(s) push button from the application tool bar as shown in the above figure.

Select the Basic Data 1 view then click on

button or press on ENTER as shown in the figure.

Page 8 of 50

Training Manual – Technical Module(LSMW)

Give the following details on the above screen fields Material – MATERIAL DESCRIPTION – MMAT1 Base Unit of Measure – PC Then SAVE (CTRL+S) button from standard tool bar the following message will appear in status bar.

Page 9 of 50

Training Manual – Technical Module(LSMW)
Double click on RMMG1-MATNR as shown in the above figure.

Delete the default value MMAT1 and provide the Name as MARA-MATNR click on as shown in the figure.

button or press on ENTER

Double click on RMMG1-MBRSH as shown in the above figure.

Page 10 of 50

Training Manual – Technical Module(LSMW)

Delete the default value M and provide the Name as MARA-MBRSH click on shown in the figure.

button or press on ENTER as

Double click on RMMG1-MBRSH as shown in the above figure.

Page 11 of 50

Training Manual – Technical Module(LSMW)

Delete the default value ROH and provide the Name as MARA-MTART click on shown in the figure.

button or press on ENTER as

Page 12 of 50

Training Manual – Technical Module(LSMW)

Double click on RMMG1-MAKTX as shown in the above figure.

Delete the default value MATERIAL DESCRIPTION – MMAT1 and provide the Name as MARA-MAKTX click on button or press on ENTER as shown in the figure.

Page 13 of 50

Training Manual – Technical Module(LSMW)

Double click on RMMG1-MEINS as shown in the above figure.

Delete the default value PC and provide the Name as MARA-MEINS click on shown in the figure.

button or press on ENTER as

Page 14 of 50

Training Manual – Technical Module(LSMW)

Then SAVE (CTRL+S)

button from standard tool bar the following message will appear in status bar.

Then click on back

button from standard tool bar then the following screen will come.

Then click on back

button from standard tool bar then the following screen will come.

Then click on Display/Change push button from application tool bar.

Page 15 of 50

Training Manual – Technical Module(LSMW)

Select the radio button

Batch Input Recording then give Recording as ZREC then click on SAVE (CTRL+S)

button from standard tool bar. It will navigate to the following screen.

Then click on back

button from standard tool bar then the following screen will come.

Page 16 of 50

Training Manual – Technical Module(LSMW) STEP 2: Maintain Source Structures
In this step we can provide the name of internal table. Select the radio button Maintain Source Structures as shown in the figure. button from application tool bar as shown in the above figure.

Press CTRL+F8 or click on Execute

Click on Change

button from application tool bar as shown in the above figure.

Select Source structure, and then click on Create in the following figure.

structure button from the application tool bar as shown

Provide the following details on the above screen fields Source Structure – ITAB Description – NAME OF INTERNAL TABLE

Page 17 of 50

Training Manual – Technical Module(LSMW)
Then click on button or press on ENTER as shown in the figure to open the next screen.

Then SAVE (CTRL+S)

button from standard tool bar the following message will appear in status bar.

Then click on back

button from standard tool bar then the following screen will come.

Page 18 of 50

Training Manual – Technical Module(LSMW) STEP 3: Maintain Source Fields
In this step we can create fields for internal table. Select the radio button Maintain Source Fields as shown in the figure. button from application tool bar as shown in the above figure.

Press CTRL+F8 or click on Execute

Click on Change

button from application tool bar as shown in the above figure.

Select the Source fields ITAB2 Click on Create figure.

button from the application tool bar as shown in the above

Provide the following details on the above screen fields.

Page 19 of 50

Training Manual – Technical Module(LSMW)
Field Name – MATNR Field Description – MATERIAL NUMBER Field Length – 18 Field Type – C Then click on button or press on ENTER as shown in the figure to open the next screen.

Select MATNR click on Create

button from the application tool bar as shown in the above figure.

Provide the following details on the above screen fields. Field Name – MBRSH Field Description – INDUSTRY SECTOR Field Length – 1 Field Type – C Then click on button or press on ENTER as shown in the figure to open the next screen.

Page 20 of 50

Training Manual – Technical Module(LSMW)

Select MBRSH click on Create

button from the application tool bar as shown in the above figure.

Provide the following details on the above screen fields. Field Name – MTART Field Description – MATERIAL TYPE Field Length – 4 Field Type – C Then click on button or press on ENTER as shown in the figure to open the next screen.

Page 21 of 50

Training Manual – Technical Module(LSMW)

Select MBRSH click on Create

button from the application tool bar as shown in the above figure.

Provide the following details on the above screen fields. Field Name – MAKTX Field Description – MATERIAL DESCRIPTION Field Length – 40 Field Type – C Then click on button or press on ENTER as shown in the figure to open the next screen.

Page 22 of 50

Training Manual – Technical Module(LSMW)

Select MBRSH click on Create

button from the application tool bar as shown in the above figure.

Provide the following details on the above screen fields. Field Name – MEINS Field Description – UNIT OF MEASURE Field Length – 3 Field Type – C Then click on button or press on ENTER as shown in the figure to open the next screen.

Page 23 of 50

Training Manual – Technical Module(LSMW)

Then SAVE (CTRL+S)

button from standard tool bar the following message will appear in status bar.

Then click on back

button from standard tool bar then the following screen will come.

STEP 4: Maintain Structure Relations
Page 24 of 50

Training Manual – Technical Module(LSMW)
In this step we used to establish a relationship between your transaction fields (screen fields) with internal table fields. Select the radio button Maintain Structure Relations as shown in the figure. button from application tool bar as shown in the above figure.

Press CTRL+F8 or click on Execute

Click on Change

button from application tool bar as shown in the above figure.

Select your recording ZREC then click on Relationship push button from application tool bar.

Click on

button or press on ENTER as shown in the figure.

Page 25 of 50

Training Manual – Technical Module(LSMW)

Click on SAVE (CTRL+S)

button from standard tool bar. It will navigate to the following screen.

Then click on back

button from standard tool bar then the following screen will come.

STEP 5: Maintain Field Mapping and Conversion Rules
Page 26 of 50

Training Manual – Technical Module(LSMW)
In this step mapping and conversion rules are maintained by assigning internal table fields to proper screen fields of transaction code MM01. Select the radio button Maintain Field Mapping and Conversion Rules as shown in the figure. button from application tool bar as shown in the above figure.

Press CTRL+F8 or click on Execute

Click on Change

button from application tool bar as shown in the above figure.

Select MARA-MATNR, click on Source Fields push button from application tool bar as shown in the above figure.

Page 27 of 50

Training Manual – Technical Module(LSMW)

Double click on MATNR as shown in the above figure or select MATNR then click on ENTER as shown in the above screen.

button or press on

Select MARA-MBRSH, click on Source Fields push button from application tool bar as shown in the above figure.

Page 28 of 50

Training Manual – Technical Module(LSMW)

Double click on MBRSH as shown in the above figure or select MBRSH then click on ENTER as shown in the above screen.

button or press on

Select MARA-MTART, click on Source Fields push button from application tool bar as shown in the above figure.

Page 29 of 50

Training Manual – Technical Module(LSMW)

Double click on MTART as shown in the above figure or select MTART then click on ENTER as shown in the above screen.

button or press on

Select MARA-MAKTX, click on Source Fields push button from application tool bar as shown in the above figure.

Page 30 of 50

Training Manual – Technical Module(LSMW)

Double click on MAKTX as shown in the above figure or select MAKTX then click on ENTER as shown in the above screen.

button or press on

Page 31 of 50

Training Manual – Technical Module(LSMW)
Select MARA-MEINS, click on Source Fields push button from application tool bar as shown in the above figure.

Double click on MEINS as shown in the above figure or select MEINS then click on as shown in the above screen.

button or press on ENTER

Then SAVE (CTRL+S)

button from standard tool bar the following message will appear in status bar.

Page 32 of 50

Training Manual – Technical Module(LSMW)
Then click on back button from standard tool bar then the following screen will come.

STEP 6: Maintain Fixed Values, Transactions and User-Defined Routines:
Here this step is ignored because we are not creating any subroutines.

STEP 7: Specify File
In this step we can provide the name of flat file along with path, file format (Text file) and it’s fields are separated by tab space etc Select the radio button Maintain Source Structures as shown in the figure. button from application tool bar as shown in the above figure.

Press CTRL+F8 or click on Execute

Click on Change

button from application tool bar as shown in the above figure.

Page 33 of 50

Training Manual – Technical Module(LSMW)

Select Legacy Data on the PC (Front End) then click on Create the above figure.

button from application tool bar as shown in

Click on search help

button for File as shown in the above figure.

Page 34 of 50

Training Manual – Technical Module(LSMW)

Select your Flat file MARA to upload from the presentation server.

Enter the following details on the above screen Name – FILE_1 Data for one source structure Tabulator Field Order matches source structure definition Record and marker (Text File) ASCII Then click on button or press on ENTER as shown in the figure.

Page 35 of 50

Training Manual – Technical Module(LSMW)

Then SAVE (CTRL+S)

button from standard tool bar the following message will appear in status bar.

Then click on back

button from standard tool bar then the following screen will come.

Page 36 of 50

Training Manual – Technical Module(LSMW) STEP 8: Assign Files
In this step we can assign Legacy file (Flat file) to Internal table ITAB2. Select the radio button Assign Files as shown in the figure. button from application tool bar as shown in the above figure.

Press CTRL+F8 or click on Execute

Click on Change

button from application tool bar as shown in the above figure.

Select ITAB2 and click on Assignment push button from application tool bar.

Then click on

button or press on ENTER as shown in the figure to open the next screen.

Page 37 of 50

Training Manual – Technical Module(LSMW)

Then SAVE (CTRL+S)

button from standard tool bar the following message will appear in status bar.

Then click on back

button from standard tool bar then the following screen will come.

STEP 9: Read Data
In this step flat file data is uploaded to an internal table i.e. GUI_UPLOAD takes place here. Select the radio button Read data as shown in the figure. button from application tool bar as shown in the above figure.

Press CTRL+F8 or click on Execute

Page 38 of 50

Training Manual – Technical Module(LSMW)

Press CTRL+F8 or click on Execute

button from application tool bar as shown in the above figure.

Then click on back

button two times from standard tool bar then the following screen will come.

Page 39 of 50

Training Manual – Technical Module(LSMW)

STEP 10: Display Data
In this step we can read data of internal table ITAB2. Select the radio button Display Data as shown in the figure. button from application tool bar as shown in the above figure.

Press CTRL+F8 or click on Execute

Click on

button or press on ENTER as shown in the above figure.

Page 40 of 50

Training Manual – Technical Module(LSMW)

Then click on back

button from standard tool bar then the following screen will come.

STEP 11: Convert Data
In this step the actual mapping takes place. I.e. The internal table data is passed to screen and screen field in the structure BDCDATA. Select the radio button Convert Data as shown in the figure. button from application tool bar as shown in the above figure.

Press CTRL+F8 or click on Execute

Page 41 of 50

Training Manual – Technical Module(LSMW)

Press CTRL+F8 or click on Execute

button from application tool bar as shown in the above figure.

Then click on back

button two times from standard tool bar then the following screen will come.

STEP 12: Display Converted Data

Page 42 of 50

Training Manual – Technical Module(LSMW)
Here you can display the mapped and converted data. Select the radio button Display converted data as shown in the figure. button from application tool bar as shown in the above figure.

Press CTRL+F8 or click on Execute

Click on

button or press on ENTER as shown in the figure.

Then click on back

button from standard tool bar then the following screen will come.

Page 43 of 50

Training Manual – Technical Module(LSMW)

STEP 13: Create Batch Input Session
Here we process the session which upload the data to database tables. Select the radio button Create Batch Input Session as shown in the figure. button from application tool bar as shown in the above figure.

Press CTRL+F8 or click on Execute

Provide the following details on the above screen Name of Batch Input Folder(s) – MYSESSION Keep batch Input folder(s) Then click on Execute button from application tool bar or press F8 to create the project.

If you check the Keep batch Input folder(s) then the processed session is present in SM35, If you uncheck this the processed session will be delete from the application server SM35.

Page 44 of 50

Training Manual – Technical Module(LSMW)

Then click on

button or press on ENTER as shown in the figure to open the next screen.

STEP 14: Run Batch Input Session
In this step you can process the session which upload the data to database tables. Press CTRL+F8 or click on Execute button from application tool bar as shown in the above figure.

Provide Session name – MYSESSION as shown in the above figure.

Page 45 of 50

Training Manual – Technical Module(LSMW)

Select your Session name MYSESSION as shown in figure then Click on Process push button from application tool bar as shown in the above figure.

Select the radio button Background then click on Process push button as shown in the above figure. Then the following message will appear as shown the below figure.

To view the status of a background job:

Page 46 of 50

Training Manual – Technical Module(LSMW)
Go with the transaction code SM37 (To view background jobs) as shown in the above figure.

Provide the Job Name as MYSESSION then click on Execute shown in the above figure.

button from application tool bar or press F8 as

Check the status for your job MYSESSION was finished. Now check in two database tables MARA and MAKT for transferred records.

Page 47 of 50

Training Manual – Technical Module(LSMW)

Enter the transaction code SE16N in the command field to go with General Table Display.

Enter table name as MARA and material number from value - M101 to value – M106.Press Execute button (F8).

Page 48 of 50

Training Manual – Technical Module(LSMW)

From the above screen you can observe the transferred records.

Again go to T Code SE16N.Enter the table name MAKT. Enter the Material range from M101 to M106 then click on press F8 or click on Execute button from application tool bar as shown in the above figure.

Page 49 of 50

Training Manual – Technical Module(LSMW)

From the above screen you can observe the transferred records.

Page 50 of 50

Sign up to vote on this title
UsefulNot useful