Sie sind auf Seite 1von 56

[Type here]

Document LSMW Manual Version No 1.1

Legacy System Migration


Workbench

Operation Manual

1
[Type here]
Document LSMW Manual Version No 1.1

Document Approval

Document Position Name Date

Prepared for the HCM Functional


second time by Consultant Mekete Alemesged 10/24/18

Reviewed by
Approved by

Document Revision History

Author/
Sections/Pages
Version Changed by Effective Date Reasons for Change Revised
1.0 07.12.2017 To update the document All Pages
Mekete Adding more steps for
1.1 Alemesged HCM Most pages

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted
in any form, or by any means electronic or mechanical including photocopying, recording or any information
storage and retrieval system without permission in writing from Fairfax Technologies.

2
[Type here]
Document LSMW Manual Version No 1.1

TABLE OF CONTENT

Introduction.............................................................................................................................................................1
1. Create a project, sub project and object...........................................................................................................4
2. Creating Recordings.........................................................................................................................................8
3. Define object attributes..................................................................................................................................26
4. Define Source Structure.................................................................................................................................30
5. Define source fields........................................................................................................................................32
6. Define Structure relations...............................................................................................................................37
7. Define field mapping and conversion rules....................................................................................................38
8. Define Fixed Values, Transactions, User-Defined Routines..........................................................................43
9. Specify Files...................................................................................................................................................44
10. Assign files.................................................................................................................................................56
11. Read data....................................................................................................................................................58
12. Display Read data.......................................................................................................................................60
13. Convert data................................................................................................................................................63
14. Display converted data...............................................................................................................................65
15. Create Batch input session..........................................................................................................................67
16. Run Batch input session.............................................................................................................................69

3
[Type here]
Document LSMW Manual Version No 1.1

Introduction
This document is prepared for HCM master data loading in bulk using LSMW.
The LSMW (Legacy System Migration Workbench) is a tool based on SAP software that supports single or
periodic data transfer from non-SAP to SAP systems (and with restriction from SAP to SAP system). Its core
functions are:

1. Importing legacy data from PC spreadsheet tables or sequential files


2. Converting data from its original (legacy system) format to the target (SAP) format
3. Importing the data using the standard interfaces of SAP (IDoc inbound processing, Batch Input, Direct
Input)

It is a very important tool and easy to learn and master it. LSMW has a recording tool, which can record the
transaction and the fields to be uploaded. Thus, upload of master data and transaction data is made very simple
in this tool. You can use this tools in almost all modules for upload of master data and too some extent
transaction data also.

The following are some of the frequently asked questions regarding LSMW. They will give you a good
highlight of what the system can and can’t do:

1. Which data can be migrated using the LSMW?

By means of standard transfer programs: a wide range of master data (e.g. G/L accounts,
customer master, vendor master, material master, bills of material) and transaction data (e.g.
financial
Documents, sales orders)
By means of recording of transactions: further data objects (if the transaction can be run in batch
input mode)

2. Is the imported data consistent?


Yes. The data is loaded via the standard interfaces of the applications. This will include all checks that
are run for online transactions. Invalid data will be rejected.
3. Are conversions carried out identically across the applications?
Yes. The LSMW works on the principle of central (reusable) rules. This approach guarantees that, for
example, the material number is converted in the same way
wherever the reusable rule is used for conversion.
4. Is an extensive knowledge of ABAP necessary to use the LSMW?
No. The LSMW provides the main conversion techniques at the push of a button. For complex
conversions, individual ABAP coding can be added.
5. Do I have to migrate table by table?
No. Business objects such as material master, customer master, or FI document are migrated.
6. Can I transfer data that is on my PC?
Yes. The LSMW can read the data directly from your PC. Only when using the periodic interface, the
data has to be on a server accessible by the SAP system.
7. Is the LSMW part of the standard SAP system?
It depends on the release of the SAP system:

4
[Type here]
Document LSMW Manual Version No 1.1

