# SAP Datatools

- Link: https://www.lorenzo-datasolutions.com/sap-datatools/
- Published: 2017-03-31T17:38:52+00:00
- Author: Anipe Abraham

SAP Datatools , 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](https://www.lorenzo-datasolutions.com/successfactors-online-training/)
of steps which need to be followed, it is really quite simple and rather [versatile](https://www.lorenzo-datasolutions.com/sap-hr-infotype-headers/).

**Project Details**

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](https://www.lorenzo-datasolutions.com/sap-successfactors-sample-videos/),
then just use any names in the fields.

![SAP Datatool](data:image/gif,GIF89a%01%00%01%00%80%00%00%00%00%00%FF%FF%FF%21%
F9%04%01%00%00%00%00%2C%00%00%00%00%01%00%01%00%00%02%01D%00%3B "SAP Datatool")

Maintain Object Attributes

You will be presented with the screen shown below. [Click](https://www.lorenzo-datasolutions.com/employee-central-payroll-training/)
on the execute button to be taken to the next screen.

⌊SAP⌉⌊SAP⌉
 ⌊Datatools⌉

Another thing that you will note is that when you enter a detail screen, you will
by default be in display mode. [Click](https://www.lorenzo-datasolutions.com/employee-central-payroll-videos/)
on the change/display button to toggle to change mode. You can change this. See 
the [tips](https://www.lorenzo-datasolutions.com/payroll-control-center/) 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](https://www.facebook.com/LorenzoDataSolutions)
with the following screen:

![LSMW](data:image/gif,GIF89a%01%00%01%00%80%00%00%00%00%00%FF%FF%FF%21%F9%04%01%
00%00%00%00%2C%00%00%00%00%01%00%01%00%00%02%01D%00%3B "LSME")

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](https://www.linkedin.com/groups/8229784/).

Maintain Source Structures

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.

![lsmw tool](data:image/gif,GIF89a%01%00%01%00%80%00%00%00%00%00%FF%FF%FF%21%F9%
04%01%00%00%00%00%2C%00%00%00%00%01%00%01%00%00%02%01D%00%3B "lsmw tool")

Go back to the main LSMW screen.

Maintain Source Fields

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.

Maintain Structure Relations

Just go into this screen and click on the save button. There is nothing more required
in this step.

Maintain Field Mapping and Conversion Rules

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.

![SAP Data](data:image/gif,GIF89a%01%00%01%00%80%00%00%00%00%00%FF%FF%FF%21%F9%04%
01%00%00%00%00%2C%00%00%00%00%01%00%01%00%00%02%01D%00%3B "SAP Data")

Maintain Fixed Values, Translations, User-Defined Routines

You shouldn’t need to change anything on this screen. No need to save either.

Specify Files

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.

![sfsf](data:image/gif,GIF89a%01%00%01%00%80%00%00%00%00%00%FF%FF%FF%21%F9%04%01%
00%00%00%00%2C%00%00%00%00%01%00%01%00%00%02%01D%00%3B "sfsf")

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.

![sf ec](data:image/gif,GIF89a%01%00%01%00%80%00%00%00%00%00%FF%FF%FF%21%F9%04%01%
00%00%00%00%2C%00%00%00%00%01%00%01%00%00%02%01D%00%3B "sf ec")

Click on the green tick and then save and exit the screen.

Assign Files

You don’t need to do this step as you have already done it in the previous step.

Read Data

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.

Display Read Data

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.

Convert Data

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.

Display Converted Data

You can display the converted data if you are unsure about what data is to be loaded.

Create Batch Input Session

This step creates the actual batch input session for you.

Run Batch Input Session

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.

Tips and Tricks

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.SAP Datatools

If you go and maintain the object attributes you will reset any conversion rules
which you may have set up.SAP Datatools

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 SAP Datatools

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 SAP Datatools

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.SAP Datatools
