Step Six : Maintain Fixed Values, translations, user-defined Routines
If it is needed to convert a number of legacy fields in a particular way before assigning it to the R/3 field, the conversion rule may be written in the form of a routine and may be re-used.
You may now go back to the previous step and assign these routines to the appropriate fields.
Step seven IN LSMW : Specify Files
Here the file name for the legacy data is to be specified. The file can reside in either user PC or in the Application Server. For background processing, the input file must be located in the Application Server. Access to presentation server files is only possible when you are working online.
For last two (Read & Convert Data), file names are defaulted by SAP and are respectively __ Step eight : Assign Files
Here the source structures are mapped to the files.
SAP ABAP LSMW program execution :
All the design/configuration steps are now over. The programs for Read & Conversion are now generated by R/3. You may view these but SAP does not allow changing the programs directly.
Periodic Data Transfer
If the object attribute is periodic, it can be run in a periodic schedule. The underlying R/3 program is /SAPDMC/SAP_LSMW_INTERFACE. Only point to note here is that the input legacy file must reside in the Application Server.
You can modify and regenerate the programs from within the LSMW. The programs are /1CADMC/SAP_LSMW_READ_<8> and /1CADMC/SAP_LSMW_CONV_<8> respectively, where <8> is generated by the system.
Next steps are
Prepare the legacy source file : There are various ways of creating the input file for the conversion program from legacy system data. The simplest way is to create a tab delimited text file. If the migration object has more one structures, each will be identified by distinct value of record type identifier (STYPE). This field exists in all the LS & R/3 structures.
It is also possible to combine different files during the data import. If, for example, the data for SAP routing originates in several different files (such as one for the routing, one for associated texts) in your legacy system, you can use the LSM Workbench to easily merge such files into one source file during import.
Read the legacy data from file using the read program : an intermediate file (*.read) is created .
Convert the data using the conversion program which converts the "intermediate file" into the input file for the batch or direct input program (second "intermediate file" - *.conv). The conversion program expects a sequential file stored on the application server as input, which has to meet certain format rules. These rules are defined by the file description and the conversion rules for data migration.
Finally the corresponding Batch or Direct Input program is to be executed. Sometimes these load programs offer test run. Direct Input programs may sometimes use logical file. Logical Path & File may be created using the transaction FILE.8>8>8>
Legacy System Migration work bench(LSMW) for SAP ABAP is introduced in earlier post and in previous post we had a discussion regarding LSMW step one. This post is in continuation with that .
LSMW Step two : Maintain Source Structure
SAP has comprehensive documentation of the load programs (Direct or Batch Input) how the information is to be structured in one or more levels for the business object under consideration.
The Legacy data must be organized in similar fashion in the input file. Data for more that one structures may be available in a single file. Before completing the step, it is recommended to go through the SAP documentation. The source/legacy structures to be mentioned here are only identifiers and do not need to reside in the database dictionary.
Here is a screen shot of displaying source structure.
LSMW Step three : Maintain Source Fields
In this step, the source/legacy fields must be entered in each structures. You can use any of the following copy facilities, otherwise, the source field may also be added individually.
In case of multiple structures in the same file, you need to set the value of record type identifier (STYPE) in this step.
LSMW Step Four :Maintain Structure relation
The source/legacy structures must be related to the SAP R/3 structures.
LSMW Step Five : Maintain Field Mapping & Conversion Rules
In this step, source/legacy fields in each structure are assigned to R/3 fields. It may be done individually for each R/3 field, which being time-consuming for complex structures or we can use automatic mapping utility (Extras > Auto-Field mapping).
We can specify the conversion rule to be used to convert an LS field into the corresponding R/3 field. For this, use predefined conversion rules or create your own conversion rules in the editor.
You may use the buttons ‘Initial’, ‘Constant’, ‘Move’ & ‘Fixed Value’ to assign different values. You may also assign different rules by using the button ‘Rule’. automatic mapping utility (Extras > Auto-Field mapping).
On completion of this step, SAP generates the conversion program. Menu Extras > Display Variants will give further details of the generated programs in the LSMW screens. For further flexibility, you can create global data if you need R/3 table contents and/or variables for the conversion rules and create your own routines.
To launch the tool, run the transaction LSMW from SAP.Main Design steps Once you open any existing / new object, the following screen is shown. It details the major steps of completing & running a LSMW object. Design steps are from 1 to 8. Execution steps are from 9. Before you may run the read & convert program, each of design steps is to be finished one by one.
The steps viewed can also be customized using the option Extras > Personal Menu. On selecting and step and closing the window, the step screen (shown above) will change. A few of these options however depend on further attributes set/selected in subsequent steps. Normally the main steps are shown and it can be reset by the button shown in the figure. Therefore the step number shown in the previous figure is subject to change.
Step one in LSMW : Maintain Object Attribute
In this step, we configure the basic attributes of data load – e.g. one time or periodic data transfer, which object to load (Vendor Master, Material Master) and its method. SAP provides all the fundamental objects and their associated programs either Direct Input or Batch Input. In few objects, one or more options may be available and you may need to choose which one to go for.
Further, ‘Intermediate Document’ (Idoc) may also be used. If the R/3 System does not provide
any suitable batch or direct input program, you can use the batch input recorder to create a user specific class of migration objects.
A few objects provided by SAP. The full list may be viewed from the drop-down help.
If Idoc is to be used, the information of File Port, Partner type & Partner Number must be provided. The configuration screen may be invoked from the menu Settings > Idoc Inbound Processing in the initial screen of LSMW.
LSMW means Legacy System Migration Work Bench .SAP offers the Legacy System Migration (LSM) Workbench. The LSM Workbench is a SAP tool that facilitates the process of data transfer from non-SAP system (also called Legacy system) without additional programming to do data conversion. Wecan define the rules for the conversion. The LSM Workbench then generates an ABAP program and thus supports an important step in the process of data transfer.
It is a cross-application component (CA) of the SAP R/3 System and, therefore, is independent from the platform. The tool has interfaces with the Data Transfer Center and with batch input and direct input processing in R/3. The tool can be used in each of the different R/3 releases.
By combining the Data Transfer (DX) Workbench and the Legacy System Migration (LSM) Workbench in SAP Basis component Release 4.6, SAP has made substantial progress towards tackling one of the most costly and time-consuming implementation activities - the migration of legacy systems and the data transfer from ERP systems that are being replaced.
Data migration with the DX Workbench and the LSM Workbench guarantees maximum quality and consistency of your data in the SAP business solution. When data is imported, the system performs the same checks as it does during online entry. The update in your database is performed through the Standard Batch Input Program, Standard Direct Input Program and BAPIs.
Features of LSMW:
Instead of individual tables or field contents, the tool transfers complete business data objects (also called object class) such as Material Master, Supplier Master data. A migration object class is a unit combined from the business point of view, which can be used to transfer the data of allthe legacy systems defined in the LSMW to the R/3 System.
The migration object class comprises the R/3 structures as well as the program used for data import. The batch and direct input technique is used to ensure consistency of data. For each migration object, a batch or direct input program has to be available in the SAP R/3 System.
The LSMW main functions are :
Definition of the legacy system structures and fields
Definition of object dependencies and assignment of conversion rules The structure and field relationships between the legacy system and the R/3 System are defined in data mapping. The way how data is being processed during migration is determined by the conversion rules.
Data conversion From the object dependencies, the LSMW generates conversion programs that translate the legacy system data.
Data import Batch or direct input is used to import the data to the SAP R/3 System.
The additional functions of LSMW are :
Spreadsheet interface Legacy system data in spreadsheet format can be processed.
Host interface Legacy system data in a structured data format (that is, with record identifiers and correct sequence) can be processed.
Batch input recorder The LSMW allows you to use the batch input recorder (shipped with the SAP R/3 standard system) in order to create user-specific classes of migration objects.
Automatic check functions This function generates and performs value checks against check tables and fixed values specified in the Data Dictionary.
Constraints
The LSMW supports a single and complete transfer of data (initial data load) and also offers a restricted support of permanent interfaces. Thus, a periodic transfer of data is possible. It, however, does not include any functions for monitoring of permanent interfaces. The tool does not support any data export interfaces (outbound interfaces).
Project : Sub Project : Object : Object Name Click On 'Create Entry' Button.
Step 3:
Project : Enter Des : Sub Project : Enter Des : Object :Object Name Enter Des :Object Description Click On Execute (F8)
Step 4:
Maintain Object Attributes. click Execute and Clickon Edit/Change. select Standard Batch/DirectInput Radio Button from "Object type and Import Techniques" Object: 0020 method:0000 Program Name: RMDATIND Program Type: D (Direct Input) Save, Back.
Step 5:
Maintain Source Structures. Click on Execute(f8) Highlight Source Structure. Click on Display / Change button. Click on Create Structure button. Enter the Source Structure Enter Description Continue, Save, Back.
Step 6:
Maintain Source Fields. Click on Execute(f8) Highlight Source Structure. click on Copy Fields. Select "From Data File" Radio Button Specify "Number Of Fields" Specify "Max Record Length" Specify "File Name " Click On Transfer, Save, Back.
Step 7 :
Maintain Structure Relations Select the target Structure Click on 'Relationship' button Repeat the same step for all the Structures Save, Back.
Step 8:
Maintain Field Mapping & Conversion Rules. Select the appropriate field Click on change, Click on Source Field button and map with Appl Field. Repeat the process for the remaining fields. Save, Back.
Step 9:
Maintain Field Values,Transactions, User defined Routines Execute(F8), Back.
Step 10:
Specify Files. Execute(F8) Click On "Change button" Select the Legacy Data on 'R/3 Application Server'. Click on "Create" Specify filename, Description Select Tabulator, Field Names at the beginning of the file continue.
Step 11:
Assign Files. Execute (F8). Back.
Step 12:
Read Data Execute (F8),Execute (F8),Back, Back.
Step 13:
Display Read Data Execute (F8), Continue, Back.
Step 14:
Convert Data Execute (F8),Execute (F8),Back, Back. Step 15: Start Direct Input Program. Execute(F8), Select "Program" Radiobutton Continue. Select via 'Physical Filename' Radio Button Select Lock Mode .