You are on page 1of 39

LEGACY SYSTEM MIGRATION WORKBENCH STEPS TO DATA MIGRATION MATERIAL MASTER DATA Version 1.

6 August 1999

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

CONTENTS
I Investigation of SAPs Data Migration Tools..........................................................................3
1 Goal...............................................................................................................................................................3 2 Benefits..........................................................................................................................................................3 3 Expected deliverables....................................................................................................................................3

II Deliverables................................................................................................................................4
1 Scope/Purpose...............................................................................................................................................4 2 Intended Audience.........................................................................................................................................4 3 Functionality..................................................................................................................................................4 4 Suitability of tasks.........................................................................................................................................4 5 Business Objects supported...........................................................................................................................4 6 Limitations.....................................................................................................................................................5 7 Advantages....................................................................................................................................................5 8 Other Sources................................................................................................................................................5

III Example one - Upload material master data using standard program...............................6
1 STEP 1 MAINTAIN OBJECT ATTRIBUTES.........................................................................................7 2 STEP 2 MAINTAIN SOURCE STRUCTURES.......................................................................................7 3 STEP 3 MAINTAIN SOURCE FIELDS...................................................................................................8 4 STEP 4 MAINTAIN STRUCTURE RELATIONS...................................................................................9 5 STEP 5 MAINTAIN FIELD MAPPING AND CONVERSION RULES...............................................10 6 STEP 6 MAINTAIN FIXED VALUES, TRANSLATIONS, USER-DEFINED ROUTINES...............15 7 STEP 7 SPECIFY FILES.........................................................................................................................16 8 STEP 8 ASSIGN FILES...........................................................................................................................18 9 STEP 9 READ DATA..............................................................................................................................18 10 STEP 10 DISPLAY READ DATA........................................................................................................19 11 STEP 11 CONVERT DATA..................................................................................................................20 12 STEP 12 DISPLAY CONVERTED DATA...........................................................................................20 13 STEP 13 START DIRECT INPUT SESSION.......................................................................................21

IV Example Two Using header and detailed file for material master data.........................26 V Example three Using Batch Input Recording to import material master data...............33 VI Appendix..................................................................................................................................39
1 Appendix 1 List of standard programs.....................................................................................................39

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

Investigation of SAPs Data Migration Tools

1 Goal Investigate the SAP supplied Data Migration tools: the Legacy Data Migration Workbench and the Data Transfer Workbench. (This document concerns the Legacy Data Migration Workbench). 2 Benefits Increase the ease of use of these standard tools through the Toolkit and the Field guide and therefore increase their use on PwC SAP projects possibly reducing development effort and complexity. Increase knowledge of standard tools in PwC and develop expert resources. 3 Expected deliverables 1) Field Guide for each of the Tools containing the following information: Explanation of the scope and purpose. Suitability for certain tasks (i.e. Complex data conversion, Simple data dumping). List of Business objects supported (i.e. Material Master, Sales Order ). How data input is achieved; Direct Input, BDC, Call Transaction or other. Whether a sample file producing program using real data is available. Whether it works. Documentation on the file formats that a functional person could understand (linking the fields to screen fields). Documentation on use, including an overview of the whole process.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

II
1 a) b) c) d)

Deliverables
Scope/Purpose Discover what the LSMW functionality are, hence what does it do. Discover its suitability in regards to data conversion. Find out what business objects it supports. Discover how the Legacy Data Migration Workbench (LSMW) work, hence successfully use it to convert and upload data into SAP.

