Você está na página 1de 25

LEGACY SYSTEM MIGRATION

WORKBENCH <LSMW>

Mallikarjuna G
November 16, 2010
<LSMW>
LEGACY SYSTEM MIGRATION WORKBENCH
LSM Workbench: What is it?

• The LSMW is an R/3-based tool that supports us when transferring data


from non-SAP systems (Legacy Systems) to SAP systems once or
periodically. It is a cross-platform component of the SAP system.

The Main functions of the LSMW are…

1. Import data from a legacy system ( legacy data in spreadsheet tables


and/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)
Legacy System Migration Workbench

Significance of Data Migration


Managing large amounts of data can be a significant challenge to most
organizations. Some of the common data management tasks include:

•Data migration, e.g., loading legacy systems data into SAP applications during
initial SAP implementation or M&A activity (mergers and acquisitions ).

• Data maintenance, e.g., mass changes to SAP data for price changes and
payroll changes

• Data integration, e.g., loading vendor invoices or bank statements into SAP
applications

• Mass data creation, e.g., creating new master data (materials, vendors,
customers, etc.), or transactional data (journal vouchers, invoices, etc) in SAP
systems.
Legacy System Migration Workbench

Principles of the LSM Workbench

The quality and consistence of the data imported into R/3 should be more
important than speed and performance of data migration.

Existing knowledge and coding should be used.

The developed ”mapping" and rules should be reusable and thus be used
repeatedly in projects.
Legacy System Migration Workbench
Some of the Important Tips, before applying the LSMW tool
• Make sure that SAP customizing is finished.

• Determine the data contained in your legacy system and which of the data will be required in the
future (with respect to business operation).

• Decide whether it makes sense to use this tool with respect to the data volume to be transferred. It
may be easier to transfer very small data volumes into the SAP system manually. In the case of a
very large data volume, batch input or IDoc techniques may cause extremely long runtimes.

• Run the relevant transaction in the SAP system manually with test data from the legacy system
and see which fields must be filled. There may be required fields that do not correspond to data
fields in the legacy system. In such a case, you should better assign a fixed value or establish an
optional field for data transfer.

• • In which way will the data be extracted from the non-SAP system? Note: The LSMW does not
extract data.

• In which form is the legacy data available? Determine accordingly which of the LSMW functions
will be applied.

• If only a part of your legacy system will be replaced by SAP, determine which function will be
provided by the SAP system and which by the legacy system.
Legacy System Migration Workbench

Features of LSMW
• LSMW is basically designed for a functional consultant who do not do much coding .
• The import technique to be used in an individual case, depends on the business object as well
as on the availability of standard input programs

• Data consistency due to standard import techniques:


Batch input
Direct input
BAPIs (Business Application Programming Interfaces)
IDocs (Intermediate Documents)

• Structured way of working, because you have to finish every step before starting the next step

• LSMW is possible for only Standard transaction codes.

• Mapping is done by SAP itself.

• LSMW input file is always TEXT file.


Legacy System Migration Workbench

Brief Description of Uploading methods

Batch Input: Uses classical BDC approach, but doesn't required an ABAP
program to be written to format the BDC DATA. The user has to format the data
using predefined structures and store it in a flat file. Yet it is a slower updation
method.

Direct Input: Works similar to Batch Input programs. The difference is, instead
of processing screens they validate fields and directly load the data into tables
using standard function modules. Much faster and suits for large volume of
data.

BAPI's : When the Data has to be distribute whith in the R/3. 

ALE/IDOC : When the data has to be distribute with external system non-SAP
or third party package.
Legacy System Migration Workbench

Graphical representation
Accelerating Data Migration: LSM Workbench
One or several
How LSM Workbench works files

Legacy dat a
on PC

Read data Read data


Structure Legacy data
on appl icati on
relations
server

Field mapping Convert data

R /3 S ta n d a rd
Batch Input
Conversion processing
rules
Converted Direct Input
data processing

IDoc inbound
processing
Legacy System Migration Workbench

Getting Started

Here is an example showing the way to use the conversion tool LSMW in
SAP. It starts in the start-up screen of LSMW transaction and ends with a
screen on which the results of the conversion are displayed

If you want to create or change objects, make sure that you are working in
change mode. To activate this mode, click Change in the corresponding
processing step. Only this mode provides all functions required for changing
objects
Legacy System Migration Workbench

Step 1 - Enter transaction LSMW


Legacy System Migration Workbench

Step 2 – project, subproject, objects

At the initial screen, you can create a new project, corresponding subprojects and objects via Edit
-> Create new entry. Alternatively you can select from an existing project

