LSMW
1
T.code: LSMW
ENTER GIVE PROJECT NAME, SUBPROJECT NAME , OBJECT
LSMW
2
PRESS ENTER
LSMW
3
PRESS ENTER
LSMW
4
LSMW
5
LSMW
6
SELECT BATCH INPUT RECORDING RADIO BUTTON SELECT AND CLICK ON RECORDING OVERVIEW
BUTTON
LSMW
7
CLICK ON CREATE RECORDING BUTTON
LSMW
8
GIVE WORK CENTER LIKE AND ENTER
THE GIVEN BELOW STEPS RECORDING TRANSACTION T.CODE : CR01
DO NOT USE TAB BUTTON AND ENTER BUTTON USE ALWAYS MOUSE, WHILE RECORDING TIME .
GIVE RECORDING TRANSACTIONS : LIKE CRO1, CAO1, CSO1 for further Practice
LSMW
9
LSMW
10
Save and back arrow (f3) two times
LSMW
11
LSMW
12
Save and back arrow f3
LSMW
13
Click on table button
LSMW
14
LSMW
15
LSMW
16
LSMW
17
Make like above another file
LSMW
18
LSMW
19
LSMW
20
LSMW
21
Back
LSMW
22
LSMW
23
Enter
LSMW
24
Save and back
LSMW
25
LSMW
26
Save and back
LSMW
27
LSMW
28
LSMW
29
LSMW
30
LSMW
31
LSMW
32
LSMW
33
Like above all fields
Then save
LSMW
34
6 steps dummy
LSMW
35
LSMW
36
Select legacy data area and click on add entry button (ctrl+f2)
LSMW
37
Then Save
LSMW
38
Save
LSMW
39
LSMW
40
LSMW
41
LSMW
42
LSMW
43
LSMW
44
LSMW
45
LSMW
46
LSMW
47
LSMW
48
LSMW
49
LSMW
50
THEORY:
LSMW is a tool used to transfer data from legacy system to R/3 periodically or once .It
supports conversion of data and Batch Input, BAPI, IDOC or Direct Input can be used as
the method for transfer of data. Total of 26 processing steps are available in LSMW ,In case
of data transfer using Batch Input only 14 steps are required.
Execute the transaction LSMW to start transfer of data, Before using the LSMW we should
have good knowledge about the business object and the fields that will be transferred.
The main screen of LSMW provides wizard-like step-by-step tasks, To complete your
data conversion, you need to execute these steps in sequence. Once a step is executed,
the cursor is automatically positioned to the next step.
Note that these steps may look different depending upon your Personal menu settings. You
could make step numbers visible by ‘Numbers on’ icon or hidden by ‘Numbers off’ icon. You
can execute a step by double-clicking on the row. Toggle icon ‘Double click=Display’ or
‘Double click=Edit’, makes the step in ‘display’ mode or ‘change’ mode.
There are 14 steps that are normally used and these are.
1) Maintain Object Attributes.
2) Maintain Source Structures.
3) Maintain Source Fields.
4) Maintain Structure Relations
5) Maintain Field Mapping and conversion rules .
6) Maintain Fixed Values, translations ,user defined routines.
7) Specify Files .
8) Assign Files .
9) Read DATA.
10) Display Read Data.
11) Convert Data.
12) Display Converted Data.
13) Create Batch Input Session.
14) Run Batch Input Session.
1) Maintain Object Attributes.
In this example, you will be updating the customer master records with the help of
recording a transaction (XD02).
a. Choose radio button Batch Input Recording and
b. click on the recording overview icon to record the R/3 transaction.
c. Enter the Recording nameasXD02_REC,the description as Customer Master Updates
LSMW
51
Recording, and
the transaction code as XD02(FS00 in case of gl accounts)
Once the transaction is completed, R/3 records the flow of screens and fields and saves the
information,
2) Maintain Source Structures.
Give a name and a description to the source structure
3) Maintain Source Fields.
In this step, you need to list what fields are present in the source structure. The easiest
way is to click on ‘Table Maintenance’ icon to enter Fieldname, Type and Length for
each field
Note that your input file will have four fields as key fields and you need to update three
fields in the system
4) Maintain Structure Relations
Execute a step to ‘Maintain Structure Relations’. Since, there is only one Source and
Target Structure, the relationship is defaulted automatically
5) Maintain Field Mapping and conversion rules .
In this step, source/legacy fields in each structure are assigned to R/3 fields. It may be
done individually for each R/3 field, which being time-consuming for complex structures or
we can use automatic mapping utility (Extras > Auto-Field mapping).
We can specify the conversion rule to be used to convert an LS field into the corresponding
R/3 field. For this, use predefined conversion rules or create your own conversion rules in
the editor.
You may use the buttons ‘Initial’, ‘Constant’, ‘Move’ & ‘Fixed Value’ to assign different
values. You may also assign different rules by using the button ‘Rule’. automatic mapping
utility (Extras > Auto-Field mapping).
6) Maintain Fixed Values, translations ,user defined routines.
7) Specify Files .
In this step, we define how the layout of the input file is. The input file is a [Tab] delimited
with the first row as field names. It is present on my PC (local drive)
Create an Excel file with your data and save it as a Tab-delimited text file on your local
drive.
8) Assign Files .
Execute step ‘Assign Files’ and the system automatically defaults the filename to the
source structure.
LSMW
52
9) Read DATA.
In this step, LSMW reads the data from the source file (from your PC’s local drive).
10) Display Read Data.
This step is optional. If required, you can review the field contents for the rows of data read
11) Convert Data.
This is the step that actually converts the source data (in source format) to a target
format. Based on the conversion rules defined, source fields are mapped to target
fields.
12) Display Converted Data.
Again this is an optional step to view how the source data is converted to internal SAP
format
13) Create Batch Input Session.
Once the source data is converted in an internal format, you can create a batch session to
process updates .
14) Run Batch Input Session.
You can execute the BDC session by Run Batch input session. Executing a batch input
session is a standard SM35 transaction for managing BDC sessions. Once you have
successfully executed the batch input session, the customer master records are updated in
the system. You can confirm this by viewing the customer master records (XD03).
Note! Browsing thru these 14 steps, you may get a feeling that this is a very lengthy and
time-consuming activity. However, for the purposes of demonstration, I have made it
detailed. Although it looks lengthy, actually it takes hardly few hours from start-to-finish!
After playing around with few simple LSMW scripts, you will find it so easy to change and
create more complex ones.