2 Intended Audience This document is intended for people with an understanding of SAP data uploads using BDC and basic ABAP programming. 3 Functionality The core functionality of the LSM Workbench is to import data from the legacy system, convert them into the target SAP format and import it into SAP. NOTE: The LSMW does NOT extract or clean the legacy data for you. 4 Suitability of tasks The LSM Workbench converts data by generating a conversion program based on the mapping conversion rules you define. Types of mapping conversion rules it can do is: Direct 1:1 field mapping I.e. Source data => target data Addition of prefix/suffix I.e. Source data + P/S => target data Filter out blank data in a field Use a lookup table to convert data either: 1:1 translation I.e. X1 -> Kg, X2 -> Ea Interval translation 2000 - 2999 -> NSW, 3000 - 3999 -> Vic 5 Business Objects supported The LSMW uses four methods of importing the data into SAP. I. Standard Batch/ Direct Input. This uses SAP standard programs to import data. This is where the LSMW is linked to the Data Transfer Workbench as both uses the same to import the business objects. (i.e. material master data) Refer to Appendix 1for the list of business objects and SAP standard programs the LSMW uses to import data. The standard programs will import data using either batch input or direct input, depending on the program chosen. For more details on the Standard program, refer to the Data Transfer Workbench guide. II. Batch Input Recording This import method uses a recording as a basis for the import program. It requires you to record the transaction you will be using to input the data. Hence, if what you want to import is not covered by the above SAP standard programs, you can use the Batch Input Recording import method to import data. This creates a session and import data into SAP using Batch input.

III.

BAPI

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

You can choose to import data using BAPIs (Business Application Programming Interfaces). IV. IDocs You can also choose to import data using IDocs (Intermediate Documents) 6 Limitations The limitations of the LSM Workbench is that: The LSMW cant extract data from the legacy system. It cannot be used to extract data. It cannot be used for outbound interface.. Ie send information outwards from SAP. E.g. HR updating of phones in SAP. Cant update it to the telephone directory if it is external to SAP. The LSMW cannot detect if configuration change has occurred in the system if Direct input method is employed. The level of support form the resources is limited. At the moment there is very few notes on it in the OSS. There is not much information available on it. It is not 100% flexible. 7 Advantages The advantages of using the LSM Workbench are: It is a part of R/3 and thus independent of individual platforms It has a variety of technical possibilities of data conversion: Data consistency due to standard import techniques: Batch input Direct input BAPIs (Business Application Programming Interfaces) IDocs (Intermediate Documents) The import technique to be used in an individual case depends on the business object. Generation of the conversion program is on the basis of defined rules Clear interactive process guide Interface for data in spreadsheet format Creation of data migration objects on the basis of recorded transactions Charge-free for SAP customers and SAP partners Dont need to test the program, need only to validate mapping and conversion rules. 8 Other Sources For a more in-depth look at the functionality of the LSM Workbench, refer to the SAP guide Data Migration of Non-SAP systems to R/3. Quick Introduction to Working with the Legacy System Migration Workbench Version 1.6. July 1999. The SAP provided presentation slides, The internally created LSM Workbench Presentation. Also refer to the Data transfer Workbench documentation and slides.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

III Example one - Upload material master data using standard program.

Continu e

Create

To start, type in the transaction code: LSMW. Click on the Create button to create a project.

Enter the Project, subproject, object and their descriptions. If you require more than one subproject, place the cursor on the subproject field and press create. The same applies for the object. Once this is complete, click on the Continue button to go to the next screen.

Click to execute the step Maintaining source structures and fields. Mapping source fields to target fields. Upload legacy data (internal table), and converting data using the mapping rules defined in earlier steps. Ready to be imported into SAP. Click to toggle between edit and display

Which of these step appears will depend on the attributes defined in Step 1.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

You will be presented with the screen above. As illustrated above, Steps 1 to 12 will always appear. Steps 13 to 20 being displayed will depends on what data migration attributes you choose in Step 1. 1 STEP 1 MAINTAIN OBJECT ATTRIBUTES

Save

Start with step 1. Here, you choose the attributes of your conversion program. In this instance, the Standard Batch/direct input for Material master data is chosen. The data transfer will occur once. 2 STEP 2 MAINTAIN SOURCE STRUCTURES

Create

Delete

Before starting with the conversion, research on the mapping conversion rules and the legacy data format was done. In Step 2, create the source structure. I.e. the structure in that your source data will be placed into. To create a structure, click on the Source structure and select Create. The below screen appears.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

Enter your structure table name and description and click on the Continue button. Once your structure is defined, it should look like the above screen. 3 STEP 3 MAINTAIN SOURCE FIELDS

Create Table Maintenance Copy source fields from other sources

Once the structure of the legacy data is defined, its fields will need to be defined in Step 3. Determine what fields the legacy data requires and define them here. To create a field, select the Material_table tab and click Create. The below screen appears for you to enter in the field attributes.