As of SAP Web Application Server Release 6.20, the LSMW is integrated in the SAP system.
Therefore, if you are using a SAP system of this release or higher, you use the system-integrated
LSMW
'out of the box'.
Only for releases lower than SAP Web AS 6.20, you have to install the standalone LSMW as
add-on. You can download the LSMW as add-on from the SWDC (Software Download Center) of the
SAP Service Marketplace.

8. Is there an extra charge for the LSMW?

No, both the integrated and standalone LSMW versions are free of charge to SAP's customers and
partners. For an explanation on 'integrated' versus 'standalone', see question above.
9. For which sap releases is the LSMW available?
There is an LSMW available for all SAP releases. However, it is important to make sure to use the
correct LSMW version. Newer SAP system releases (as of SAP Web AS 6.20) come with an 'integrated'
LSMW. Thus, there is no need to install an LSMW as add-on because it is already available in the
system. On the contrary, an installation of an add-on could lead to problems in this case. Only for
releases older than SAP Web AS 6.20, it is necessary to install the LSMW extra as add-on.

The following table contains an overview of the LSMW versions and the SAP releases they refer to:

LSWM
SAP System Release
Version

As of SAP Web Application Server Release 6.20, the LSMW is integrated in the SAP
LSMW system. This integrated version is referred to as 'LSMW 4.0'. Therefore, if you are using
4.0 a SAP system as of release SAP Web AS 6.20 or higher, you use this system-integrated
LSMW 4.0 'out of the box'.

LSMW 3.0 is the last standalone or add-on version of the LSMW. LSMW 3.0 is used
LSMW for
3.0 SAP systems with release SAP Web Application Server 6.10.

LSMW LSMW 1.8 is the standalone or add-on version of the LSMW used for SAP systems with
1.8 SAP Basis release 4.6.

LSMW LSMW 1.7 is the standalone or add-on version of the LSMW used with SAP systems
1.7 with SAP Basis releases 4.0 and 4.5.

LSMW LSMW 1.0 is the standalone or add-on version of the LSMW used with SAP systems
1.0 with SAP Basis releases 3.0 F and 3.1x.

In this document, using LSMW Positions will be uploaded in bulk to their respective department’s

5
[Type here]
Document LSMW Manual Version No 1.1

1. Create a project, sub project and object

In LSMW there is a project, sub project and an object. We can use LSMW with so many records inside it for
uploading various master data and transactions in SAP system so in order to classify easily that creating those
three mentioned attributes is important.
One project, subproject and an object specifically describe a record of one master data or transaction so with
that in mind on this document we create a project, subproject and an object for uploading a vendor master data,
HCM OM master data such as positions in bulk to their respective organizational units and hire Employee using
PA40.

Type transaction code “LSMW” in the command field.

Click to continue The following Window will appear:

6
[Type here]
Document LSMW Manual Version No 1.1

Click to continue.

If you do not want this message to appear every time you work on LSMW, click on the check box that says “No
Longer Display This message”

Creating a new Project


After clicking on the previous step, the following window will be displayed.

Click on to create a new Project. Then update the Project name and Description on the window that will
appear as illustrated in the figure below.

7
[Type here]
Document LSMW Manual Version No 1.1

Then Click

Creating a sub-project
On the following window give the name and description of the sub project you want to create as illustrated in
the following figure.

Click to continue.

Creating an object description


On the next window, enter the object name and description.

Click to continue.

After the previous step, the following window will appear showing us the names of the project, subproject and
object we created with their respective descriptions telling us we have successfully created our LSMW project.

8
[Type here]
Document LSMW Manual Version No 1.1

2. Creating Recordings
Now we will proceed to Recordings since we want to record a transaction. In this document we will create
Vendor Master Data.
Important:
Important:

Please note that before you start the recording you should first actually perform this transaction
manually and plan what data you want to capture for upload purpose. This is required so that you
avoid mistakes while recording.

While recording you should not press “Enter” or click on . Before you finish filling the form
with the required information. You should only press enter after you have completed entering all the
details on the window.

Since you shouldn’t use the list button ( ), you should also know the data you are going to enter
before you start this operation.