Lsmw by guntupalliharikrishna

  • 1.
    LSMW 1 T.code: LSMW ENTER GIVEPROJECT NAME, SUBPROJECT NAME , OBJECT
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
    LSMW 6 SELECT BATCH INPUTRECORDING RADIO BUTTON SELECT AND CLICK ON RECORDING OVERVIEW BUTTON
  • 7.
    LSMW 7 CLICK ON CREATERECORDING BUTTON
  • 8.
    LSMW 8 GIVE WORK CENTERLIKE AND ENTER THE GIVEN BELOW STEPS RECORDING TRANSACTION T.CODE : CR01 DO NOT USE TAB BUTTON AND ENTER BUTTON USE ALWAYS MOUSE, WHILE RECORDING TIME . GIVE RECORDING TRANSACTIONS : LIKE CRO1, CAO1, CSO1 for further Practice
  • 9.
  • 10.
    LSMW 10 Save and backarrow (f3) two times
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
    LSMW 33 Like above allfields Then save
  • 34.
  • 35.
  • 36.
    LSMW 36 Select legacy dataarea and click on add entry button (ctrl+f2)
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
    LSMW 50 THEORY: LSMW is atool used to transfer data from legacy system to R/3 periodically or once .It supports conversion of data and Batch Input, BAPI, IDOC or Direct Input can be used as the method for transfer of data. Total of 26 processing steps are available in LSMW ,In case of data transfer using Batch Input only 14 steps are required. Execute the transaction LSMW to start transfer of data, Before using the LSMW we should have good knowledge about the business object and the fields that will be transferred. The main screen of LSMW provides wizard-like step-by-step tasks, To complete your data conversion, you need to execute these steps in sequence. Once a step is executed, the cursor is automatically positioned to the next step. Note that these steps may look different depending upon your Personal menu settings. You could make step numbers visible by ‘Numbers on’ icon or hidden by ‘Numbers off’ icon. You can execute a step by double-clicking on the row. Toggle icon ‘Double click=Display’ or ‘Double click=Edit’, makes the step in ‘display’ mode or ‘change’ mode. There are 14 steps that are normally used and these are. 1) Maintain Object Attributes. 2) Maintain Source Structures. 3) Maintain Source Fields. 4) Maintain Structure Relations 5) Maintain Field Mapping and conversion rules . 6) Maintain Fixed Values, translations ,user defined routines. 7) Specify Files . 8) Assign Files . 9) Read DATA. 10) Display Read Data. 11) Convert Data. 12) Display Converted Data. 13) Create Batch Input Session. 14) Run Batch Input Session. 1) Maintain Object Attributes. In this example, you will be updating the customer master records with the help of recording a transaction (XD02). a. Choose radio button Batch Input Recording and b. click on the recording overview icon to record the R/3 transaction. c. Enter the Recording nameasXD02_REC,the description as Customer Master Updates
  • 51.
    LSMW 51 Recording, and the transactioncode as XD02(FS00 in case of gl accounts) Once the transaction is completed, R/3 records the flow of screens and fields and saves the information, 2) Maintain Source Structures. Give a name and a description to the source structure 3) Maintain Source Fields. In this step, you need to list what fields are present in the source structure. The easiest way is to click on ‘Table Maintenance’ icon to enter Fieldname, Type and Length for each field Note that your input file will have four fields as key fields and you need to update three fields in the system 4) Maintain Structure Relations Execute a step to ‘Maintain Structure Relations’. Since, there is only one Source and Target Structure, the relationship is defaulted automatically 5) Maintain Field Mapping and conversion rules . In this step, source/legacy fields in each structure are assigned to R/3 fields. It may be done individually for each R/3 field, which being time-consuming for complex structures or we can use automatic mapping utility (Extras > Auto-Field mapping). We can specify the conversion rule to be used to convert an LS field into the corresponding R/3 field. For this, use predefined conversion rules or create your own conversion rules in the editor. You may use the buttons ‘Initial’, ‘Constant’, ‘Move’ & ‘Fixed Value’ to assign different values. You may also assign different rules by using the button ‘Rule’. automatic mapping utility (Extras > Auto-Field mapping). 6) Maintain Fixed Values, translations ,user defined routines. 7) Specify Files . In this step, we define how the layout of the input file is. The input file is a [Tab] delimited with the first row as field names. It is present on my PC (local drive) Create an Excel file with your data and save it as a Tab-delimited text file on your local drive. 8) Assign Files . Execute step ‘Assign Files’ and the system automatically defaults the filename to the source structure.
  • 52.
    LSMW 52 9) Read DATA. Inthis step, LSMW reads the data from the source file (from your PC’s local drive). 10) Display Read Data. This step is optional. If required, you can review the field contents for the rows of data read 11) Convert Data. This is the step that actually converts the source data (in source format) to a target format. Based on the conversion rules defined, source fields are mapped to target fields. 12) Display Converted Data. Again this is an optional step to view how the source data is converted to internal SAP format 13) Create Batch Input Session. Once the source data is converted in an internal format, you can create a batch session to process updates . 14) Run Batch Input Session. You can execute the BDC session by Run Batch input session. Executing a batch input session is a standard SM35 transaction for managing BDC sessions. Once you have successfully executed the batch input session, the customer master records are updated in the system. You can confirm this by viewing the customer master records (XD03). Note! Browsing thru these 14 steps, you may get a feeling that this is a very lengthy and time-consuming activity. However, for the purposes of demonstration, I have made it detailed. Although it looks lengthy, actually it takes hardly few hours from start-to-finish! After playing around with few simple LSMW scripts, you will find it so easy to change and create more complex ones.