The Identifying field value field is used for documentation purposes. This is where you place the legacy system name of the field so you can reference it back to the legacy system.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

After defining the legacy data (source) structures and field, the mapping between the legacy data and SAP begins. In step 4, the relationship between the source and target structure is defined.

You can also define your fields in a table format if you dont wish to do it the other way. To get to this screen, click on the Table Maintenance button. 4 STEP 4 MAINTAIN STRUCTURE RELATIONS

Create relationshi p

In this instance, only one structure was defined. To assign the source structure to the target structure, click on the Relationship button. If you have defined more than one structure, it will query you which structure you want to assign. However, in this instance, we have one structure so its automatically assigned when you press the Relationship button.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

As describe above, the first hierarchical target structure holds the batch input session data, the child of this structure holds the transaction data and its child structure is the main place where data transfer takes place. 5 STEP 5 MAINTAIN FIELD MAPPING AND CONVERSION RULES

Create relationship

Check Syntax

Choose rules

Once the relationship between the structures are establish, the conversion rules between the source and target fields are defined. This is done so in Step 5. In the above screen, a constant was defined for the target transaction code field. To create a constant containing the transaction code, select the field TCODE, click on the Rules button and select the Constant radiobutton. The below screen appears.

Click Okay to continue. The below screen will appear, asking for the constant value.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

10

Enter the constant value and continue. To assign a source field to a target field, place the cursor on the relevant target field. Select the Select field button. A popup screen will appear with all the source field available to be assigned.

Select the relevant source field. The default conversion rule for the source and target field is Transfer (move). Hence , the code would become: Target field = Source field.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

11

To add a prefix to a source field whilst transferring it to the target field, first assign a source field to the target field then, select the Rule button. The below screen appears.

Select the Prefix radiobutton. As we dont wont to move any fields which are blank, select the check box Only if source field is not initial. A popup screen will appear asking for the prefix.

Enter your prefix and continue.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

12

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

13

To create a Fixed value (reusable), select the target field you want to become a fixed value. Click on the Rules button. The below screen will appear.

Select the Fixed value (reusable) radiobutton and continue. You will be presented with the screen below asking for the name of the fixed value.

It will automatically default to a radio button. Select the default and continue.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

14

Enter the fixed value you want the field to be and continue. Save the conversion rules youve created. Before exiting this step, press on the Syntax check button to ensure that The conversion program could be generated successfully. 6 STEP 6 MAINTAIN FIXED VALUES, TRANSLATIONS, USER-DEFINED ROUTINES

To maintain your reusable rules and user-defined routines, this is done is step 6. If you have any reusable rules or user defined routines, it would appear here. To maintain them, select the rule you want to maintain and select the Edit button.

If you selected to change a fixed value the above screen would appear.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

15

If you choose to maintain a translation, the above screen appears. However if youve chosen to maintain a user-defined routine, the below screen will appear.

STEP 7 SPECIFY FILES

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

16

Once youve completed mapping the conversion rules, youll need to define where the legacy files going to uploaded from in Step 7. In this instance, the legacy file is to be uploaded from the local C:\ drive. Place the cursor on the Legacy data On the PC (frontend) tab and press the Create button. The below screen will appear.

Enter the file path of the legacy data and its description. Select the file contents, delimiter, file structure, file type and code page which most describes the format of the legacy data file and Continue.

There will be a default file path in the Read data File for read data section. Select this tab and press Edit. Change the file path to be similar to the above. Continue. Once the legacy file is uploaded into SAP, and before the conversion, it is placed in this file. Leave the Converted data File for converted data file path as default.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

17

If your file was from the server, select the Legacy data On the R/3 Server (application server) you would be presented with the above screen. Enter the relevant details and continue. Save your changes and continue to Step 8. 8 STEP 8 ASSIGN FILES

In this instance, only one file was defined, hence it is automatically assigned to the source structure table. This means that the data in the legacy file will be uploaded into the Material_table structure. Save and continue to the next step. 9 STEP 9 READ DATA

Execute

