How To Use LSMW
How To Use LSMW
The information below will walk you through the process of creating a simple
LSMW. Once you’ve done this you’ll be able to see how useful the tool can be and
how LSMW is the right choice for most conversion and migration!
STEPS FOR CREATING AN LSMW.
1) Log on to SAP
2) Enter transaction code “LSMW”
3) If you receive the following screen either check the white box to no longer
display the message then click the green check or just click the green
check to continue.
4) Once the screen below appears, you are now ready to begin your LSMW
script creation.
6) If you receive the screen below, click the green check and continue.
7) Input the “Name”
8) Next click
18) Input recording fields as below then click the “green check”.
24) Next we need to remove the default values. The purpose is to create
parameter import names. To do this you must double-click into each default
value name.
25) After double clicking into a “field” you will see a screen similar to the one
below.
26) Remove the default value then input the field name and the description of the
field name. Click
27) Then .
28) Click to return to initial screen.
29) Click to return. . . . . Then “save”.
30) Next to return to Main Screen.
31) From this screen you will now move on to Step 2 of this process. Click .
32) Then click “change”
36) You will return to the Main Screen as below. Please note you’re now ready
for Step 3. Click Maintain Source Fields.
PLEAE NOTE THE FOLLWING:
To prepare for Step 3 you will require the field names. To get these you must
first go to Step 4, then Step 5 to obtain the field names, you will return to
complete step 3.
38) You will receive the screen below since we have not completed step 3. This
is a warning. Click .
39) Click “Change” and you will receive the warning again. Click the green
check and continue.
43) Make a list of all the fields or copy to an Excel file. You will use later in the
exercise. The format of your Excel file should appear as below.
The Character and Length fields will be obtained from Technical help. To do
this:
44) Open a new SAP Session, enter transaction code KS01. Click in the Cost
Center field then click “F1 help”. The screen below appears. Click on
“Technical Information.
47) Input your data to your Excel file as below. Save the file as a “.txt” format.
This is always required when importing data to LSMW.
48) After the excel sheet is complete we can now go to the third step. Click step 3
then execute.
49) Click change on the screen below
52) Press <enter> then , then twice. You will receive the screen below,
click “yes”.
53) We are now ready to begin step 4. Click “Execute”.
58) You will see the screen below. Click “No Confirmation”, then “return”.
59) On the screen below, Click <Enter>.
68) You can now test to see if LSMW will read your data on the “text” file.
Execute Step 8.
69) From the screen below, click <execute>. LSMW will read the data from your
text file.
70) The screen below shows that we have one record being read from our “.txt”
file. Click <return> twice to return to the Main Screen.
71) You are now ready to execute Step 9. This step displays the data.
(Please Note: If you wish to just use particular lines in your LSMW can use
the “From Line” and “To Line” to tell LSMW which lines from your file that
you wish to process. LSMW will only select those lines.)
73) The screen below shows that we will load one cost center. In this example the
cost center is “DCLLSMW01”. The purpose here is to verify that all the data
that you wish to load is being captured. Click <return>.
74) Next you’re ready to convert the data. That is the data is being converted
from your .txt file to the LSMW language. Execute Step 10.
75) From the screen below. Click <execute>. NOTE TO FILE EXPLAIN THE
NUMBER OF RECORDS CONVERTED.
76) The screen below shows that in our example one record is being converted.
Click <return> twice to return to the main screen.
77) Now you’re ready to display the data that you have converted. Click
<execute>.
80) Next you want to “Create Batch Input Session”. Execute Step 12.
81) The screen below appears. Click <execute>. This will create an SAP BDC
session (SM35).
82) The message below appears that you have created a Batch Input session.
Click <enter>.
83) You are now ready to process the BDC session. You do this by executing step
13 “Run Batch Input Session”.
84) You are automatically taken to transaction SM35. You now need to process
the BDC session by clicking on <Process>.
85) Select the session, Click Process, and a dialog box appears. You need to
choose your preferred processing mode. In our example we’re choosing to
process the session in “Background”. Click <Process>.
8) Click .
IMPORTING LSMW
9) To Import LSMW log on to the client in which you wish to import to.
12) Choose the file from the location you exported it to.
13) You will receive the screen below. Click the green check and continue.
15) You will see the screen below. Click the green check.
16) You are now ready to execute the LSMW in the client.