Вы находитесь на странице: 1из 21

SAP LSMW for Massive Uploads

Handbook
OpenText Folder: Plant Operations/09 PM/Manual
Document Name: 09 PM 130314 [HBK] SAP LSMW for Massive Uploads ADM.IT
Authors Reviewers Approvers Receivers
Rev Revision Description Date
IT PLANT AP IT PLANT AP IT PLANT AP

1.0 Massive Uploads Procedure using LSMW. JESPEJO JESPEJO OLORENZO 14/03/13

Additional Notes:
This document contains information which may be confidential and/or privileged. The information is intended solely for the individual or entity
named above and access by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or use of the
contents of this information is prohibited. If you have got this information in error, please inform to the owner..
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 2 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

Table of Contents
Step-by-Step Guide for Using LSMW to Update Master Data ...................................................... 3
Demo Example 1 ............................................................................................................................. 3
LSMW to Update Maintenance Plans Records with Transaction Recording .............................. 3
Step 1: Maintain Object attributes ................................................................................................. 3
Step 2: Maintain Source Structures............................................................................................... 7
Step 3: Maintain Source Fields ...................................................................................................... 7
Step 4: Maintain Structure Relations ............................................................................................. 8
Step 5: Maintain field mapping and conversion rules .................................................................. 9
Step 6: Maintain fixed values, translations, user-defined routines ........................................... 10
Step 7: Specify files ...................................................................................................................... 10
Step 8: Assign files ....................................................................................................................... 12
Step 9: Read data.......................................................................................................................... 13
Step 10: Display read data ........................................................................................................... 14
Step 11: Convert data ................................................................................................................... 14
Step 12: Display Converted data ................................................................................................. 15
Step 13: Create batch input session ........................................................................................... 16
Step 14: Run Batch Input Session ............................................................................................... 17
Demo Example 2 ........................................................................................................................... 18
LSMW to Update Maintenance Plans Records with Standard Object ....................................... 18
Step 1: Maintain Object attributes ............................................................................................... 18
Step 4: Maintain Structure Relations ........................................................................................... 18
Step 5: Maintain field mapping and conversion rules ................................................................ 19
Step 12: Display Converted data ................................................................................................. 20
Step 13: Create batch input session ........................................................................................... 20

NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 3 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

Step-by-Step Guide for Using LSMW to Update Master Data


This document contains instructions to use LSMW to update Master Data. It has two demonstration examples:
one using Batch Recording and another using standard SAP Object.

Demo Example 1
LSMW to Update Maintenance Plans Records with Transaction Recording

Call Legacy System Migration Workbench by entering transaction code LSMW. Every conversion task is
grouped together as Project / Subproject / Object structure. Create a Project called PLANTEST and a
Subproject as PLANS and Object as PLANSQAS as shown in Fig 1.

Fig 1 Conversion Task with Project, Subproject and Object

The main screen of LSMW provides wizard-like step-by-step tasks, as shown in Fig 2. To complete your data
conversion, you need to execute these steps in sequence. Once a step is executed, the cursor is
automatically positioned to the next step.

Note that these steps may look different depending upon your Personal menu settings. You could make step
numbers visible by Numbers on icon or hidden by Numbers off icon. You can execute a step by double-
clicking on the row. Toggle icon Doubleclick=Display or Doubleclick=Edit, makes the step in display mode
or change mode.

Fig 2 LSMW Wizard initial screen

Step 1: Maintain Object attributes


In this example, you will be updating the Maintenance Plan with the help of recording a transaction IP42:

NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 4 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

Fig 3 Batch Input Recording

Click on new Recording: (Fig 4)

Fig 4 Creating an Input Recording

Define a name and description for the recording: (Fig 5)

Fig 5 Creating Recording

Enter the number of the transaction to be recorded. (Fig 6)

Fig 6 Transaction to be recorded

Then follow the sequence of the process to create the master data (i.e. maintenance plan):

Fig 7 Maintenance Plan Initial Screen

Complete all the relevant information: (Fig 8)

NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 5 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

Fig 8 Maintenance Plan Main Data Screen

Click on: Default all to auto match the structure fields. (Fig 9)

Fig 9 Default All auto match

Note that the fields are populated with default values. The values you entered when you recorded the
transaction are set by default.

Note that if you have more fields in the recording than needed, you can remove them by clicking Remove

Screen field icon.

The final matching must be finished with the following structure (Fig 10).

NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 6 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

Fig 10 Transaction Recording Overview with screen field attributes

Go back and then it shows the recording: (Fig 11)

Fig 11 Recording created

We have to complete the name of the recording and Enter. (Fig 12)

Fig 12 Batch Input Recording


Save your changes . Then you go back to the initial screen.

NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 7 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

Step 2: Maintain Source Structures

It will show that the initial screen steps have changed. Since you want to import data via the BDC method, the
Direct Input and IDoc-related steps are hidden, as they are not relevant.

Fig 13 LSMW screen step 2

Create a new structure and complete the fields (Fig 10):

Fig 14 Source Structure


Save your changes . Then go back to the initial screen.

Step 3: Maintain Source Fields


In this step, you need to list what fields are present in the source structure.

Fig 15 LSMW Screen Step 3

Click on Structure name and then click on as shown (Fig 16).

Fig 16 Edit Source Structure

Complete the information in the fields (Fig 17)

NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 8 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

Fig 17 Source fields of source Structure

Save your changes . Then go back to the initial screen. It shows the final structure

Fig 18 Fields of source Structure

Save your changes . Then go back to the initial screen.

Step 4: Maintain Structure Relations


Execute a step to Maintain Structure Relations (Fig 19). Since, there is only one Source and Target
Structure, the relationship is defaulted automatically.

Fig 19 LSMW Screen Step 4

NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 9 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

Fig 20 Structure Relationship

Save your changes . Then go back to the initial screen.

Step 5: Maintain field mapping and conversion rules

Execute the option 5 Maintain Field Mapping and Conversion Rules.

Fig 21 LSMW Screen Step 5

This is the list of the recording structure to be recorded (Fig 21).

Fig 22 Fields Mapping and Conversion Rules

Its possible to use these buttons to match Recording fields with our structure (Fig 23). Also you can set each
field with a constant or predefined value.

Fig 23 Option to map source fields

Once all the fields are mapped, you should have an overview screen as shown (Fig 24).

NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 10 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

Fig 24 Field mapping and Conversion rules overview

Save your changes . Then go back to the initial screen.

Step 6: Maintain fixed values, translations, user-defined routines

You can also maintain re-usable translations and user-defined routines, which can be used across conversion
tasks. In this case, that step is not required.

Step 7: Specify files

Execute 7 Specify Files (Fig 25).

Fig 25 LSMW Screen step 7

NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 11 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

Create an Excel file (Fig 26) with your data and save it as a Tab-delimited text file on your local drive (C:\) and
name it Plan1.txt.

Fig 26 Source data in Excel file (saved as Tab delimited file)

In this step, we define how the layout of the input file is. Select Files on the PC (Frontend) (Fig 27)

Fig 27 Specify files (Source data)

The input file is a [Tab] delimited with the first row as field names. It is present on my PC (local drive) as
C:\...\Plans1.txt (See Fig 1.) Click on Tabulator delimiter and Field Names at start of file as shown (Fig 28)

Fig 27 File Attributes


NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 12 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

So the file is linked to our program. (Fig 28)

Fig 28 File Attributes

Save your changes . Then go back to the initial screen.

Step 8: Assign files

Execute step Assign Files (Fig 29).

Fig 29 LSMW Screen step 8

The system automatically defaults the filename to the source structure.

Fig 29 Files assignation

Save your changes . Then go back to the initial screen.

NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 13 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

Step 9: Read data

In this step, LSMW reads the data (Fig 30) from the source file (from your PCs local drive). You have the
option to read only selected rows and convert data values to internal format.

Fig 30 LSMW Screen step 9

Execute the query with the default configuration (Fig 31)

Fig 31 Read data screen

Now, it shows the report of the read, all data must be read and written. (Fig 32)

Fig 32 Read Data Report

NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 14 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

Step 10: Display read data

This step (Fig 33) is optional. If required, you can review the field contents for the rows of data read.

Fig 33 LSMW Screen step 10

It shows the Report of Imported Data (Fig 34).

Fig 34 Imported Data Report

Step 11: Convert data

This is the step that actually converts the source data (in source format) to a target format. Based on the
conversion rules defined, source fields are mapped to target fields. Execute 11 Convert Data (Fig 35)

Fig 35 LSMW Screen step 11

To convert data, execute with the default configuration. (Fig 36)

NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 15 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

Fig 36 Convert Data

It show a report of converted data (Fig 37)