Once the file path to the legacy system is defined, it will need to be uploaded into SAP. Step 9 reads the data and uploads it into the Material_table structure. Youll be present with the above screen. You can either choose to read a limited number of records by entering the record number into the select-option box, or read all the data by leaving the Transaction number selectoption clear and press on the Continue button.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

18

Once the legacy data is read, the above screen will appear telling you how many records were read. If the read was unsuccessful, it will tell you what might be wrong with your data. The read records will now be placed into the Read data file path defined earlier. 10 STEP 10 DISPLAY READ DATA

After youve completed uploading the data, it can be viewed in Step 10. Choose the record lines you want to view.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

19

Note: that the data you are viewing is the legacy data, loaded into the format of the source structure and fields. 11 STEP 11 CONVERT DATA

Execute

Once youve viewed the data and is happy that it is loaded in correctly, proceed to Step 11 to convert the data using the mapping rules youve defined in Step 5 and 6. Again, you have the option of choosing a range within your data to convert, or converting every thing by pressing the Continue button.

When the conversion process is complete, the above screen will appear informing you of how many records were successfully converted. The converted data are now placed in the Converted data file path defined in Step 7. 12 STEP 12 DISPLAY CONVERTED DATA

Step 12 allows you to view the data after it is converted. Choose the number of line to view and continue.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

20

Once the line number you want to view is chosen. The converted data is displayed. this is a good opportunity to ensure that your conversion rule is correct and is as required. Once youre happy with the data, proceed to the next step. 13 STEP 13 START DIRECT INPUT SESSION

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

21

Youve now gone through all 12 Steps. These are the preparation steps in getting your data ready to be inputted into SAP. Step 13 will start the Input process. Press on Edit to continue.

The above popup screen appears. If you choose to direct input via the program RMDATIND the below screen will appear. For more details on how the Direct input program and transaction, refer to the Transferring of Data via Direct Input slide from the Data Transfer Workbench presentation.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

22

Enter in the relevant details and press Continue. The LSMW will go through a series of popup screen informing you of the status as it progress through the data input. Once it is completed, it will tell you whether the whole process is successful or if there is any errors. When the process completes, and errors exists, it takes you to the below screen and highlights the records in error.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

23

Hence, from the above, well know that 17 of the 20 records has been created. Hence material number 469 to 488 are created. To check that the records are created, goto transaction code SE11, view the table MARA (display).

From the above, we note that from material number 469 to 488 is created with the exception of material numbers 470, 475 and 482.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

24

If youve chosen to enter the data through the Transaction BMV0, youll need to have the data uploaded from the server.

See the Data Transfer Workbench for details on how to upload using transaction code BMV0.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

25

IV Example Two Using header and detailed file for material master data

Create an object to work in.

Select Step one and choose the standard batch/direct input import technique for material master data. Save.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

26

Create the structures as illustrated above. When you create the second structure, the below screen will appear asking what level is it in relation to the first structure. Choose sub-ordinate.

Create the fields as displayed above. Note that there has to be a common field between them. In this case, its the old material master (S_BISMT) field. The reason why this field was chosen was because the material number field will be created internally in SAP. Hence, another key field was required. The H_STYPE fields and D_STYPE field is simply a record indicator, indicating whether its a header or detailed record.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

27

Define the structure relationship. Select the structure, select the Relationship button and choose the source structure as required.

The conversion rules used here is the same as the previous example. the main difference being that the source fields are coming from different tables. The structure BMM00 is the header structure. Hence, the header source structure and fields are mapped to here. The structure below

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

28

this are the details header, hence the detail source structures and fields are mapped to the relevant fields.

When mapping fields in the header structure, only the source fields in source header structure are available. However, once we move on to the detailed structures, all fields are available.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

29

Define the legacy files.

Once the legacy file is defined, it needs to be mapped to the source structures. To assign the legacy file to the source structure, select Assignment and select the relevant file. The below screen will appear to choose from.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

30

When youve completed defining the files and doing the necessary preparation work, its time to read the files. Execute Step 9. Once its completed, a report similar to the screen above should display. Note that it has read in two files and wrote it to the one read file.

View the read data to ensure that everything is loaded properly. Note here that two shades of line has appear. the yellow lines indicates the header structure and the blue indicates the detail.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

