You are on page 1of 28

SAP S4HANA SD

SALES ORDER CREATION USING LSMW


SALES ORDER CREATION
USING LSMW
LSMW - STANDARD BATCH/DIRECT INPUT
Prepared by MR. Suresh Kola

OVERVIEW & PURPOSE

LSMW (Legacy System Migration Workbench) is a software-based SAP tool for single or
periodic data transfers from non-SAP to SAP. This transaction is often used during
cutover activities to upload master data like customer master, material master, condition
master, etc.

There are 4 types of methods to upload the data as part of the LSMW.

This document explains the steps to upload the sales orders using the “Standard
Batch/Direct Input method”.

STEPS

PROJECT CREATION

Execute the transaction LSMW, create a project and then click on execute button.

1
MAINTAIN OBJECT ATTRIBUTES

Select Maintain object attributes steps and then click on execute button.

Select the Direct Input method and save the attributes.

2
MAINTAIN SOURCE STRUCTURES

Select Maintain source structures and click on execute button.

Click on the create button and create the source structures as shown below.

You need to Create Item structure and partner structures under Header data.

3
You can also refer to the standard data structures for your reference.

To check the standard structure alignment, select Maintain source structure and click on
the Object Overview button.

Click on List button when a dialog box pops up,

Below are the standard structure alignment which are to be followed.

4
MAINTAIN SOURCE FIELDS

Once the required source structures are created, select maintain source fields and click
on execute button.

Click on source structure and click on table maintenance button.

NOTE: We must include the OLDNR field in all the source structures as it will be the
identifier/link between, Header, item, partner data, etc.

5
Maintain the required data load fields in each source structure and save the source
fields.

MAINTAIN STRUCTURE RELATIONS

Select maintain structure relations and click on execute button.

6
Select target structure and assign the source structure by clicking on the Relationship
button and then save the relationships.

MAINTAIN FIELD MAPPING AND CONVERSION RULES

Select maintain field mapping and conversion rules and click on execute button.

7
Select the target field, click on the source field button and then map the source field.

You can also use auto field mapping if the source and target field names are the same.

8
NOTE: While using the LSMW, there would be issues in converting the source field value
to target field.

In order to avoid such issues, We need to convert the source field value into the required
format of sales order creation or we need to implement conversion logic for the required
fields.

For example, There is a customer code 10000 in the source field which is not accepted
while creating the sales order using LSMW as the leading zeros are missing. In this case,
the system needs customer code in the 10 digit format with remaining leading zeros
“0000010000”.

For this, you can make use of the function module to convert the customer code into
required format under this step.

Double click on the field.

9
Implement the conversion logic and any other validations before data conversion.

SPECIFY FILES

Select the Specify files and click on the execute button.

10
Before this, We need to prepare an excel sheet with the Header data, Item data and
Partner data as per our source structure fields.

Then copy the data from the excel sheet and prepare three different Text files. I.e.,
Header data, Item data and Partner data.

11
Once the Text files are created as per the defined structures, Select Legacy data on the PC
and click on Add entry button.

12
Select the files, choose Tabular radio button, choose ASCII button under Code page and
then press enter. Repeat the same for all the data files.

Under converted data, Logical file and Logical path must be maintained.

13
FINDING LOGICAL FILE

In order to find the Logical file name, go to the first steps “Maintain object attributes”,
click on the display button beside the program name.

Navigate to the GC_FILENAME and find the hard coded value.

Go to the transaction FILE, and find the Logical file name under the below node and then

14
click on Details button.

As shown in the below screenshot, Logical file name and Logical path needs to be
mapped in the previous step and the converted file name should be maintained under
the physical file field. Data format should be ASC as selected while specifying the data
files and the application area should be SD.

15
Copy the Logical path from the above step and double click on Logical file path
definition.

Select the Logical file path and couple click on Assignment of Physical paths.

Click on New entries and add the Syntax group and Physical path.

Syntax groups are most probably similar to Operating systems which you can find from
System→Status.

Physical path must be <FILENAME>.

16
ASSIGN FILES

Select Assign files and click on execute button.

Select source structure, click on assign files and assign the relevant file to it.

17
READ DATA

Select read data and click on execute button.

18
CONVERT DATA

Select convert data and click on the execution button.

19
DISPLAY CONVERTED DATA

Cross check the converted data before attempting further steps and correct it necessary.

START DIRECT INPUT PROGRAM

Select start direct input program and select either program or transaction option.

20
PROGRAM RVINVB10

In the program option, the system creates sales orders online/foreground.

Nothing is needed to do here except clicking on the execution button.

Once the program is executed, a sales order will be created.

21
This can be cross checked in the VA03 transaction.

VARIANT CREATION FOR BMV0

The second approach is using the transaction BMV0.

Execute the transaction and then click on the execution button.

22
Click on the Define Job button.

Click on new entries, enter the Job name, Program name and Variant name. Click on
Maintain variants.

23
Click on the create button.

Click on Variant attributes.

Enter the description, activate Only background processing and save it.

24
JOB CREATION USING BMV0

Execute the transaction BMV0 and click on Start new job.

Select Job name and click on start immediately.

25
A job entry will be created as shown in the below screenshot. You can also click on the
update button if a bulk upload is under process.

Select the Job name and click on the Job log button to check the sales order creation
status.

26
You can find the job log status with the created sales orders.

THANK YOU

27

You might also like