Fig 37 Converted Data Report

Then go back to the initial screen.

Step 12: Display Converted data

Again this is an optional step to view how the source data is converted to internal SAP format (Fig 38).

Fig 38 LSMW Screen step 12

Check to display converted data.

Fig 39 LSMW Screen step 12

NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 16 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

It shows a report with converted data (Fig 40)

Fig 40 Display converted data

Step 13: Create batch input session

Once the source data is converted in an internal format, it creates a batch session (Fig 41).

Fig 41 LSMW Screen step 13

Execute with the default configuration (Fig 42)

Fig 42 Create Batch Input Session

Then it shows a confirmation. (Fig 43)

Fig 43 Batch confirmation

NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 17 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

Step 14: Run Batch Input Session

You can execute the BDC session by Run Batch input session. Executing a batch input session is a
standard SM35 transaction for managing BDC sessions. Once you have successfully executed the batch
input session, the records are updated in the system.

Execute 14 Run Batch Input Session (fig 44)

Fig 44 LSMW Screen step 14 final

Select the created bacth, and then click in Process (Fig 45)

Fig 45 Start running Batch

After the execution, it shows a confirmation of successful batch execution. (Fig 46)

Fig 46 Batch session confirmation

Note! Browsing through these 14 steps, you may get a feeling that this is a very lengthy and time-consuming
activity. However, for the purposes of demonstration, I have made it detailed. Although it looks lengthy,
actually it takes hardly few hours from start-to-finish! After playing around with few simple LSMW scripts, you
will find it so easy to change and create more complex ones.

NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 18 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

Demo Example 2
LSMW to Update Maintenance Plans Records with Standard Object

As an alternative to using Transaction Recording, you could also use a standard SAP object to update
Maintenance Plans Records. Business Object 0050 is already pre-defined in the system with standard Batch.

Create an Object CUST_OBJ within Project as PLANS3 and Subproject as PLANS as shown in Fig 46.

Fig 46 Conversion Task with Project, Subproject and Object 2

Note! For the Demo example 2, I will list only those steps that are different from the first demo example.

Step 1: Maintain Object attributes


You will be updating the maintenance plans records with the help of Standard Batch Input; therefore, choose
radio-button Standard Batch/Direct Input as shown in Fig 47. Enter Object 0460 for Maintenance Plans
records and default method 0001 and click on Save.

Fig 47 Standard Batch/Direct Input Object Attributes

Step 4: Maintain Structure Relations


Create relationship between source structures with these target structures with icon Create Relationship.

. Keep Cursor on these four target structures and click on icon Create Relation and
structure relations are maintained as shown in Fig 48.

Fig 48 Structure Relation


NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 19 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

Step 5: Maintain field mapping and conversion rules

Keep your cursor on selected field and click on Insert Rule icon

Fig 49 LSMW Conversion Rules

Keep your cursor on selected field and click on Assign source field icon . Choose source field
from source structure. (See Fig 50)

Fig 50 Assign Source Fields

Similarly, choose source fields for Sales Organization, Distribution Channel, and Division. (See Fig 51)

Fig 51 Field Mapping and Conversion Rules


NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 20 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

Save your changes . Then go back to the initial screen.

Step 12: Display Converted data


When you convert data, LSMW automatically converts into the appropriate structure layouts, as required by
Standard program. (See Fig 52)

Fig 52 Converted data into multiple structures

Note that if you had only one record in source file, the converted file has two records.

Step 13: Create batch input session


Once source data is converted in internal format, you can create a BDC session to process the updates
(Figures 53 and 54).

Fig 53 Create BDC Session

NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499
COMPANIA OPERADORA LNG DEL PERU / COLP S.A.C. Page : 21 of 21
Subj : Administration IT Applications SCode: 09 PM Rev : 0.1 I
Type : Handbook HBK Date : 14/03/13
ACode : ADM.IT Doc: SAP LSMW for Massive Uploads Hour : 09:46:23

After this, this is the result log:

Fig 54 BDC Session CUST_OBJ create

Summary
Once BDC session is processed successfully, SAP updates the maintenance plans records with relevant
changes. Review these specific entries and confirm that the changes are correctly reflected in the master
records.

NOTES:

Av. Vctor Andrs Belande 147, Va Real 185


Torre Real 12 piso 2, San Isidro, Lima 27 Per
: +51 (1) 707 2100 / : +51 (1) 707 2499

Вам также может понравиться