Click on “Go to” then on “Recordings” on the last window

The following window will appear:

Click on to create recordings. The following window will appear

9
[Type here]
Document LSMW Manual Version No 1.1

Enter the name of the recording and the description of the recording on the spaces provided. The filed “Owner”
describes who is creating the recording. Then click on

The following window will be displayed.

Give the transaction code of the master data we are importing


In this step we input the transaction code of the operation we are performing. In this case, since we are
importing vendor master data we insert FK01. Then click on

10
[Type here]
Document LSMW Manual Version No 1.1

Enter relevant recordings


Please make sure you take note of the important note above when creating the recordings. Note that the
recording screen that are going to appear when creating records are specific to vendor master data. Other data
will have different information to input and hence different screens.

Please enter the appropriate information on the relevant spaces on the following consecutive screens. Press
“Enter or ” when you finish inserting data on a screen.

11
[Type here]
Document LSMW Manual Version No 1.1

When you reach the end, click on save button and the following screen, will appear.
Then Click from the application toolbar to update the field name. The screen will change as shown in
the image below.

Then Click on to save your work.

Note: Make a note of the name of the recording you created (pointed by the
arrow) and the other fields since they will be required later.

Click twice to go back to the project window. The following window will be displayed.

12
[Type here]
Document LSMW Manual Version No 1.1

Then click for further process steps.

3. Define object attributes

There are sequential process steps you must follow to upload a file. We start our process with maintaining object
attributes. Here we maintain the attributes of the object VENDORS. We link the recording created to the object
VENDORS.
The following window will appear after you click as mentioned in the previous step.

13
[Type here]
Document LSMW Manual Version No 1.1

Click to Maintain Object Attributes


Display object attributes
After clicking on the last step, the following window will be displayed.

Then Click to change form “Display” to “Edit” mode


Note: Whenever you are working on these steps, you have to change the “Display” mode
Into “Edit” mode on the menu bar. To change from the “Display” mode into the “Edit” mode, click on form
the menu bar

14
[Type here]
Document LSMW Manual Version No 1.1

Make the following changes on the screen shown above after changing to edit mode.
Click the radio button that says, “Batch Input Recording” to select the recording we saved as illustrated in the
figure below.

Select the name of the recording you created earlier from the dropdown menu on the object that says
“Recording” as illustrated below.

Choose the name of the recording you saved on “Create Recording” step.

As a result of changes made the following screen will appear.

Click to save the recording you chose and then Click to go to the next step.

15
[Type here]
Document LSMW Manual Version No 1.1

4. Define Source Structure


Notice that the selected step has automatically moved to the next step Define Source Structures. Each time you
perform a transaction the radio button moves to the next step automatically. Also notice on the extreme right-
hand side under the column Last action (date, time, and user). This is updated with information each time the
transaction is performed. (Notice the two arrows in the image below)

Here we maintain the source structure for the LSMW.

click to continue execution. The following screen will be displayed.

Click to change to edit mode and click to create a new source structure. The following window will be
displayed.

16
[Type here]
Document LSMW Manual Version No 1.1

Give a name and description of the source structure as illustrated in the figure below. The name of the source
structure we created is Z91FK01. Z91 represents the project name we created earlier and FK01 represents the
transaction code we are working on. It is good practice to give names in this way.

Click to finish creating the source structure, click to save your work and then click to go to the next
step.

5. Create Table Names, CHAR type, and length of char type


from Object Overview.
Now go back to the LSMW Workbench, which is the screen below, and click on Object overview TAB.

Now before defining source fields click on and


The following dialog box will popup.

17
[Type here]
Document LSMW Manual Version No 1.1

Plese select Table, then your selection will lead you the following table.

Press CTRL, then select columns, and paste it to an Excel spreadsheet in order to get the proper TABLE name,
type of character and their length.

Once loaded on spreadsheet arrange the columns exactly as in the following order.

18
[Type here]
Document LSMW Manual Version No 1.1

As you can see above, we are only interested in the columns and rows highlighted as yellow.