31

Now that the legacy data is read, its time to convert it. Execute step 11. A similar screen to above should appear.

View the converted data. Note that it is sorted by structure. Once youre happy with the converted data, continue with the rest of the steps.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

32

Example three Using Batch Input Recording to import material master data.

Create an object. Then select Goto -> Recordings.

Youll be presented with a screen similar to below. Place the cursor on the Recordings branch and select Create, to create a recording.

Enter in the name and description of the recording. Once this is done, the next screen is presented.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

33

Enter the transaction code for the first screen of the transaction you want to records. Once you press continue, this will goto the transaction screen you indicated above. Go through the steps you would normally go through to create the transaction. When you save the transaction, the recording stops. You will then be presented with the below screen.

Create the name for your target fields. To create the name, double click on the field and the below screen appears.

Enter the name and description of the field. The default value is the value you entered for it in the transaction. Once youve completed naming the fields, save the recording and exit back to the front screen. Now you can enter the LSMW to start on Step 1.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

34

Because were doing the batch input using a recording, select the Batch Input Recording button. Then select the recording you want to use. Note: The only real difference between using the Standard Batch / Direct Input method and the Batch Input Recording method is this first step. Following the consequent steps as you would with the Standard programs.

Create the source structure.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

35

Create the fields. In this case, it was copied from Demo_1 of the same subproject. To do this, select the structure, then press on the Copy button. The below screen appears.

Choose to Copy from other object. The below screen will prompt you which other project.

Enter the source structure you want to copy from the other object and continue. Save the step before exiting.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

36

Now define the structure relations. Because its a recording, only one target structure, hence source structure can be defined. Save and continue.

Map the source fields to the target fields as you would with the standard batch/direct input methods.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

37

The consequent steps (i.e. steps 6 to 12) are exactly the same as the standard batch/ direct input method. If you want to check if configuration changes has occurred in the system, select the Personal Menu button. Select the Check converted data against customising checkbox and execute this step.

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

38

VI Appendix
1
Obj. 0001 0010 0020 0030

Appendix 1 List of standard programs


Description Long Text GL acc. master data Material master data Material BOM Mth. 0001 0001 0002 0000 0001 0002 0003 0004 0001 0002 0000 0000 0000 0000 0000 0000 0000 0000 0000 0001 0002 0000 0000 0001 0002 0000 0000 0001 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 Description No Selection Heir. Structure Flat Structure Create Change Create Variant With long text General Retail Program Name
/SAPDMC/SAP_LSMW_IMPORT_TEXTS

0040 0050 0060 0070 0080 0090 0100 0110 0120 0130

Vendor master data Customer master data Purchasing info rec. Condition Record Purchase Requisition Sales Document Financial documents Goods Movement Manual Reservation Classification

RFBISA00 RFBISA00 RMDATIND RCSBI010 RCSBI020 RCSBI030 RCSBI040 RFBIKR00 RFBIKR00 RFBIDE00 RM06IBI0 RV14BTCI RM06BBI0 RVINVB10 RFBIBL00 RM07MMBL RM07RRES RCCLBI03 RCCLBI02 RCCLBI03 RCCLBI01 RCCTBI01 RAALTD01 RAALTD11 RCPTRA01 RM60IN00 RMMM60BI RCVBI010 RLPLAT00 RLBEST00 IBIP RFVIMEDI RFVIMVDI RPUSTD00 RHALTD00 IBIP RM06IBI0 RCPTRA01

Typ D B B D B B B B B B B B B B B B B B D B D B B B D B D B B B B B D D B B B B

0140 0150 0160 0170 0180 0190 0210 0220 0230 0300 0310 0555 0777 0800 7060 7170

Class Characteristics Fixed assets Routing Planned indep. reqmts Doc. purch. info rec Storage bin (WM) Warehouse Stock (WM) Equipment Rental Unit Rental Agreement HR master data HR Planning Do not use ! Purchasing info rec Routing

Batch Input Direct Input Direct Input Batch Input Batch Input Direct Input Direct Input Batch Input Batch Input

Batch Input Batch Input

/var/www/apps/conversion/current/tmp/scratch32696/101376215.doc

39

You might also like