Ad Blocker Detected
Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.
SAP HR Legacy System Migration Workbench (LSMW)
LSMW is a really useful tool available in SAP.
If you haven’t used it before then it may appear a bit daunting, but in fact apart from the large number of steps which need to be followed, it is really quite simple and rather versatile.
Before you enter the actual details for the transfer, you need to choose a project, sub-project and object. Choose existing ones or create new ones as appropriate. This is effectively your filing system for LSMW. If you are an organised person these options will be important to you. If not, then just use any names in the fields.
You will be presented with the screen shown below. Click on the execute button to be taken to the next screen.
Another thing that you will note is that when you enter a detail screen, you will by default be in display mode. Click on the change/display button to toggle to change mode. You can change this. See the tips and tricks at the end of the document, or the separate Batch Recording document, to see how this can be done.
You now need to create a recording which will be used as a basis for the transfer. The process is very similar to creating CATT procedures or BDC sessions in SAP or recording macros in MS Excel or Word.
Choose the menu path: Goto > Recordings Overview
Click on the create button.
Enter the recording and the description.
Enter the transaction code and go through the process of entering your data. Enter all of the data that you require, even though there may be default entries in SAP.
Once you have finished your recording you will be presented with the following screen:
What you need to do now is let SAP know which fields you wish to load data into. Click in the relevant field and click on the button “default”.
Once you have chosen all the relevant fields, save your entries.
Use the green back arrow to go back to the screen titled LSMW Workbench: Change Object Attributes. Choose your recording from the drop down values in the available recordings.
Save and then green arrow back to the main LSMW screen with the radio button set on the next step in the process. LSMW generally defaults the radio button to the next action in the LSMW process.
When you enter this screen you will notice that there is no detail. Click on the create icon to create your source structure. Choose a meaningful name and description and then save.
You should end up with something looking very similar to the screen shot below.
Go back to the main LSMW screen.
Select your entry with the yellow background. You now need to create your source fields. This can be done individually or by mass entry. To create them individually choose the create button. To enter many fields choose the table icon.
It is useful to ensure that the field name is the actual field name used in SAP. Generally the type will be “c”. Enter the number of characters as they are from SAP. You can get this by choosing help on the field and going to “technical information”. Double click on the entry “data element” in the dialogue box. This will take you to the Data Dictionary which will give you this information. Of course you can use transaction code SE11 and get this information a bit quicker.
Once done, you will see the fields entered with a powder blue background, underneath the yellow structure. Save your entries before going back to the main LSMW screen.
Just go into this screen and click on the save button. There is nothing more required in this step.
When you go into this screen you should see your fields listed. You now need to link these fields to the fields which are contained in your data file.
Click on each field and choose the “create” icon. You will be presented with a list of fields from the source structure. If you have named all of your fields correctly, it should be a relatively easy task of choosing the relevant field.
You shouldn’t need to change anything on this screen. No need to save either.
Here you specify the file for your source data. Choose the option for “Legacy data On the PC (frontend)” and click on the create option – as can be seen in the screen shot below.
At this point you should have saved your source data. The easiest way is to save it in Excel as a text file (tab delimited). If you have field names in row 1 then you need to ensure that the checkbox for the label “Field names at the beginning of the file” is ticked.
Make sure that your separator is set to “tabulator” if you have saved your source file as a text file. All the other settings do not need to be changed and can be seen in the screen shot below.
Click on the green tick and then save and exit the screen.
You don’t need to do this step as you have already done it in the previous step.
This just does exactly what the title says. It reads the data from your input file. Check the number of records to see that the number read is approximately what you are expecting to load.
You can read the data to see that all the data has been loaded and in addition that all the columns and fields containing the data have been loaded as well.
You need to run this step as the program needs to convert the data into a format which it can use to run the batch input sessions.
You can display the converted data if you are unsure about what data is to be loaded.
This step creates the actual batch input session for you.
You now need to run the batch input session to update the infotypes, tables, database etc.
Once this has been run successfully you have effectively completed the data upload process.
Personal Menu – this allows you to turn certain steps on and off. It is wise to turn off certain steps if you know you are not going to use them. If you are unsure, don’t worry – it is fairly intuitive. Items that have not been selected will get switched on by the program if it needs them. Alternatively, you will get an error message letting you know that a certain step is required. Just go and turn it on to execute it.
Numbers on/off – this places a number at the start of each line. Having the numbers on can make it easier to use for some people as they will be able to reference the numbers rather that the actual text items.
If you would like to enter each screen in “change” mode rather than “display” mode, you need to click on the button “doubleclick=display”. It will change to “doubleclick=change”. Once this is showing, you will enter each screen in change mode rather than display mode. Click it again to toggle back to display mode as default. The downside about going in on change mode is that you will get an error message if you have not maintained a dependent entry. The positive aspect about this is that at least you get to know up front which step you should maintain first.
Object Overview – this can be output as a list or a table.
Action Log – this shows you which steps you have executed and at what time.
If you go and maintain the object attributes you will reset any conversion rules which you may have set up.
Remember to keep your field lengths the same for both instances of the field. If not then you will get a warning message from SAP.
Remember to have the date format in the same format as you have set it in your SAP client. It is sometimes easiest to leave off any internal formats. For example 31/12/9999 can simply be shown in the file as 31129999. SAP will apply your default formats to the data anyway.
Once you have created your recording and are choosing the fields to use and select as defaults, you can delete the fields which are not required.