6. Define source fields


Here we maintain the source fields, which are to be updated with the data. The main thing to be done in this step
is importing the notepad file, which holds the data base field names.

click to execute the action. The following screen will be displayed.

19
[Type here]
Document LSMW Manual Version No 1.1

Click to change to edit mode.

Position the cursor on the source filed name, in this case LUNABULKLOADINGPOSITION, as illustrated in
the figure above.
Then Position the cursor on the Table maintenance icon. and click it.

The following table will appear . Copy and paste the spreed sheet that has table name , type of character and
length you created earlier.

After you paste the spreadsheet data it will look like this.

20
[Type here]
Document LSMW Manual Version No 1.1

After clicking enter the following screen will apperar.

Click save and Press Go Back to the previous screen.

21
[Type here]
Document LSMW Manual Version No 1.1

As you can see all the data base field names are imported to the source field now. You can also change each
field’s length by double clicking on it. (Look at the arrow on the image)

If you want to change the filed length, double click on the field name. The following window will be displayed.
The default filed length given to all fields is 10. If you think the attributes that are going to be imported to the
specific fields need more than 10 characters, you can change length on the “Filed Length” attribute as illustrated
below.

35
Once you are done with the updates, click then click to save the imported file and Click to go to the
next step.

7. Define Structure relations


22
[Type here]
Document LSMW Manual Version No 1.1

We do not do anything in this step except moving to edit mode and saving our action. After the previous step,
the following window will appear.

Click . Then the “Display Structure Relationships” window will appear.

Click to go to edit mode then, click to save and then click go to the next step.

8. Define field mapping and conversion rules


Here we create a link between the system fields and the source fields maintained in the earlier step. The
following window will be displayed after the previous step.

23
[Type here]
Document LSMW Manual Version No 1.1

Click to start the execution. The following screen will be displayed

Click to change to edit mode from view mode.

In this step we map the fields we imported earlier. Click “Extras” then “Auto Filed Mapping “on the menu
bar as illustrated in the figure.

24
[Type here]
Document LSMW Manual Version No 1.1

Then the following screen will be displayed.

25
[Type here]
Document LSMW Manual Version No 1.1

Click to continue.

Then, the following window will be displayed. In this step, every table fields will be mapped automatically.
Click “Enter” until you get a completion message of the auto filed mapping.

After the execution ends, the following window will be displayed.

Click to continue. Then the following screen will be displayed.

26
[Type here]
Document LSMW Manual Version No 1.1

Click to save the mapping then click to go back to the next step.

9. Define Fixed Values, Transactions, User-Defined Routines

As you can see on the figure below, the selected step is “Define Fixed Values, Transactions, User-Defined
Routines” step. You have to skip this step and go to the “Specify Files” option. Click and
then click

27
[Type here]
Document LSMW Manual Version No 1.1

10. Specify Files

In this step you import an excel file with the data you want to upload to SAP. Once you created a recording for a
specific master data or transactions, you can start from this step for uploading your file. After the previous step,
the following window will be displayed.

Click to start the execution. The following screen will be displayed.

28
[Type here]
Document LSMW Manual Version No 1.1

Click to change to edit mode from view mode. The following screen will be displayed.

Before we attach the file for upload, we must create the file with the corresponding records. Use the excel file
you already prepared earlier for creating the file to be uploaded.
1. First step is to load the recording inputs in to a text file. Click on “Goto” then on “Recordings” on
the last window.
2. The following scree will appear, go to recordings and double click the recordings s shown below.

29
[Type here]
Document LSMW Manual Version No 1.1

3. In the Following Screen shown below follow the highlighted list and save the file.

4. Saving file to a directory where it is accessible by SAP Basis.

30
[Type here]
Document LSMW Manual Version No 1.1

Converting Text with Tabs to Spreadsheet format


Select the “Text with Tabs” radio button on your screen and click as shown in the figure below.

The following screen will be displayed.

Click on button on the “Directory” filed (File name) to select the destination of the file you are going to
export. The following screen will be displayed which will save your file on your computer.