• Project: An ID with a maximum of 10 characters to name your data transfer project. If you
want to transfer data from several legacy systems, you may create a project e.g. for every legacy
system
• Subproject: An ID with a maximum of 10 characters that is used as further structuring attribute
• Object: An ID with a maximum of 10 characters to name the business object
Legacy System Migration Workbench

Next Step : Execute

Once the project and subproject along with the object are determined we
execute to find the list of steps to be performed for data transfer
Legacy System Migration Workbench

Process Steps

• The number of process steps is dynamic and shall depend on factors like
input method

• By clicking the ‘User menu’ button one can select – deselect the Process
steps

• To proceed through the processing steps one needs to start from the first
one and execute each of them

• A step can be skipped by selecting the next available processing steps’


radio button
Legacy System Migration Workbench

Step 1: Maintain object attributes

Choose if
the data
transfer is
once or
periodic

Choose
method for
input of data.

In the method to
input data from a
BAPI, one needs
to select the
Business Object
and the
corresponding
method.
Legacy System Migration Workbench

Step 2: Maintain Source Structures


Give a name and a description to the source structure (Nothing but giving an
Internal table name & description)

Source Structure
Legacy System Migration Workbench

Step 3: Maintain Source Fields


In this step, you need to list what fields are present in the source structure. The easiest way is to
click on ‘Table Maintenance’ icon to enter Fieldname, Type and Length for each field
Legacy System Migration Workbench

Step 4: Maintain Structure Relations


Execute a step to ‘Maintain Structure Relations’. (See below Figure ) Since, there is only one
Source and Target Structure, the relationship is defaulted automatically.
Legacy System Migration Workbench

Step 5: Maintain field mapping and conversion rules


Select the Field (if the field is coming from Internal table, then click on ‘Source Field’ and select
the field. Otherwise click on Rule Select the Radio Button ‘Constant’ and provide the Constant
value . Eg. Like as ‘0004’.
Legacy System Migration Workbench
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.


In this step, we define how the layout of the input file is. The input file is a [Tab] delimited with
the first row as field names. It is present on my PC (local drive) as C:\XD02.txt.
(Note: Just Execute->Click on change mode ->Save -> come back)
Legacy System Migration Workbench
Step 8: Assign File
Execute step ‘Assign Files’ and the system automatically defaults the filename to the source
structure
(Note: Just Execute->Execute->back -> back)

Step 9: Read Data


In this step, LSMW reads the data from the source file (from your PC’s local drive). You have the
option to read only selected rows and convert data values to Internal format.
(Note: Just Execute->Execute->Back ->Back)

Step 10: Display Read Data


This step is optional. If required, you can review the field contents for the rows of data read
(Note: Just Execute->Execute->Back )
Legacy System Migration Workbench
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.
(Note: Just Execute->Execute->back -> back)

Step 12: Display Converted Data


Again this is an optional step to view how the source data is converted to internal SAP
(Note: Just Execute->Execute->Back )
Step 13: Create batch input session
Once the source data is converted in an internal format, you can create a batch session to process
updates
(Note: Just Execute->Execute-)

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 customer master records are updated in the system. You can
confirm this by viewing the customer master records (XD03)
Legacy System Migration Workbench

Events in LSMW

1. Global Data

2. Begin _ of _ Processing.

3. Begin _ of _ Transaction.

4. End _ of_ Transaction.

5. End _ of_ Processing.


Legacy System Migration Workbench
Global Data
Global Data is used to Declare the variables, work area and Internal tables, which we need to
implement the logic.

Begin _ Of_ Processing


Begin _ of _ processing is an Event, which is triggered at the time of Processing of an Entire Flat
File.

Begin _ Of_ Transaction


Begin _ of _ transaction is an Event, which is triggered at Each record of Flat file.

End _ Of_ Transaction


End_ of _ transaction is an Event, which is triggered after completion of Each and Every record
in the Flat file.

End _ Of_ Processing


End_ of _ processing is an Event, which is triggered after completion of Entire flat file
processing.
Legacy System Migration Workbench

Begin _ of _ Processing
Begin _ of _ Transaction X54321 MALLIK MK 123 ATP
X54322 VENKAT VK 321 CHI
End _ of _ Transaction
X54323 Shiksha SS 456 ATP
X54324 PRAVEEN PV 654 AMP
X54321 SAILEELA SL 789 ATP
X54322 MADHURI MD 987 KUR
X54323 ANUSHA AR 741 HYD
End _ of _ Processing
THANK YOU.

Você também pode gostar