LSMW Step by Step in SAP ABAP part Three

In the previous posts we have introduced LSMW and step one and next few steps. Here we are going to deal with further steps of LSMW.

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 And __.lsmw.conv. You may however change them but it is not recommended.

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.

Creation of customer and vendor accounts
SAP Controlling Event Based Posting
Period end closing 

1 comment :

  1. how to generate the /1CADMC/SAP_LSMW_READ_<> from $tmp to new package?