31
[Type here]
Document LSMW Manual Version No 1.1

Give the file name and select where you want to save your file and click “Save”. The following screen will be
displayed. Give a file name that suitable to your understanding but make sure that it is the recording your are
working with which is the result of transaction PP02.

Click “Generate” Your file will be created and stored in the directory you chose.

Go to the directory you saved your file and open the notepad document. Your notepad file will look like the one
displayed below.

32
[Type here]
Document LSMW Manual Version No 1.1

Copy all the contents of the notepad file and paste it to an excel document. Make sure each column in the
notepad file gets its own column on the excel file.
After you paste the contents of the notepad file, your excel file should look like the one displayed below.

Display the excel file


The excel file you created will look like the one in the figure below. This excel sheet you saved includes the
data you entered in the recording field names of those entries and database field names inside the SAP
system.

33
[Type here]
Document LSMW Manual Version No 1.1

Delete unnecessary rows


Delete rows, which do not have complete data on all three columns namely table name, filed name and filed
description columns (the columns are indicated by the arrow on the above figure). After removing the
unnecessary rows your excel file will look like the figure below.

34
[Type here]
Document LSMW Manual Version No 1.1

Creating the file with the corresponding records


After copying the column, go to another sheet or excel file and paste it. Since you want the fields on the row of
the excel file rather than the column, choose “Paste Special” then “Transpose” when you paste the copied
column as illustrated in the figure below. (Look at the figure below)
Now COPY and paste the Column names and their respectively Horizontally on Excel.

After pasting the rows should look like below.

35
[Type here]
Document LSMW Manual Version No 1.1

The Next step is to prepare the note pad file that is going to be downloaded to LASMW.
Copy the rows you prepared on Excell as showed above to a note pad only the values and not column name as
the figure below.
Open a note pad and copy and paste the row you prpared several times as many records you want and change
the value SHORT and STEXT as below.

36
[Type here]
Document LSMW Manual Version No 1.1

Save the notepad file where it can be accessed by LSMW.


Specifying and Uploading the File
On your SAP window, you will see the following screen.

37
[Type here]
Document LSMW Manual Version No 1.1

Double click on button to select the file to upload. The


following screen will be displayed.

To choose the file you want to upload click on then choose the notepad file you saved in the previous step as
illustrated in the figure.

38
[Type here]
Document LSMW Manual Version No 1.1

Click to upload your file.

After you upload the file change the delimiter of the file from “No Separator” to “Tabulator”. We used
“Tabulator” because we used tab to separate our numbers in the notepad file earlier.

On “Name” filed, write the name of the notepad file you just uploaded

The screen you should see after making these edits is illustrated below.

39
[Type here]
Document LSMW Manual Version No 1.1

click to upload your file.


After the uploading is done, the following window will be displayed. This window will have information a bout
the file you just uploaded, as illustrated below.

40
[Type here]
Document LSMW Manual Version No 1.1

Click to save the uploaded file and then click to go to the next step.

11. Assign files

We do not do anything in this step except moving to edit mode and saving our action. After the previous step,
the following window will be displayed.

Then click to go continue. The following window will appear.

Click to go to edit mode. Then Click to save and Click to go to the next step.

41
[Type here]
Document LSMW Manual Version No 1.1

12. Read data

In this step, the system reads the data you uploaded on the notepad file earlier. After the previous step, the
following window will be displayed.

Then click to start the execution of the action. The following window will be displayed.

Click to move to the next step. The following window will be displayed

42
[Type here]
Document LSMW Manual Version No 1.1

The above window shows you the number of transactions read, written and not written from the data you
uploaded. If there are records that are not written, you can see them in this step and you have to go back and fix
the error that caused them not to be read.
After you make sure that there are no errors, click twice to move to the next step.

13. Display Read data

This step is very important. In this step, you will see whether there are any errors. You will see whether the data
passed on from the file is mapped to correct field. Therefore, you should go through a few records to see
whether they are correct or not.
The following window will be displayed after the previous step.

