online documentation lsmw version 4 0

Upload: zeba-zahoor

Post on 16-Oct-2015

147 views

Category:

Documents


1 download

DESCRIPTION

kk

TRANSCRIPT

  • Legacy System Migration Workbench

    Vers ion 4 .0 .0

    AD

    DO

    N.L

    SM

    W

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 2

    Copyright Copyright 2004 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks or registered trademarks of IBM Corporation in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 3

    Icons in Body Text

    Icon Meaning

    Caution

    Example

    Note

    Recommendation

    Syntax

    Additional icons are used in SAP Library documentation to help you identify different types of information at a glance. For more information, see Help on Help General Information Classes and Information Classes for Business Information Warehouse on the first page of any version of SAP Library.

    Typographic Conventions

    Type Style Description

    Example text Words or characters quoted from the screen. These include field names, screen titles, pushbuttons labels, menu names, menu paths, and menu options.

    Cross-references to other documentation. Example text Emphasized words or phrases in body text, graphic titles, and table

    titles.

    EXAMPLE TEXT Technical names of system objects. These include report names, program names, transaction codes, table names, and key concepts of a programming language when they are surrounded by body text, for example, SELECT and INCLUDE.

    Example text Output on the screen. This includes file and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools.

    Example text Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation.

    Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system.

    EXAMPLE TEXT Keys on the keyboard, for example, F2 or ENTER.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 4

    Legacy System Migration Workbench....................................................................................... 7 Before You Work with LSMW ................................................................................................ 8 Authorizations ........................................................................................................................ 9 Objects ................................................................................................................................. 10

    Project .............................................................................................................................. 11

    Subproject..................................................................................................................... 11

    Object............................................................................................................................ 11

    Structure Relationships................................................................................................. 12

    Field Assignments ........................................................................................................ 14

    Using LSMW ........................................................................................................................ 14 Starting the LSM Workbench ........................................................................................... 15

    Selecting a Step............................................................................................................ 15

    Creating a Personal Menu............................................................................................ 16

    User Guidance ................................................................................................................. 16

    LSMW Administration ................................................................................................... 17

    Documentation.............................................................................................................. 17

    Displaying All Objects ................................................................................................... 18

    Displaying My Objects .................................................................................................. 18

    All Objects of the Project .............................................................................................. 19

    Project Documentation ................................................................................................. 19

    Action Log..................................................................................................................... 20

    Creating a Change Request ......................................................................................... 20

    Recordings ....................................................................................................................... 21

    Editing the Results of the Recording ............................................................................ 22

    Determining the Transaction Code............................................................................... 22

    IDoc Inbound Processing ................................................................................................. 23

    Creating Ports............................................................................................................... 24

    Partner Types ............................................................................................................... 25

    Partner Numbers .......................................................................................................... 26

    Checking the Workflow Customizing ............................................................................ 26

    Transporting LSMW Projects ........................................................................................... 27

    Creating a Change Request ......................................................................................... 27

    Exporting a Project ....................................................................................................... 28

    Importing a Project........................................................................................................ 29

    Migration of Data with LSMW........................................................................................... 29

    Description of the Project.............................................................................................. 31

    Editing a Project ........................................................................................................ 32

    Editing a Subproject .................................................................................................. 33

    Editing Objects .......................................................................................................... 33

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 5

    Maintaining Object Attributes .................................................................................... 34

    Where-Used List ....................................................................................................... 34

    Definition of Source Structures and Fields ................................................................... 35

    Maintaining Source Structures.................................................................................. 36

    Changing Source Structures..................................................................................... 36

    Reassigning Source Structures ................................................................................ 37

    Deleting Source Structures ....................................................................................... 37

    Maintaining Source Fields......................................................................................... 38

    Copying Source Fields .............................................................................................. 38

    Changing Source Fields............................................................................................ 39

    Reassigning Source Fields ....................................................................................... 40

    Deleting Source Fields .............................................................................................. 40

    Field Mapping and Conversion Rules........................................................................... 40

    Defining Structure Relationships............................................................................... 41

    Deleting Structure Relationships............................................................................... 42

    Defining Field Relationships ..................................................................................... 42

    Deleting Field Relationships ..................................................................................... 43

    Auto Field Mapping ................................................................................................... 43

    Object Overview........................................................................................................ 45

    Editing Field Assignments ............................................................................................ 45

    Displaying SAP Fields............................................................................................... 46

    Field Documentation ................................................................................................. 46

    Possible Values......................................................................................................... 47

    Field-Related Rules................................................................................................... 47

    Assigning Initial Values.......................................................................................... 49

    Assigning a MOVE ................................................................................................ 50

    Assigning Fixed Values ......................................................................................... 50

    Assigning Constants.............................................................................................. 51

    User-Defined Routines .......................................................................................... 51

    Storing ABAP Code............................................................................................... 52

    Other Rules ........................................................................................................... 53

    Reusable Rules......................................................................................................... 55

    Editing Reusable Rules ......................................................................................... 56

    Copying Reusable Rules ................................................................................... 56

    Deleting Reusable Rules ................................................................................... 57

    Control of Translation......................................................................................... 57

    Modifications for Experienced Users ........................................................................ 58

    Global Variables .................................................................................................... 59

    Display Variant ...................................................................................................... 60

    Processing Times .................................................................................................. 61

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 6

    Global Functions.................................................................................................... 62

    Suppressing Data Records ................................................................................... 63

    Creating Additional Data Records ......................................................................... 64

    Specifying Files............................................................................................................. 65

    Files on the SAP Server............................................................................................ 65

    Files on the PC.......................................................................................................... 66

    Read/Converted Data ............................................................................................... 67

    Using Wildcards ........................................................................................................ 68

    Assigning Files.............................................................................................................. 69

    Generating the Conversion Program ........................................................................ 69

    Reading Data................................................................................................................ 70

    Displaying Read Data ............................................................................................... 71

    Converting Data ........................................................................................................ 71

    Converting BAPI/IDoc ............................................................................................... 72

    Syntax Check ............................................................................................................ 73

    Checking the Syntax.............................................................................................. 73

    Finding and Correcting Syntax Errors ................................................................... 73

    Data Import ................................................................................................................... 74

    Starting a Direct Input Session ................................................................................. 75

    Creating a Batch Input Session ................................................................................ 75

    Processing a Batch Input Session ............................................................................ 76

    Starting IDoc Generation........................................................................................... 76

    Starting IDoc Processing........................................................................................... 77

    Creating an IDoc Overview ....................................................................................... 78

    Starting IDoc Postprocessing.................................................................................... 78

    Special Case: Migration of Long Texts......................................................................... 79

    Long Texts ................................................................................................................ 79

    Example: Material Sales Texts.............................................................................. 80

    Determining the Text Key Structure ...................................................................... 83

    Objects for Long Texts .......................................................................................... 84

    Importing Texts...................................................................................................... 85

    Periodic Transfer of Data.............................................................................................. 86

    Troubleshooting................................................................................................................ 87

    Tips and Tricks ................................................................................................................. 88

    Determining the Transaction Code at Runtime ............................................................ 89

    Manipulating Data Records .......................................................................................... 89

    Output of Error Messages............................................................................................. 90

    Handling POS IDocs..................................................................................................... 91

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 7

    Legacy System Migration Workbench Purpose The Legacy System Migration Workbench (LSMW) is a tool that supports data migration from legacy systems (non-SAP systems) to SAP systems. It is a cross-platform component of the SAP system.

    Implementation Considerations Do not use the LSMW before the SAP system has been installed and application customizing has been completed.

    Integration The LSMW is a cross-application component (CA) of the SAP system.

    The tool has interfaces with the Data Transfer Center and with batch input and direct input processing as well as standard interfaces BAPI and IDoc.

    Features Instead of individual tables or field contents, the tool migrates user-defined datasets (known as objects), which are combined according to business criteria. In addition to using standard import techniques, you can also generate user-specific objects. For more details, see Recordings [Seite 21]. The LSMW comprises the following main functions: ...

    1. Read data (legacy data in spreadsheet tables and/or sequential files). You can use any combination of PC and server files.

    2. Convert data (from the source into the target format).

    3. Import data (to the database used by the SAP application).

    The following additional functions are available:

    Import techniques [Seite 74]: Apart from standard batch/direct input and recordings, BAPI and IDocs are available as additional import methods.

    Global functions [Seite 62]: You can call certain functions from an ABAP code location of your choice, and so influence the procedure used to migrate your data.

    Editor function [Seite 47]: The source code for a target field can be checked. You can insert source fields, global variables, and global functions as well as use the Pretty Printer.

    Action log [Seite 20]: All the actions associated with an object are stored in an action log.

    The field assignments for all parts of a project can be downloaded/uploaded in one step.

    Unassigned source fields [Seite 38]: Neglected data can be displayed. Source fields [Seite 38]: You can create source fields by copying [Seite 38] them from

    other sources.

    Processing times [Seite 61]: The ABAP code can be added to at different times. Authorizations [Seite 9]: The LSM Workbench is independent from the client. Access

    to the LSMW is controlled by authorizations. The assignment of these authorizations

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 8

    is basically independent from the client. The Display, Execute, Change, and Administration functions can be controlled by assigning authorizations.

    Documentation [Seite 17]: User-specific documentation can be stored at different levels and formatted into an overall documentation by pressing the appropriate button.

    Constraints The LSMW supports a one-time transfer of data (initial data load) and also offers a restricted support of permanent interfaces. Thus, a periodic transfer of data is possible. The LSMW, however, does not include any functions for monitoring of permanent interfaces. The tool does not support any data export interfaces (outbound interfaces).

    More Information For more details about data conversion with the LSMW, see the following:

    Before You Work with LSMW [Seite 8]

    Authorizations [Seite 9]

    Transaction Code [Extern]

    Objects [Extern]

    Using LSMW [Seite 14]

    Exporting a Project [Seite 28]

    Importing a Project [Seite 29]

    Migration of Data with LSMW [Seite 29]

    Troubleshooting [Seite 87]

    Before You Work with LSMW Purpose Before you use LSMW, we recommend that you perform some conceptual tasks.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 9

    Data inLegacy System

    DataData in in SAPSAPDatabaseDatabase

    Conceptional Tasks

    DataData MappingMappingandand FieldFieldAssignmentsAssignments

    Data ImportData Im portintointo SAPSAPSystemSystem

    Checklist LSMWLSMW

    Start Phase 1 Phase 2 Phase 3 Aim

    Process Flow The following should be taken into account:

    Make sure that the SAP Customizing has been completed. Analyze the data that exists in your legacy system (LS) and which of it (from a business

    point of view) will be required in the future as well.

    Identify the transaction(s) that you want to use to transfer the data into the SAP system. Process the respective transaction in the SAP system manually using test data of the

    legacy system and note which fields must be filled. There may be mandatory fields that do not correspond to a data field in the legacy system. In this case, assigning a fixed value or constant or setting up a field as an optional field could be useful for the data transfer.

    Map the fields on paper by allocating the source fields and SAP fields to each other. You can do this by using the object overview [Seite 45] after you defined the object.

    Determine the conversion rule according to which the field contents of the source fields are to be converted into SAP fields.

    Define the way in which the data is to be extracted from the non-SAP system. (Note: The LSMW does not extract any data itself.)

    Which format does the legacy data have? Decide which standard import technique you want to use, or if you should define an extra "object class" by means of recording.

    In case only a part of your legacy system is to be replaced with the SAP system, you have to determine the functions that are to be covered by the SAP system and those to be covered by the legacy system. If necessary, a concept of the data flows and interface architecture has to be created.

    Authorizations Use To perform activities in the LSM Workbench, you require the appropriate authorizations. The LSM Workbench has the following four authorization levels:

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 10

    Authorization level Profile Function

    Display B_LSMW_SHOW The user can display all the projects and their associated steps. The user is not allowed to switch to the change mode.

    Execute B_LSMW_EXEC The user can display as well as read, convert, and import data.

    Change B_LSMW_CHG The user has Execute authorization and, in addition, can change and copy objects.

    Administration B_LSMW_ALL The user can use all the functions provided by the tool.

    The profiles listed here are not included in the profiles of the SAP system. You have to add the required profile to your user master record.

    Using the LSM Workbench is dependent on the client.

    Objects Definition Some objects that are of special significance for data migration with the LSMW are explained at the beginning of the documentation, even before the procedure for Migration of Legacy System Data Using LSMW is described.

    The following objects will be dealt with first:

    Project [Seite 11] Subproject [Seite 11] Object [Seite 11] Structure Relationships [Seite 12] Field Assignments [Seite 14]

    More Information For more information on batch input and direct input methods, as well as BAPIs and

    IDocs, see the SAP Library (SAP NetWeaver Components SAP Web Application Server)

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 11

    Project Definition All the data of an application system that is to be transferred to the SAP system.

    Use In the LSMW, the project serves as an organizational unit used to combine mapping and field assignments.

    Structure The project consists of:

    Subproject Business object (object) Structure relationships Field assignments

    Integration A project can have any number of subprojects assigned to it.

    Subproject Definition An organizational unit subordinated to the project.

    Integration A subproject can have any number of objects.

    Example Data migration in a company with several plants in which data is organized in different ways. In this case, the complete migration of data would be the project. The subprojects would comprise the data in the individual plants.

    Object Definition An object is a unit (Business Object) combined from the business point of view, which is used to transfer the data of a project to the SAP system.

    Structure An object consists of the following elements:

    Tables involved in the project and in the SAP system

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 12

    Structure(s) for transfer of data Relationship between data at the table and field level (structure relationships) Field assignments for conversion of data

    Integration An object is assigned to a subproject. For example, customer master, material master, or financial documents are objects.

    Structure Relationships Definition Structure relationships are mappings between structured trees.

    A mapping between two structured trees is allowed if the following applies to all nodes Ti and Tj with Ti~Tj: S(Ti) ~ S(Tj).

    Use The mappings between the trees have to make sense. This means, the structures of the data to be migrated (referred to as source structures in the following) have to be created within the hierarchy in a way that they can be allocated to the structures in the SAP system (referred to as target structures in the following).

    Structure The LSMW uses the following basic model:

    Description:

    Target tree T and source tree S are given. Assume that the node of S associated with node Ti of T is named S(Ti). Two nodes are "in relation to each other" (Ti ~ Tj) if there is a path from Ti to Tj. Obviously, this does not define any equivalency. The root node is in relation to all nodes.

    Example Valid structure relationship:

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 13

    TO SO

    T1 S1

    T2 S2

    T3 S3

    T4

    Invalid structure relationship:

    TO SO

    T1

    T2

    T3 S3

    S1

    S2

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 14

    Field Assignments Definition A collection of rules that define how the field contents are to be converted during data migration from the legacy system to the SAP system.

    Use The field assignments use placeholders and conversion rules in order to ensure both flexibility and consistency of data. In migration customizing, you assign values to the placeholders and select the processing types for the conversion rules.

    Structure The field assignments are distinguished by the different levels of reference:

    At the highest level, there is the domain, which is defined by the field type, field length, and value tables, or by means of fixed values.

    At the second level, there are the data elements, which are defined by the domain as well as by language-dependent texts.

    At the lowest level, there are the fields, which are defined by field names and data elements. The field-related rules refer to them.

    The placeholders and conversion rules defined by the field assignments are either linked to the target field directly or through the domain.

    Using LSMW Prerequisites Data migration comes in the end of the SAP implementation. Ideally, you must have already installed the SAP system and completed the Customizing settings for your applications.

    A basic knowledge of ABAP programming is useful when you migrate external data to the SAP system with the LSM Workbench.

    Process Flow Administration

    The LSMW includes a range of administration tools that you can use to configure, monitor, document and test the migration of your data.

    Data Migration

    The actual data migration process is simplified as a sequence of fixed steps. On the initial screen of the LSM Workbench, the next step is displayed automatically.

    More Information For details about working with the LSM Workbench, see the following:

    Starting the LSM Workbench [Seite 15]

    User Guidance [Seite 16]

    Recordings [Seite 21]

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 15

    IDoc Inbound Processing [Extern]

    Exporting a Project [Seite 28]

    Importing a Project [Seite 29]

    Migration of Data with LSMW [Seite 29]

    Troubleshooting [Seite 87]

    Starting the LSM Workbench Prerequisites You have the appropriate authorization.

    Process Flow 1. Enter transaction code LSMW to display the initial screen.

    2. Select a project [Seite 11], subproject [Seite 11] and a data object [Seite 11]. Choose Edit Create Entry if you want to configure a new project, subproject or data object. The ID of the entry can have a maximum of ten characters (without blanks).

    3. Name the object: Enter an ID with a maximum of ten characters to identify the business data object. See Object [Seite 11]

    4. Choose Execute (Continue). The selection list of steps is displayed.

    More Information Selecting a Step [Seite 15]

    Creating a Personal Menu [Seite 16]

    Selecting a Step Use From the selection list of steps, you select the step that you want to carry out each. On the right side of the screen, you see when the last action has been performed in the individual steps. The date, time, and user are displayed.

    Prerequisites You have selected the project, and the selection list of steps is displayed.

    Procedure ...

    1. Select the step that you want to carry out.

    2. Choose Execute. The corresponding screen appears. Alternatively, you can select a step by double-clicking on it, which will display the corresponding screen immediately.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 16

    3. After carrying out the step, choose F3 to return to the selection list.

    After selecting a step, you are in the display mode first. In order to make changes, you have to switch to the change mode (icon) where all the functions are available.

    See also: Authorizations [Seite 9]

    Creating a Personal Menu Use You determine the length of the selection list of steps being displayed. The complete menu gives you an overview of all the steps that may be relevant for migration of data from the legacy system. However, you can only display those steps that have to be carried out (main steps) or in an advanced stage of migration those few steps that still need to be carried out.

    Procedure ...

    1. From the selection list of steps, choose Personal menu or choose Extras Personal menu. A dialog box appears.

    2. Select one of the steps shown in the following table:

    To Choose

    Display all the steps Select all

    Display the main steps only Main steps

    Display the relevant steps The required steps

    Delete all the steps Deselect all

    Delete individual steps The corresponding steps by deselecting them

    3. Choose Continue. The selection list of steps appears again.

    4. If you want the steps to be numbered, click on Numbers on, or choose Edit Numbers on. If you do not want the steps to be numbered, click on Numbers off, or choose Edit Numbers off.

    User Guidance Use Almost any important functions have been assigned to pushbuttons to make using the LSM Workbench as simple and intuitive as possible.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 17

    The administration and overview functions are either on the initial screen or on the subsequent screen (list of steps). This screen has a central function. From here, you start all the steps for migration. After carrying out the step, you return to the list of steps again.

    Any other functions, which can be found in the respective steps, will be explained in these steps.

    The LSM Workbench distinguishes between a display mode and a change mode. To have all the functions displayed and to be able to make changes, you need to be in the change mode. By default, the LSM Workbench is in the display mode. You have to switch to the change mode if you want to make changes in the individual steps. To switch to and remain in the change mode (or vice versa), choose Doubleclick=Edit in the list of steps.

    More Information LSMW Administration [Seite 17]

    Documentation [Seite 17]

    Displaying All Objects [Seite 18]

    Displaying My Objects [Seite 18]

    All Objects of the Project [Seite 19]

    Project Documentation [Seite 19]

    Action Log [Seite 20]

    Creating a Change Request [Seite 20]

    LSMW Administration Use The LSM Workbench provides a central maintenance function that can be used to create, change, or delete project, subproject, object, and field assignment entries.

    Prerequisites You have chosen Goto Administration on the LSMW initial screen, and the LSM Workbench: Administration screen is displayed.

    Activities You can create, edit, display, delete, copy, or rename projects, subprojects, objects,

    and reusable rules.

    You can copy subprojects from one project to a different project and delete objects. You can delete reusable rules or copy them from one legacy system to another. You

    can also display the objects for which a central rules has been used. See also: Editing Reusable Rules [Seite 56].

    Documentation Use Allows you to store your own documentation.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 18

    Procedure 5. Choose Edit ( Documentation.

    6. The editor appears.

    7. Enter your remarks.

    8. After saving the data, the original screen appears again.

    Result The documentation function is available in the first seven steps of data migration as well as in Administration and Recordings.

    See Project Documentation [Seite PAGEREF SAPC4825E3D2AD711D3BC3400105A6588B2 \h 19]

    TC "Displaying All Objects" \l 4 \* MERGEFORMAT Displaying All Objects Use Gives you an overview of all the projects that have been created.

    Prerequisites You have entered the transaction code, and the initial screen is displayed.

    Procedure ...

    1. Choose All objects.

    2. Position the cursor on a project and select it by double-clicking on it.

    Result A table containing all the projects already created, their associated subprojects and object names as well as their owners and the description of the individual projects is displayed.

    Displaying My Objects Use Gives you an overview of all the projects that you created.

    The system automatically sets the user name for the owner. The owner name, however, can also be overwritten. This may be useful in order to make it easier for someone else to search for a specific project.

    Prerequisites You are on the LSMW initial screen, have the appropriate authorization, and you have created at least one project.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 19

    Procedure Choose My objects.

    Result A table containing all the projects created by you, their associated subprojects and object names as well as the description of the individual projects is displayed. Your user name, which you specified when logging on to the system, identifies you as the owner.

    All Objects of the Project Use Gives you an overview of the respective project.

    Prerequisites You are on the LSMW initial screen, and a project has been selected, i.e., the Project, Subproject, and Object fields have been filled.

    Procedure Choose All objects of the project.

    Result The hierarchical tree structure of the overall project is shown in an overview. The date of the last change as well as the name of the last user who changed an entry is displayed.

    Project Documentation Use Gives you an overview of the overall documentation that you created. The project documentation can be saved in different file formats as well as printed or sent to another user.

    Prerequisites You have stored notes on the project in the individual steps under Documentation.

    Procedure On the LSMW initial screen, choose Project documentation.

    Result The hierarchical tree structure of the project is shown together with the documentation stored for it.

    See also: Documentation [Seite 17]

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 20

    Action Log Use All the actions associated with a project are logged, including the date, user name, time, and step.

    Prerequisites You have selected a project. Steps have been carried out in the corresponding project.

    Procedure Choose Action log.

    An overview of all the steps carried out is displayed.

    You can reset the action log by choosing Extras Reset action log. This action is logged by the system with a reference to the user and date and shown in the action log.

    Creating a Change Request Use Creates an SAP change request that contains all the information on an LSM Workbench project.

    Prerequisites You have the appropriate authorization. You are on the LSMW initial screen.

    Procedure ...

    1. Choose Extras Create change request. A dialog box appears

    2. Choose Create request. A dialog box appears

    3. Enter a short description.

    4. Choose Save. Your change request has a request number assigned to it.

    Result The change request has been created.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 21

    Recordings Use You can use the recording function to create a new object (or a new "import method") if neither a standard batch input program nor a standard direct input program nor the BAPI/IDoc method is available for a data object.

    Integration Recording entries are assigned to one project each.

    Prerequisites You are on the LSM Workbench initial screen.

    Features Recordings may also be useful when using a standard program in order to reduce the number of target fields.

    Activities Proceed as follows in order to create a recording: ...

    1. On the LSM Workbench initial screen, choose Goto Recordings. An overview of recordings is displayed.

    2. Choose Recordings Create recording. A dialog box appears.

    3. Fill in the given fields.

    4. Recordings are assi gned to exactly one project. Choose Continue. A dialog box appears

    5. Enter the corresponding transaction code. See Determining the Transaction Code [Seite 22]

    6. If you want to save documentation for your recording, make sure you are in change mode and choose Edit Documentation.

    Now you can run the specified transaction. Fill all those fields with data that you want to supply with values of your legacy data later on.

    This is not a simulation mode. Any entries that you make here are posted in the system. Make sure that you do not enter any data that can have unwanted effects. The data you have entered is replaced by the corresponding legacy data in the data transfer.

    When using the recording function, you have to define the number of items and the screen sequence. You are not able to use variables. The target structure must be flat, it must not contain any header/item structures with a variable number of items.

    Each object can have multiple recordings assigned to it.

    You also have the option of creating a recording in transaction SHDB, generating a program from this recording, and then modifying and registering this program so that it can be used in the LSMW.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 22

    More Information Once the recording has been completed, you can edit it. You can delete fields or add new fields.

    Editing the Results of the Recording [Seite 22]

    Editing the Results of the Recording Prerequisites You have run and exited a transaction.

    Use In the Parameter Name column, all fields that you want to include in the migration must be given a name. These names are copied as the names of the SAP fields when the batch input session is created. The LSMW uses the specified default value for all those fields that you did not assign a field name to.

    Procedure 1. Perform the following steps, if necessary:

    To Position the cursor and choose

    Assign the field name of the underlying SAP field and its field description

    Default

    Delete the field name and description Reset

    Edit the field name and description as well as the default value

    Double-click

    2. Save your entries.

    Result A batch input program is generated in the LSMW out of the recording and its postprocessing.

    You can use field names several times. However, in field mapping, a field name is available once only.

    Determining the Transaction Code Use You can determine the transaction code for the transaction you want to have recorded in the SAP system.

    Procedure ...

    1. From the main menu of the SAP system, choose the application area that the data to be migrated is associated with.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 23

    2. Follow the paths until you reach the appropriate transaction.

    3. Choose System Status. Under the Repository data, you can find the transaction code of the corresponding transaction.

    If you want to know what the transaction code for the Create customer transaction is: ...

    1. Choose Accounting Financial accounting Customers. The corresponding dialog box appears.

    2. Choose Master data Create. The corresponding dialog box appears.

    3. Choose System Status. In the Repository data, you can see that this is Transaction FD01.

    IDoc Inbound Processing Use IDocs (intermediate documents) have been developed for the exchange of messages between different systems. Providing a standard interface with the SAP system, this technique can also be used to transfer data.

    For more information, choose IDoc Interface in transaction WEDI. .

    See also: Starting IDoc Generation [Seite 76]

    Prerequisites To be able to use IDoc inbound processing, you have to define settings and perform preparatory tasks. These tasks are grouped on the initial screen of the LSM Workbench under Settings IDoc Inbound Processing.

    To use IDoc inbound processing, you must first perform the following steps:

    1. Define or select a file port for transporting the file. Optionally, you can also create a tRFC port.

    See Creating Ports [Seite 24]

    2. The partner type has to be defined or selected.

    See Partner Types [Seite 25]

    3. The partner number has to be defined or selected.

    See Partner Numbers [Seite 26]

    4. IDoc inbound processing must be activated, and the workflow customizing must be checked. Both of these tasks are performed once in each system.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 24

    See Verifying the Workflow Customizing [Seite 26]

    Creating Ports Use A port has to be available for a transfer of data from a legacy system to the SAP System by means of IDocs. As well as the file port, you can also specify a tRFC port.

    For data conversion, you can decide whether a file should be created or whether the data should be passed to inbound processing by "packages" directly.

    See Starting IDoc Generation [Seite 76]

    Prerequisites You have chosen Settings IDoc inbound processing on the LSMW initial screen, and the IDoc inbound processing: Preparations screen is displayed.

    Procedure We recommend to maintain the following entries: ...

    1. Choose Maintain ports. The WF-EDI: Port Definition screen appears.

    2. Activate the change mode.

    3. Position the cursor on File and choose Create. Fill in the given fields. Recommendation:

    Port: LSMW

    Description: Legacy System Migration Workbench

    Version: IDoc record types: SAP Release 4.x

    If you additionally want to create the transactional RFC port:

    1. Position the cursor on Transactional RFC and choose Create. Fill in the given fields.

    2. Save your entries.

    3. Choose F3 or Back to return to the IDoc inbound processing: Preparations screen. Kehren Sie ber F3 oder Zurck zu dem Bild en zurck

    Result The partner port has been created.

    More Information See also: Partner Types [Extern]

    See also: Partner Numbers [Seite 26]

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 25

    Partner Types Use You must select a partner type when you transfer data from an external system or legacy system to an SAP system in IDocs. For the LSMW, we recommend that you use the partner type US.

    Prerequisites You have chosen Settings IDoc Inbound Processing on the LSMW initial screen, and you are on the screen IDoc Inbound Processing: Preparatory Measures.

    Procedure Enter US as the partner type.

    To do this, proceed as follows:

    1. Choose Maintain Partner Types.

    2. Activate the change mode.

    A table is displayed.

    3. Choose New Entries.

    4. Fill in the fields.

    Recommended values:

    Partner type: US Report name: /SAPDMC/SAP_LSMW_PARTNERTYPES Form routine: READ_USER Short text:

    5. Save your data and choose F3 or Back to return to the screen IDoc Inbound Processing: Preparatory Measures.

    See also: Transaction WE20 Maintain Partner Profiles Result The partner type has been created.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 26

    Partner Numbers Use You must select a partner number when you transfer data from an external system or legacy system to an SAP system in IDocs.

    Prerequisites You have chosen Settings IDoc inbound processing on the LSMW initial screen, and the IDoc inbound processing: Preparations screen is displayed.

    Procedure Enter LSMW as partner number.

    Or: ...

    1. Choose Maintain partner numbers. The Partner Profiles screen appears.

    2. Choose Create.

    3. Fill in the given fields. Recommendation:

    Partner number: LSMW

    Partner type: US

    Partner status: A (active)

    Type: US

    Language: EN or DE

    ID: Your user ID

    4. Save your data and choose F3 or Back to return to the IDoc inbound processing: Preparations screen.

    Result The partner numbers have been maintained.

    Checking the Workflow Customizing Use Workflow Customizing defines the requirements for using IDoc inbound processing.

    Prerequisites You have chosen Settings IDoc inbound processing on the LSMW initial screen, and the IDoc inbound processing: Preparations screen is displayed.

    Procedure ...

    1. Choose Workflow customizing. The Workflow Customizing screen appears.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 27

    2. Choose Perform Automatic Workflow Customizing. The auto customizing log for the runtime system is displayed.

    3. Check the entries. The following entries of the workflow runtime system must have a green checkmark assigned to them: Maintain System Administrator for Workflow. Configure RFC Destination. Classify Decision Task as General. Activate Send to Objects and HR Objects.

    4.

    Transporting LSMW Projects Use The LSM Workbench gives you the option of transporting the data of a project either with the SAP Change and Transport System, or with downloads and uploads.

    Constraints These transports do not include the defaults for IDoc inbound processing. You must set these defaults manually for each project in each SAP system and client.

    Prerequisites You have created and processed the project that you want to transport.

    Features You have the following options for transporting a project:

    Creating a Change Request [Seite 27] Exporting a Project [Seite 28] Importing a Project [Seite 29]

    Creating a Change Request Use You can create an SAP change request that contains all information about an LSMW project.

    You can use the SAP Change and Transport System to export and import this change request. If you choose to transport LSMW data in this way, you can use the Change and Transport System tools to monitor who transported which data into which system, and when this happened.

    Procedure 1. Enter your project data in the initial screen of transaction LSMW.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 28

    2. Choose Extras Create Change Request. 3. Select an existing change request, or choose Create Request.

    4. If you create a new request, you must enter a description and possibly also a project name.

    5. Choose Continue or Save.

    When you import a change request of this type, the entire project is deleted in the target system, and then created again.

    When you export the transport request, all changes to the project are recorded that were made up until the time of the export (this could include changes made after the transport request was created).

    Exporting a Project Use It is a good idea to perform the migration from a legacy system to the SAP system in a test system first. This function is used to transfer the field assignments developed to the production system.

    Prerequisites The mapping and field assignments for a migration object already exist.

    Procedure ...

    1. On the LSMW initial screen, choose Extras Export project. A dialog box appears

    2. Select a project. Choose Continue.

    3. The structure hierarchy of the selected project is displayed. Either Select / Deselect parts of the project or export the overall project.

    4. Choose Export conversion rules Export. A dialog box appears

    5. Specify the file name and path.

    6. Confirm by choosing Open.

    Result The mapping and field assignments are exported.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 29

    The documentation of the selected elements is also exported.

    Importing a Project Use Import the mapping and field assignments into a different SAP system.

    Prerequisites Mapping and field assignments have already been exported from an SAP system with an identical LSMW version.

    Procedure ...

    1. On the LSMW initial screen, choose Extras Import project. A dialog box appears

    2. Select the file name and path.

    3. Choose Open.

    4. The file is being imported and its contents are analyzed. After the analysis, you get a list of the subprojects and objects that have been found.

    You can now select the objects that you want to import. Any existing data of the project is flagged with a green checkmark. This data is overwritten by the import.

    You can prevent a project that already exists in the target system from being overwritten by using the Import and Rename function.

    Error opening file

    If the message Error opening file is issued during transfer, check to see whether the directory mentioned exists and whether you have write authorization for this directory.

    Result The mapping and field assignments are imported into a different SAP system.

    Migration of Data with LSMW Purpose You can use the LSMW if the source structures are simple, such as:

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 30

    You can also use the LSMW if the legacy system has complex structures, such as:

    Prerequisites Comparison of functions between the legacy system and the SAP system must have been completed. As a result of comparison, the data to be migrated is determined.

    Process Flow

    SAP System

    SAP

    ConvertData

    Batch Input Processing

    Legacy Dataon PC

    ReadData

    ConvertedData

    Data that hasbeen read

    Legacy Dataon

    Application

    Server

    Inbound - IDoc Processing

    Direct Input Processing

    Structure - Relationships

    Field - Assignments

    Conversion Rules

    SAP Application Server

    SAPSystem

    ...

    LSMW supports a step-by-step procedure. On the List of steps screen, the next step is automatically displayed each.

    The following basic steps are included in the LSMW:

    1. Maintaining Object Attributes [Seite 34]: Here, you define the project, subproject and the required (business) object. If a suitable SAP standard import program is not available, you can use the recording function to create a user-specific, new object.

    2. Maintaining Source Structures [Seite 36]

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 31

    3. Maintaining Source Fields [Seite 38]

    4. Maintaining Structure Relationships [Seite 41]: In these steps, you define the structures and fields of the project. They describe the transfer file and have to be used in the export program in the same format. After this, you relate the structures and fields of the SAP system to those of the project.

    5. Maintaining Field Mapping and Conversion Rules [Seite 40]

    6. Maintaining Fixed Values, Translations, and User-Defined Routines [Seite 47] Here, you define the conversion rules for the processing of project data. The system generates the conversion program from the structure and field relationships as well as the conversion rules. You then carry out Migration Customizing, that is, you assign values to the fixed values and translation values and specify the definite variants for the conversion rules.

    7. Specifying Files [Seite 65]

    8. Assigning Files [Seite 69]

    9. Reading Data [Seite 70]

    10. Displaying Read Data [Seite 71]

    11. Converting Data [Seite 71]

    12. Displaying Converted Data [Seite 71]

    13. Starting IDoc Generation [Seite 76]

    14. Starting IDoc Processing [Seite 77]

    15. Creating an IDoc Overview [Seite 78]

    16. Starting IDoc Postprocessing [Seite 78]: The data converted is transferred to the SAP system. The import technique or method has been assigned to the object in the first step already by selecting the object type.

    Result Legacy system data has been imported to the SAP database. Any subsequent processes result out of the type of datasets migrated.

    More Information For more details about migrating data with the LSMW, see the following:

    Description of the Project [Seite 31]

    Definition of Source Structures and Fields [Seite 35]

    Editing Field Assignments [Seite 45]

    Data Import [Seite 74]

    Special Case: Migration of Long Texts [Seite 79]

    Periodic Transfer of Data [Seite 86]

    Description of the Project Purpose Your work with LSMW starts with the definition of the project as a unit of the data to be migrated.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 32

    Process Flow ...

    1. You create the project from which you want to migrate data in the LSMW:

    If Then

    The mapping and field assignments for a project are available in an SAP system (e.g. test system).

    You export them from this system and import them into your SAP system. See Exporting a Project [Seite 28] and Importing a Project [Seite 29]

    The mapping and field assignments for a project have been stored on a data carrier.

    You import them into your SAP System.

    You want to migrate data from your legacy system for the first time.

    You define the project.

    2. You define the subproject for a project or make it known to the LSMW by importing the mapping and field assignments (see above).

    Result The project and subproject have been defined. Now you define the (business) object.

    More Information Editing a Project [Seite 32]

    Editing a Subproject [Seite 33]

    Editing Objects [Seite 33]

    Maintaining Object Attributes [Seite 34]

    Where-Used List [Seite 34]

    Editing a Project Integration Editing a project includes all the associated objects, such as sub-projects, (business) objects, and field assignments.

    Prerequisites A project has been created.

    Features You can perform the following actions: Create a project (see: Starting the LSM Workbench [Seite 15]); edit a project; display a project; delete a project; copy a project; or rename a project.

    Activities ...

    1. On the LSMW initial screen, choose Goto Administration. 2. Position the cursor on the appropriate project.

    3. Under Administration, choose the appropriate entry.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 33

    Editing a Subproject Use You can create and edit any number of subprojects for a project that you want.

    Integration A subproject can have any number of objects.

    Prerequisites A subproject is always subordinate to a project.

    Features You can create, rename, copy, or delete subprojects.

    Activities ...

    1. On the LSMW initial screen, choose Goto Administration. 2. Position the cursor on the appropriate subproject.

    3. Under Administration, choose the appropriate entry.

    Editing Objects Use You can copy or delete objects.

    Integration To copy an object, you need a project for which you want to use the object being copied.

    You can delete objects that are no longer required. This will delete the mapping and the field assignments associated with the object. Reusable rules continue to exist.

    Prerequisites You must have created an object and maintained its attributes.

    See Maintaining Object Attributes [Seite 34]

    Features You can perform the following actions: Create an object (see: Starting the LSWM Workbench [Seite 15]); edit an object; display an object; delete an object; copy an object; rename an object.

    Activities ...

    1. On the LSMW initial screen, choose Goto Administration. 2. Position the cursor on the corresponding object.

    3. Under Administration, choose the corresponding option.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 34

    Maintaining Object Attributes Use Maintenance of the object attributes is the first step carried out in the LSM Workbench.

    Prerequisites You have created a project, and you have chosen Continue on the initial screen to get to the list of steps.

    Procedure 1. From the list of steps, choose Maintain object attributes.

    A screen appears. 2. Choose Change.

    3. Specify the object.

    4. Specify whether the data is to be transferred once or periodically. With a periodic data transfer, you cannot import any data from the PC. Additional step Frame program is displayed. See Periodic Data Transfer [Seite 86]

    5. Select the object type and import technique and fill in the corresponding fields. You can use the F4 help on the input fields. In this help, lists are displayed from which you can select the relevant objects.

    6. Choose Back or F3 to return to the list of steps.

    Result The object attributes and, as a consequence, the import method for the data to be migrated have been defined.

    When you select the batch input or direct input method, documentation is displayed for the program (see icon).

    When you select the batch input recording, you can make additional recordings after activating the icon.

    If you select the BAPI or IDoc method, the system checks whether a so-called partner profile for the defaulted partner and the selected message type already exists when you save the data. Otherwise, the system tries to create them. See also: Converting BAPIs/IDocs [Seite 72]

    Where-Used List Use Shows you for which objects of a project specific reusable rules have been used.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 35

    Prerequisites Rules that can be reused have been created.

    Procedure In the Administration menu option: ...

    1. On the LSMW initial screen, choose Goto Administration. 2. Position the cursor on the corresponding reusable rule.

    3. Choose Where-used list. A dialog box appears.

    For recordings: ...

    1. On the LSMW initial screen, choose Goto Recordings. 2. Position the cursor on the corresponding reusable recording entry.

    3. Choose Where-used list. A dialog box appears.

    Result A table of the objects in the project to which the reusable rule has been applied is displayed. If no reusable rule has been used, the notification message List does not contain any data is issued.

    Definition of Source Structures and Fields Purpose The source structures and fields have to be defined before they can be adjusted to the SAP target structures and fields.

    Process Flow 1. The object overview shows you the structures and fields that are expected in the SAP

    system. To display the list, click on Object overview or choose Extras Object overview in the list of steps. See Object Overview [Seite 45]

    2. You define the source structures.

    3. You define the source fields associated with the structures. From the list of steps, choose Maintain source fields.

    Result The source structures and fields have been defined.

    More Information Maintaining Source Structures [Seite 36]

    Changing Source Structures [Seite 36]

    Reassigning Source Structures [Seite 37]

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 36

    Deleting Source Structures [Seite 37]

    Maintaining Source Fields [Seite 38]

    Copying Source Fields [Seite 38]

    Changing Source Fields [Seite 39]

    Reassigning Source Fields [Seite 40]

    Deleting Source Fields [Seite 40]

    Maintaining Source Structures Use The source structures (LS structures) are defined with the ID, name, and hierarchical relationships. Start with the highest hierarchy level since only hierarchies with the same level or a lower level can be created.

    Procedure ...

    1. From the list of steps, choose Maintain source structures.

    2. Choose Change.

    3. Position the cursor on Source structures.

    4. Choose Create structure. A dialog box appears.

    5. Enter the name and description of the source structure.

    6. Choose Continue. The LSM Workbench: Source structures screen appears again. The structure you created is displayed.

    You can create additional structures now. When you create additional structures, a dialog box with query "Same level/subordinated" appears. By setting the corresponding indicator, you define the hierarchy level of the structure.

    For user-defined objects (created by recording a transaction) you may define only one structure, since there is a flat target structure available only.

    See Recordings [Seite 21]

    Changing Source Structures Procedure ...

    1. From the list of steps, choose Maintain source structures. A screen appears.

    2. Position the cursor on the corresponding line.

    3. Choose Source structures Change structure. 4. Enter changes as required.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 37

    5. Choose Continue.

    Reassigning Source Structures Use You have to transfer source structures to a new position within the hierarchy.

    Procedure ...

    1. From the list of steps, choose Maintain source structures. A screen appears.

    2. Choose Change.

    3. Position the cursor on the structure to be reassigned.

    4. Select this source structure.

    5. Position the cursor on the source structure that you want to assign the selected structure to.

    6. Choose Source structures Move structure. A dialog box appears.

    7. Specify whether the structure to be reassigned is to be assigned at a lower level or at the same level.

    8. Choose Continue. The structure has been transferred to the new position.

    When you reassign a structure, the subordinate structures are reassigned as well. The header structure cannot be reassigned.

    Deleting Source Structures Procedure ...

    1. From the list of steps, choose Maintain source structures. A screen appears.

    2. Position the cursor on the corresponding line.

    3. Choose Delete structure. The structure is deleted.

    Deleting a structure deletes the fields as well as the data relationships and conversion

    rules already created for the structure.

    The structure of the highest hierarchy level cannot be deleted.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 38

    Maintaining Source Fields Prerequisites The source structures must have been defined before you maintain the source fields.

    Procedure Two options are available. You can create the source fields: ...

    1. From the list of steps, choose Maintain source fields. The LSM Workbench: Source fields screen appears.

    2. Choose Change.

    3. Position the cursor on the associated source structure if you want to define a field for the first time. For any additional field definitions, make sure to enter the new field below the original cursor position.

    4. Choose Create field. A dialog box appears.

    5. Fill in the following fields: Field name Field text Field length Field type: Character field, numeric field, packed field, or date field.

    6. Choose Continue.

    You can also maintain source fields in table format: ...

    1. Position the cursor on a source structure or on a source field already created.

    2. Choose Table maintenance.

    3. Enter the field name, type, length, and field description. If you enter the field name only and then choose Enter, the system will assign the following values: Field type: C Field length: 10 Field description in accordance with the field name.

    By choosing Extras Unassigned Source Fields, you can display the source fields

    that have not been assigned yet, which means that you can see whether there is data that has been neglected.

    If you want to run a migration test with a limited number of data, set an indicator for Selection parameters under Read/convert data.

    If data for several source structures is included in one file, the value of the respective source structure has to be specified under Identifying field content.

    Copying Source Fields Use You can also create a source field by copying a different one.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 39

    Prerequisites You are in step Maintain source fields, and the change mode is activated.

    Procedure Choose Copy fields.

    A dialog box with the following options is displayed:

    Upload (Tab delimited text): The system expects the description of the source fields to be stored in a text file the columns of which are separated by tab stops.

    Choose Continue. A dialog box appears that specifies what the structure of the file must be like. Check to see if your file meets these requirements.

    Specify the name and path of the file. Confirm by choosing Transfer.

    Copy from other object: You can copy source fields from the source structure of a different object.

    Specify the project, subproject, object, and source structure from which you want copy the source fields.

    Choose Continue. Copy from Data Repository: You can copy the source fields from a structure of the ABAP Dictionary.

    Enter the table name. Choose Continue.

    From data file (field names in 1st line): The data file from which you copy the source fields must be available on a PC in the format "Tab delimited text". The field names must be on the first line.

    Enter the number of fields as well as their maximum record length. Choose Continue.

    A dialog box appears

    Specify the name and path of the local file. Confirm by choosing Transfer.

    Result The source fields have been created.

    Changing Source Fields Procedure ...

    1. From the list of steps, choose Maintain source fields. A screen appears.

    2. Position the cursor on the corresponding line.

    3. Choose Source fields Change field.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 40

    4. Enter changes as required.

    5. Choose Continue.

    Reassigning Source Fields Use You want to move source fields to a new position.

    Procedure ...

    1. From the list of steps, choose Maintain source fields. A screen appears.

    2. Choose Change.

    3. Position the cursor on the source field to be reassigned.

    4. Select this source field.

    5. Position the cursor on the source field under which you want to position the previously selected source field.

    6. Choose Source fields Move field. The field is reassigned.

    Fields can only be moved within the corresponding structure.

    Deleting Source Fields Procedure ...

    1. From the list of steps, choose Maintain source fields. A screen appears.

    2. Position the cursor on the line of the field to be deleted.

    3. Choose Delete field. The field is being deleted.

    By deleting a field, any data relationships and conversion rules associated with the field are deleted as well.

    Field Mapping and Conversion Rules Purpose After defining the structures and fields of the project, you use the field mapping and conversion rules to establish the object dependencies between the project and the SAP system.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 41

    Process Flow 1. The Object overview shows you the expected SAP structures including the

    associated fields. See Object Overview [Seite 45] 2. You define the structure relationships between the project and the SAP system.

    From the list of steps, choose Maintain structure relationships.

    3. You define the field relationships between the project and the SAP system. From the list of steps, choose Maintain Field Mapping and Conversion Rules.

    Result The relationships between the project and the SAP system have been established. Now, you have to define the conversion rules for data conversion.

    More Information For more details on field mappings and conversion rules, see the following:

    Defining Structure Relationships [Seite 41]

    Deleting Structure Relationships [Seite 42]

    Defining Field Relationships [Seite 42]

    Deleting Field Relationships [Seite 43]

    Auto Field Mapping [Seite 43]

    Defining Structure Relationships Use You establish the structure relationships between the project and the SAP system.

    Prerequisites The source structures must have been defined.

    Procedure From the selection list of steps, choose Maintain Structure Relations. A screen appears where the structures used in the SAP system are displayed. The system shows you which target structures must be filled.

    If you want to know which fields are each associated with an SAP structure:

    1. Click on the description of the SAP structure (do not click on the ID!). The system branches to the Dictionary The fields are displayed.

    2. Choose Back. The Structure relations screen appears again.

    Maintain structure relationships:

    1. Choose Change.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 42

    2. Position the cursor on the ID of an SAP structure.

    3. Choose Relationship. A dialog box appears where the source structures created are displayed.

    4. Position the cursor on the appropriate source structure and choose Continue. The system displays the structure relationships between both systems.

    5. Choose Check to examine the structure relationships for errors.

    Many batch input and direct input programs use a control record called BGR00 or BI000. Always assign the source structure of the top hierarchy level (the header structure) to this record.

    Multiple SAP structures can be assigned to a source structure, however, only one source structure can be assigned to an SAP structure. If you want to assign multiple source structures to a target structure, proceed as follows: Create your source structures in the conventional way. Then assign the lower level source structure to the target structure. You can then use the fields from both source structures for the fields of the target structure.

    If you want to change a structure relationship, you have to delete the existing structure relationship first.

    See Deleting Structure Relationships [Seite 42]

    Deleting Structure Relationships Procedure ...

    1. From the selection list of steps, choose Maintain Structure Relations. A screen appears.

    2. Position the cursor on the corresponding line.

    3. Choose Delete relationship. The system deletes the corresponding structure relationship between both systems.

    When you delete a structure relationship, it is not possible to establish any relationships between the associated source fields and the SAP target fields. Field relationships already established will be deleted automatically.

    Defining Field Relationships Use You establish the field relationships between the project and the SAP system.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 43

    Prerequisites The source fields and the structure relationships between the project and the SAP system must have been defined.

    Procedure ...

    1. From the list of steps, choose Maintain Field Mapping and Conversion Rules. A screen appears.

    2. Choose Change.

    3. Position the cursor on the appropriate SAP field.

    4. Choose Assign source field. The Assign source field dialog box appears.

    5. Select the corresponding source field. The system displays this field as source field now and defaults a field-related 1:1 processing (Move) of data.

    You can assign multiple source fields to an SAP field. However, data can only be processed by means of a rule that you create yourself. The predefined rules only support 1:1 relationships.

    Deleting Field Relationships Procedure ...

    1. From the list of steps, choose Maintain Field Mapping and Conversion Rules.

    2. Position the cursor on the appropriate SAP field.

    3. Choose Remove source field. If the SAP field only has one source field assigned to it, the relationship will be deleted. If the SAP field has several source fields assigned to it, a dialog box appears.

    4. Select the source field for which you want to delete the relationship.

    5. Choose Select. The relationship is being deleted.

    When you delete the field relationship, the rule assigned by default continues to exist. You should set an initial value in this case.

    See Assigning Initial Values [Seite 49]

    Auto Field Mapping Use Auto field mapping is useful in case if fields with identical or similar names/descriptions exist in the source and target structures. This is particularly the case if data is transferred from one SAP system to another SAP system.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 44

    Integration As already indicated by the name, auto field mapping is a part of the field mapping. However, in contrast with field mapping, you do not have to assign a source field to each target field and a rule to each field individually. Instead, auto field mapping is performed "automatically" after setting the indicators described below.

    Features 1. From the list of steps, choose Maintain field mapping and conversion rules.

    2. Choose Extras Auto-Field Mapping. A dialog box appears

    3. Set the appropriate indicators.

    Process all target fields Checks all the target fields one after the other.

    Process all target fields from cursor position Checks all the target fields one after the other starting with the target field on which the cursor is positioned.

    Only process initial target fields Only checks those target fields that did not have a conversion rule assigned to them yet.

    Also process non-initial target fields Also checks those target fields that already had a conversion rule assigned to them.

    Match fields with identical names When checking the target field, the system searches for a source field with the same name.

    Match fields with similar names When checking the target field, the system searches for a source field with the same name first. If a field with the same name cannot be found, the system determines a matching probability for all source fields on the basis of field names and descriptions.

    Minimum matching probability in percent Specify a value for the matching probability in percent.

    Only those source fields are defaulted the matching probability of which reaches/exceeds the specified value.

    Only apply rule "Transfer (MOVE)" If a suitable source field is determined for a target field, "Transfer (MOVE)" is assigned as a rule exclusively.

    Also apply reusable rules Reusable rules are considered in the check as well.

    Only if source field is not initial A suitable rule that has been found is only applied in case if the source field is not initial. Example:

    IF NOT IS INITIAL. = . ENDIF.

    With confirmation If a suitable source field or reusable rule has been found for a target field, proposals are offered to the user for acceptance or rejection.

    Without confirmation The proposals determined are adopted without confirmation by the user.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 45

    Upon completion of the auto field mapping, the following message is issued: "The auto-field mapping is done."

    Object Overview Definition At first, the object overview only shows the data structures in the SAP system. This means, it contains a list and description of the SAP structures and the associated SAP fields for the respective object. As data migration proceeds, it also contains information on the project and the relationships between the project and the SAP system.

    Use The object overview serves for information purposes.

    You can save, send, or print it in different file formats and use it for a mapping on paper in order to prepare data migration. This means that you assign SAP structures and fields to the structures and fields of the project on paper first. When you establish the relationships between both systems in the LSMW later on, you will already know how the structures and fields have to be allocated.

    Editing Field Assignments Purpose The field assignments are used to define the way in which the data is to be converted.

    Process Flow You do not necessarily have to carry out any of the following steps. Also, you do not have to strictly keep to the order in which they are listed.

    6. Displaying SAP Fields [Seite 46]

    You can display information on a specific field.

    7. Reusable Rules [Seite 55]

    You specify the conversion rule to be used to convert a source field into the corresponding SAP field. For this, you can use predefined conversion rules or create your own field assignments in the editor.

    8. Copying Reusable Rules [Seite 56]

    You can copy reusable rules if appropriate field assignments have been defined for another project already.

    9. Suppressing Data Records [Seite 63], Creating Additional Data Records [Seite 64]

    You can create structure-related rules, suppress the data records, or create additional data records.

    10. Global Variables [Seite 59]

    You can create global data if you need table contents from the SAP system and/or variables for the field assignments.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 46

    11. Checking the Syntax [Seite 73]

    12. Generating the Conversion Program [Seite 69].

    You generate the conversion program.

    Result The field assignments for data conversion have been defined, and the conversion program has been generated.

    More Information Possible Values [Seite 47]

    Field-Related Rules [Seite 47]

    Reusable Rules [Seite 55]

    Modifications for Experienced Users [Seite 58]

    Displaying SAP Fields Use This function can be used to branch to the ABAP Dictionary and display information on an SAP field (for example, data element, type, and length).

    Procedure ...

    1. From the list of steps, choose Maintain Field Mapping and Conversion Rules. A screen appears.

    2. Click on the description of the field for which you want to see more information. The system branches to the ABAP Dictionary and displays the corresponding field.

    Field Documentation Use Explains the corresponding SAP field.

    Prerequisites You are in step Maintain field mapping and conversion rules.

    Procedure Choose the "i" icon.

    Result A short description of the field on which the cursor is positioned is displayed.

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 47

    Possible Values Use Gives you an overview of all the values that are possible for the respective SAP target field.

    Procedure Choose the "?" icon.

    Result A selection list of all the values possible for this field is displayed.

    Field-Related Rules Use This function is used to assign conversion rules referring to fields to the field assignments.

    Prerequisites Structure relationships and field relationships must have been defined.

    Field-related conversion rules do not have an effect on fields of the same type that have different names. Consequently, you have to care for data integrity (that is, for identical processing of data) yourself. In this case, it would be better to use translation rules.

    Features Initial value [Seite 49]

    When you choose this function for an SAP field, it continues to have its initial value set. This means, the number 0 is set for numeric fields and blank fields are set for character fields in the SAP system. This is the default rule in the LSMW.

    The system also assigns initial values, that is, for all those SAP fields that are not being processed in the LSMW.

    MOVE [Seite 50]

    When you choose this function, data is transferred from the legacy system field to the SAP field 1:1.

    When you do not specify a conversion rule for an SAP field that already has a source field assigned to it, the system will automatically perform a MOVE since this is the default processing type.

    For packed fields and date fields, a special type of processing is required, which will be generated when you assign the MOVE rule. However, if you branch to the editor or assign a translation rule, then you have to care for a correct conversion of data yourself.

    MOVE only if source field is not initial

  • SAP Online Help 01.11.2004

    Legacy System Migration Workbench 644 48

    When you choose this function, data is transferred from the LS field to the SAP field in a 1:1 relationship for all the LS fields that are not initial. Initial LS fields are skipped. For batch input programs using the no-data character, this will ensure that this character is not overwritten by the initial value in a MOVE.

    Fixed value [Seite 50]

    When you choose this function, a fixed value (that is, a variable named FV_ ) is assigned to the target field in the SAP system. If a fixed value does not exist for the name of the SAP target field, you can select a different fixed value from the list of existing fixed values or create a new fixed value.

    In Migration Customizing, you assign a definite value to the fixed value.

    Constant [Seite 51]

    When you choose this function, you can assign a definite value to the target field in the SAP system immediately.

    ABAP code [Seite 52]

    This function is used to branch to the ABAP editor where you can edit generated ABAP code or store your own code. Furthermore, you can check whether the source code is syntactically correct.

    Translation (reusable):

    The default is a 1:1 translation by means of the translation table. In this case, you have the option of entering and adjusting source and target values.

    Only those values of the value table are used for which an indicator is set in the OK field.

    User-defined routine [Seite 52] (reusable):

    You can write you own routine and store it in the field assignments. This routine can also be used for any other objects of the project.

    Prefix:

    You can define any prefix to precede the converted data.

    Suffix:

    You can define any suffix to be appen