You are on page 1of 4

Data Migration with LSMW

SAP Data Migration with LSMW Legacy System Migration Workbench (LSMW) is a tool recommended by SAP that you can use to transfer data once only or periodically from legacy systems into an R/3 System. This is one of the very powerful tools available in SAP to upload large amount of data to the system. This tools is comparable to ecatt or scatt. But the advantage LSMW has over them is the amount of data processed in single session. Moreover LSMW is easer to learn and execute. Through LSMW one can create Master data, create transactional data, modify existing master data etc. This tool is very useful when some mass changes are to be carried out and no standard SAP transactions are available for that. There are few standard objects available in LSMW e.g. material master, vendor master, customer master, purchasing info record, purchase requisitions, purchase orders etc. Using these standard objects one can do mass data upload and mass transactions. Apart from this LSMW provides another functionality of recording the transaction and then carrying that out many times with large data. eg for that can be mass deletion of purchase requisitions, mass deletion of planned orders etc. For creating simple projects user can go to tcode LSMW and get started. All the steps are listed very nicely and system will not allow user to skip the steps enlisted. User will need to create Project, Subproject and Object. Input to LSMW can be simple excel sheet or text tab delimited file(text file like note pad). Example of a LSMW project in step wise manner is presented below: Simply enter the field names in the first line of the table, and the LSM Workbench's import routine automatically generates the input file for your conversion program. The LSM Workbench lets you check the data for migration against the current settings of your customizing. The check is performed after the data migration, but before the update in your database. LSMW data migration for sales order VA01 / XD01 customer LSMW using session method for data migration as follows E.g. for XD01 (create customer) initially there will be 20 steps but after processing 1 step it will reduced to 14 for session method. 1. T-Code: LSMW. 2. ENTER PROJECT NAME Sub project name Object name. Execute. 3. MAINTAIN OBJECT ATTRIBUTES. Execute Select Batch Input recording go to->recording overview

create Recording name. Enter transaction code. Start recording do recording as per your Requirement. Save Back. Enter recording name in LSMW screen. Save Back Now there will be 14 steps. 2. MAINTAIN SOURCE STRUCTURES. Enter the name of internal table. Display change Create Save Back 3. MAINTAIN SOURCE FIELDS. Display change Select structure Source_fieldsCopy fields. (a dialogue window will pop out ) Select From data file Apply source fields a. Enter No. of field's b. Length of fields c. Attach file Save Back. If the number of fields are more, it is preferable to use the same field name as SAP Table field name. The benefit of this can be seen on Step 5. 4. MAINTAIN STRUCTURE RELATIONS Display change Save Back. 5. MAINTAN FIELD MAPPING & CONVERSION RULE Display change Click on source field, select exact field from structure and Enter ***repeat these steps for all fields. Save Back. If in Step 3, the field names are same as the SAP Table field names, then the field mapping can be simplified by Extras --> Auto Field Mapping. In the pop-up window, select No Confirmation. 6. MAINTAIN FIXED VALUES, TRANSACTION, USER DEFINED Execute Save Back. 7. SPECIFY FILES. Display change Click on legacy data Attach flat file

Give description Select tabulators Enter Save Back. An advantage of using LSMW over other methods of data upload is that if you have the column names in the first row of the input file, then the columns need not be in the same order as the file definition (Step 3). LSMW will move the value to the appropriate field by comparing the field name and the column name. 8*. ASSIGN FILE* Execute Display change Save Back. 9. IMPORT DATA. Execute Display change Save Back. 10. DISPLAY IMPORTED DATA Enter ok ***it will show records only. Back 11. CONVERT DATA Execute Display change Save Back. 12. DISPLAY CONVERTED DATA Execute Display change Save Back. 13. CREATE BATCH INPUT SESSION Tick keep batch input folder F8 Back 14. RUN BATCH INPUT SESSION. SM35 will come Object name will be shown here LEGACY SYSTEM MIGRATION WORKBENCH (LSMW) LSMW is a collection of projects (SAP). Project is a collection of subprojects. Subproject is a collection of objects. Steps: 1. Maintain object attributes: In this step we assign transaction code for the LSMW using a records object.

2. Maintain source structures: In this step we need to define an internal table for getting data from flat files into SAP application. 3. Maintain source files: In this step we need to add fields for the structure created in step2. 4. Maintain structure relations: n this step SAP generates a relation between the created internal table (ITAB) and the recording object 5. Maintain field mapping & Conversion Rules: In this step we need to generate the relationship between the internal table and recording object field. 6. Maintain Field Values: This is optional step for LSMW. We can use the SAP generated default values. 7. Specify Files: In this step we specify the file to be extracted for BDC processing using LSMW 8. Assign Files: In this step SAP generates the relation between the Flat File assigned in Step7 and internal table defined in Step2. 9. Import Data: In this step SAP Reads the data from assigned file into ITAB (internal table) internally SAP creates a file with extension as ........... .lsmw.read. 10. Display Import Data: Data in ITAB will be displayed as Report in this step. Report data will be in yellow color as data is in between source and recording objects. 11. Convert Data: In this step data will move from table to recording object. Internally SAP transfers the data from "LSMW.Read" file into "LSMW.Conv:. Data in this file is ready for populating data into BDC session object. 12. Display Converted Data: Data in Recording object will be displayed as report in this step. Here Report should be in green color. 13. Create Batch Input Session: Based on Recording object data SAP creates a session object and transfers the data into the session object. 14. Run Batch Input Session: Opens "SM35" transaction Code to Process BDC session object. Select object & process

You might also like