43
[Type here]
Document LSMW Manual Version No 1.1

Click to start the execution of this action. The following screen will be displayed.

In this window you will see the project, the sub-project, the type of data you are importing and the file read
from the previous step.

Click to continue. The following window will be displayed.

44
[Type here]
Document LSMW Manual Version No 1.1

In this step, you will see all the data you imported. (Illustrated on the figure above) You can click on each of
them to display details of the individual line of data imported. As mentioned earlier, it is recommended to check
a few records to see if the data is properly imported. Double click on the records to view details of the data.
Then the following window with the details will appear.

45
[Type here]
Document LSMW Manual Version No 1.1

On this window you can check if both the field names and field values are correctly filled and imported to the
SAP system. Click to go back to the previous window to check another record. When you are done
checking the records click twice to go to the next step

14. Convert data


In this step the read data is converted from source format to target format. After the previous step, the following
window will be displayed.

Click to start execution. The following window will be displayed.

Click to continue. The following window will be displayed.

46
[Type here]
Document LSMW Manual Version No 1.1

This window will show you the details of the converted data. Click twice to go back to the next step

15. Display converted data

In this step we display the converted data. In this step also, it is good to see some records to make sure that they
are converted correctly. After the previous step, the following window will be displayed.

47
[Type here]
Document LSMW Manual Version No 1.1

Click to continue. In this window you will see the project, the sub-project, the type of data you are
importing and the file read from the previous step.

Click to continue. The following window will be displayed.

Then double click on the records to view details of the data. Then the following window with the details will
appear.

48
[Type here]
Document LSMW Manual Version No 1.1

On this window you can check if both the field names and field values are correctly filled and converted to the
SAP system. Click to go back to the previous window to check another record.
When you are done checking the records click twice to go to the next step

16. Create Batch input session


In this step, we create the Batch input session for the upload data. Note that the data will not updated when you
create Batch input session. After the previous step, the following window will appear.

49
[Type here]
Document LSMW Manual Version No 1.1

Click to start execution. Then the following window will appear. This window has information about the
batch input folder.

Click to continue. Then the following screen will be displayed showing a success message and the number
of transactions created.

Click to finish.

50
[Type here]
Document LSMW Manual Version No 1.1

17. Run Batch input session

In this step, we execute the Batch input session. The batch input session alters the SAP database tables. It is
good practice to execute the Batch input session for a few records in foreground before running it on the whole
data on the background. This will help us test wheatear the data is being uploaded correctly. After you make
sure the data is being uploaded to the tables correctly, you can run the process on the background.

After the previous step, the following window will be displayed.

Click to continue execution. The following window will be displayed. This window has information about
the session we successfully created in the previous step.

Select the session you want to execute. In this case there is only one session and we select that.

51
[Type here]
Document LSMW Manual Version No 1.1

Then click The following window will be displayed.

Run the first record in foreground. Click


After this step, consecutive windows will appear which perform the upload step by step.

52
[Type here]
Document LSMW Manual Version No 1.1

Click to continue.

Click to continue.

53
[Type here]
Document LSMW Manual Version No 1.1

You can see in the above figure at the bottom left corner there is a message saying a record is created .Click

to continue.

When the upload of the fist row of the data is completed, the following window will be displayed.

54
[Type here]
Document LSMW Manual Version No 1.1

Click
Now again select and process in background for the next record.

Click

After the background execution is finished , the following window will be displayed.

Click to see the overview of the uploaded data


You can get information about the success of the action you requested on the session overview. The total data
you wanted to upload can be found on the column pointed by the blue arrow, the total data which was
successfully uploaded can be found on the column pointed by the green arrow and the total data which was not
successfully uploaded can be found on the column pointed by the red arrow.

55
[Type here]
Document LSMW Manual Version No 1.1

Click to go back to SAP Easy Access Window.

Check if positions are loaded with the transaction code S_AHR_61016502 and you will get the screen below.

This brings us to an end of creation and execution of LSMW.

56

Das könnte Ihnen auch gefallen