BC420_46C - 008Legacy System Migration Workbench (LSMW)

Embed Size (px)

Citation preview

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    1/70

    0

    SAP AG 1999

    LSMW Basics

    Defining Source and Target Structures

    Creating Field Mapping and Rules

    Reading Files

    Transferring Data to the R/3 Syste

    Contents!

    Legacy Syste Migration Wor"#ench $LSMW%

    SAP AG BC420 8-1

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    2/70

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    3/70

    0&3

    SAP AG 1999

    Course ,.er.ie+ Diagra

    Daten#ernahe

    D Wor"#ench

    LSM Wor"#ench

    1rinciples of Standard

    Data Tansfer

    Direct2nput

    B)12

    T)R

    ecorder

    Course ,.er.ie+

    Batch

    2nput

    CallTransaction

    3

    D2

    Basics4

    5

    6

    706

    77

    78

    73

    7'

    77

    7'

    7

    '

    99

    77

    8

    70

    SAP AG BC420 8-3

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    4/70

    0&8

    SAP AG 1999

    BasicsBasics

    Structure DefinitionsStructure Definitions

    Field Mapping and RulesField Mapping and Rules

    Reading and Transferring Data to R/3Reading and Transferring Data to R/3

    LSMW Basics

    SAP AG BC420 8-4

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    5/70

    0&5

    SAP AG 1999

    CT

    B)12D2

    2Doc

    ).aila#le as an add:on

    ,ne:tie and periodic data transfer fro e;ternal syste to

    R/3

    LSMW uses standard technologies

    LSMW! Characteristics

    B2

    The Legacy Systems Migration Workbench (LSMW) is an R/3-based tool that supports one-time and

    periodic transer o data rom non-S!" systems (legacy systems) to R/3#

    This easy-to-use tool supports the con$ersion o data rom the non-S!" system that can then be

    imported into the R/3 System using batch input% call transaction% direct input% &!"'s% or 'ocs#

    'n addition% the LSMW pro$ides a recording unction% hich you can use to generate a data

    migration ob*ect rom a create or change transaction#

    SAP AG BC420 8-5

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    6/70

    0&+ characters to identiy your data transer pro*ect# ' you ant to transer

    data rom se$eral eternal systems% you can create a pro*ect or each eternal system#

    Subproject:Maimum o >+ characters? used as an additional subdi$ision#

    Object: Maimum o >+ characters? used to identiy a business data ob*ect#

    SAP AG BC420 8-11

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    12/70

    0&7'

    SAP AG 1999

    1ro-ect ,.er.ie+

    )ll ,#-ects

    ,.er.ie+ of o#-ects contained in syste

    My ,#-ects

    ,.er.ie+ of o#-ects the user created

    )ll ,#-ects in a 1ro-ect

    ,.er.ie+ of o#-ects in the current pro-ect

    The olloing unctions are a$ailable on the initial screen o the LSMW

    All objects:

    reates an o$er$ie o all a$ailable pro*ects#

    My objects:

    isplays an o$er$ie o all ob*ects you created#

    All objects in a project:

    isplays a tree structure ith all ob*ects contained in the selected pro*ect#

    Project documentation:' documentation as created% this displays all the documentation or the indi$idual dialog boes and

    steps# @ou can print and send the documentation% or also sa$e it $arious ile ormats#

    SAP AG BC420 8-12

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    13/70

    0&73

    SAP AG 1999

    Define o#-ect attri#utes

    Define source structures and source fields

    Define structure relationships

    Define field apping and con.ersion rules

    Read data

    Con.ert data

    2port data

    The Main Steps

    ! total o 87 dierent ork steps are pro$ided# The ork steps displayed are dependent on the

    selected object#

    @ou can create a customiAed personal menuo the ork steps# 'n the personal menu you can select a

    subset o the 87 ork steps you ant to display#

    SAP AG BC420 8-13

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    14/70

    0&78

    SAP AG 1999

    SAPSAPEasyEasyAccessAccess

    *S+ ,or(ech it ...

    ;tras... ti!ities Sste

    ...

    1ersonal Men

    LSMW : Su#steps

    +aitai so'rce attri('tes

    Persoa! +e'

    +aitai so'rce str'ct'res+aitai so'rce ie!s+aitai str'ct're re!atioshipsie va!'es6 aitai coversios a o" ro'tiesSpeci i!esGeerate iport pro7raisp!a iport pro7raport ataisp!a iporte ataGeerate coversio pro7raisp!a coversio pro7raCovert ataisp!a coverte ata

    . . .

    The aaila!le LS"#

    su!steps can !e

    actiated ia the

    Personal "enu

    'n the LSMW basic settings only the main substeps are displayed# @ou can add to these by selecting

    your re;uired substeps in the B"ersonal MenuB (e#g#Display conversion program)#

    SAP AG BC420 8-14

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    15/70

    0&75

    SAP AG 1999

    Attri('tes

    )(&ect)"erata traser

    BC420 ap!e;)B;

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    16/70

    0&7#

    This naming procedure keeps the number o con$ersion rules lo and ensures consistency in the data

    con$ersion#

    SAP AG BC420 8-32

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    33/70

    0&33

    SAP AG 1999

    Se=uence

    7& )ssignent of source field to target field

    '& Definition of con.ersion rule

    7&

    '&

    Source Field )ssignent

    !ssigning source ields

    To assign a source ield% place the cursor on a target ield in the tree structure and choose Assign

    source !ield# ! list o a$ailable source ields appears% rom hich you can select the desired source

    ield by double-clicking it#

    eleting source ield assignments

    To unassign a source ield% place the cursor on a target ield in the tree structure and choose #emove

    source !ield# ' only one source ield is assigned% this assignment is remo$ed# ' more than one source

    ield is assigned% a list o all assigned source ields appears? to select the desired ield% double-click

    it#

    !ter you ha$e assigned the source ields% you deine the con$ersion rules# The deault is CM=J1B#

    Jarious standard techni;ues are a$ailable by choosing the rele$ant pushbutton#

    SAP AG BC420 8-33

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    34/70

    0&38

    SAP AG 1999

    )ttri#ute

    Standard Case

    Standard

    Transfer

    1rogra

    &&&&&&&& /

    &&&&&&&&

    ?,D)T) 2ndicator

    S1)C

    B)12

    Rule! 2nitial

    'n this step% code assigned to the target ield is deleted# 'n addition% source ields assigned to the

    target ield are deleted# The target ield then contains the olloing $alue

    ,or standard &'% T% and ' .=!T! character (set in session headers such as &GR++ or &'+++)

    ,or batch input recording .=!T! character C/B

    ,or &!"'s and 'ocs haracter ields 1mpty ield ? .umeric ields C++###+B)

    SAP AG BC420 8-34

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    35/70

    0&35

    SAP AG 1999

    )ttri#ute

    Target field filled +ith a constant .alue

    0007

    Copany code 0007

    Rule! Constants

    The target ield is assigned a constant#

    SAP AG BC420 8-35

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    36/70

    0&3+#>66:

    (@@@@MM)

    !s o LSMW $ersion >#9 the date ormat can be determined or the data con$ersion#

    "mount field:

    ,or batch input and direct input The amount $alue is ormatted according to the settings in the

    user master#

    ,or &!"'s and 'ocs The amount $alue is let in the internal calculation ormat#

    SAP AG BC420 8-3#

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    37/70

    0&34

    SAP AG 1999

    )ttri#ute

    Target field assigned a G.aria#leH

    B(IRS Copany code $doain%

    ie va!'e

    Attri('tes

    Fi;ed alue

    ?ae

    Description

    )ttri#utes

    Length

    )B)1 type

    Lo+ercase

    alue

    0007

    B(IRS

    0007

    Rule! Fi;ed alue

    *i%ed value Suggested names or the ied $alue are pro$ided? these suggestions are domains% data

    elements% or ield names#

    hoose a suggestion or enter a ne name#

    @ou can speciy the ield description% length% type% $alue% and hether uppercase or loercase must

    be used#

    SAP AG BC420 8-3$

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    38/70

    0&39

    SAP AG 1999

    )ttri#ute

    Select source field

    )ssign translation

    BSC@L 1osting "ey $doain%

    0008 80

    ?WBS 1osting "ey&&& $data eleent%

    Rule! Creating Translation

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    39/70

    0&36

    SAP AG 1999

    Translation attri#utes

    Source field / target field

    Control

    7!7 translation .alues

    2nter.al translation .alues

    BSC@L

    erfor! ls!7_tr'sl'teusi& 8*SCH38

    POSIPOSTIN+_-E%c'&i& **SE+NE/*S.

    Dou#le:clic"

    Rule! Changing Translation

    To create a translation% you must deine the source and target ields# Then% you must speciy ho the

    con$ersion is controlled#

    @ou can choose >> translation or inter$al translation#

    SAP AG BC420 8-39

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    40/70

    0&80

    SAP AG 1999

    Translation attri#ute

    Control

    BSC@L

    Dariat irst SecoA!terative A!terative

    1:1 tras!atioterva! tras!atioitia! va!'e

    Costat+)D@ser-eie ro'tie?o actio

    Dariats

    )ther

    A 1:1 tras!atio va!'es a'toatica!!

    Translation Control ,.er.ie+

    @ou use this to set the type o translation# @ou can speciy hich translation table the system should

    search irst or a $alue% and hich alternati$e should be selected i no matching entry is ound#

    SAP AG BC420 8-40

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    41/70

    0&87

    SAP AG 1999

    7!7 alues of con.ersion "ey

    ,ld .alue

    ?e+ .alueBSC@L

    ,ld alue

    00080005

    ?e+ alue

    8050

    ,I

    7!7 alues of Con.ersion Iey

    Iere you speciy hich $alue (old $alue) in the non-S!" system is to be replaced ith the ne

    $alue#

    ote:=nly those $alues are con$erted or hich the =K lag is set#

    SAP AG BC420 8-41

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    42/70

    0&8'

    SAP AG 1999

    Con.ersion .alue inter.al

    ,ld .alues fro &&&& to

    ?e+ .alue BSC@L

    ,ld .alues fro

    00070005

    ,ld .alues to

    00080009

    ,I?e+ .alue

    8050

    Con.ersion alue 2nter.al

    on$ersion $alue inter$al @ou use this to set hat the $alues in the non-S!" system (old $alues) are

    to be con$erted to in the S!" System (ne $alues)# Speciy the $alue table ith the $alue inter$als

    to use or $alue con$ersion# @ou can upload the $alues rom a " ile (tet separated by tabs) to the

    table# ,5Possible entrieshelp is a$ailable in the+ew valuecolumn#

    Important to note:uring the con$ersion% the system only takes those $alues into account here

    the =K indicator is set#

    SAP AG BC420 8-42

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    43/70

    0&83

    SAP AG 1999

    Rule! 1refi;

    CONCATENATE8108 osi'cout

    INTO ""se&e7:o.

    701refi; 7708 70770870 J

    70 J &&&

    00Suffi; 7708 770800J 00

    &&& J 00

    CONCATENATE osi'ccout 8008 INTO ""se&e7:o.

    )ttri#ute String operation

    @ou can speciy a prei o your choice hich ill be placed in ront o the contents o the source

    ield#

    @ou can speciy a sui o your choice hich ill be placed at the end o the contents o the source

    ield#

    SAP AG BC420 8-43

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    44/70

    0&88

    SAP AG 1999

    )ttri#ute

    String operation! Co#ine source fields

    )K'377 1lant )K'377J &&&&&

    &&& J &&&

    1lant J

    2portant! )ll source fields in.ol.ed in the concatenation ust #e pre.iously

    assigned to the sae target field&

    Rule! Concatenation

    oncatenation @ou can combine to or more source ields#

    .ote !ll source ields in$ol$ed in the concatenation must pre$iously be assigned to the same R/3

    target ield beore you can combine those source ields#

    SAP AG BC420 8-44

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    45/70

    0&85

    SAP AG 1999

    *"se&s&t;t < osite;t.SHIFT ""se&s&t;t 3EFT DE3ETIN+ 3EADIN+ SPACE.

    ;aple!

    )ttri#ute String operation! Te;t transferred left:-ustified

    2nforation

    2nforation

    Rule! Transfer Left:ustified

    Transer let-*ustiied When this is set% the ield contents are transerred let-*ustiied#

    SAP AG BC420 8-45

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    46/70

    0&8'lueSET1 Record idic'tor HREF_NO Referece u!"er *C1000001DOC_DATE Doc. d'te @00?1999T%PE T%PE 0?C4RR_-E% docu!et currec5 D$

    Display iported data

    By record

    By field

    'n this step you can display a part o or all o the imported data in a table# &y clicking on a table ro

    (or selecting*ield contents) you can display all the inormation in this ro#

    With the unction Change display you can sitch beteen one line and multiple line display#

    The colors o the indi$idual hierarchy le$els can be displayed inDisplay color legend#

    SAP AG BC420 8-5$

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    58/70

    0&59

    SAP AG 1999

    ,or Steps

    Eenerated

    con.ersion

    progra

    Tr's'ctios re'd Records re'd #0Tr's'ctios 7ritte Records 7ritte #1

    /ote0Amount fields$)MT7&&&% for standardtransfer progras are foratted

    according to user:defined settings&

    Date fieldsare ?,T foratted in the

    LSMW .ersion 7&4 they are al+ays

    displayed in forat AAAAMMDD

    Field assignent

    Con.erting Data

    Con.ert data

    This ork step is similar to the ork step CRead dataB#

    The imported data is con$erted into the target ile the using the deined rules#

    ' you do not select any data% conirm by eecuting the process# =therise select the data in Crom##

    Qto###F in the CTransaction numberB# @ou can also select se$eral transaction numbers#

    ' you ha$e lagged one or more source ields as selection parameters hen deining the source

    ields% these ields are also oered to you as selection parameters#

    ' you use a ildcard in the ile name o the input iles and you ha$e deined at least one $alue or

    the ildcard% you ill also recei$e one selection parameter or the ildcard# ' you do not enter

    anything% all deined ildcard $alues are processed#

    .ote The system irst checks hether the data con$ersion program is still up-to-date# ' it is not% it is

    automatically regenerated#

    SAP AG BC420 8-58

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    59/70

    0&56

    SAP AG 1999

    ,or Steps

    1 *+R00 0-NA1_A 100RO*ERTS # **-PF 1F*01 @00?1999SA0001 DE$@ **SE+ #**SE+ =0 = **SE+ #**SE+ 0 **SE+ #**SE+ 0 **-PF 1F*01 @00?1999SA0001 4SD

    ? **SE+ #**SE+ =0 B **SE+ #**SE+ 0 9 **SE+ #**SE+ 0

    Displaying the con.erted data

    By record

    By field

    Field Field te;t Field >'lueST%PE Record t5e 1TCODE Tr's'ctio code F*01*3DAT D'te @00?1999*3ART Docu!et t5e SA*4-RS Co!'5 code 0001*4DAT D'te /AERS Currec5 :e5 DE$

    Displaying Con.erted Data

    'n this step% you can display part or all o the con$erted data in a table# To display inormation about

    a line% double-click it% or choose*ield contents#

    To choose beteen a one-line or multiple-line $ie% choose Change display#

    To display inormation about the colors o the hierarchy le$els% chooseDisplay color legend#

    SAP AG BC420 8-59

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    60/70

    0&

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    61/70

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    62/70

    0&

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    63/70

    0&ation Le.el

    isp!a

    ec'te

    Cha7e

    Aiistrate

    )uthori>ations

    The olloing authoriAation le$els can be assigned or the LSMW application

    isplay

    The user can display all pro*ects ith their ork steps#

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    64/70

    0&

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    65/70

    #$ercises

    %nit: LSMW

    &opic: Con'ersion and &ransfer of Documents %sing

    the Legac( S(stem Migration Wor!bench

    reating a mapping plan or ,' documents

    eining translation rules in LSMW or the documents#

    Mapping o the document data using the LSMW#

    on$ersion o documents using the all Transaction

    Legacy ,' documents should be imported into R/3 $ia the LSMWusing the all Transaction#

    LSMW project: )C*+,-..

    Subproject: DOC%-..

    Object: C&-..

    /ile 0ith documents in legac( format:

    )C*+,1DOC1213#"D1POS4L#5

    The ,' documents are a$ailable in the ile &58+=>I1!"=S#L1G on theapplication ser$er# This ile contains i$e documents ith three items each# This data should betransported into the corresponding S!" record layout using the LSMW# Transer this ile ith

    program R,&'&L++ using the call transaction#

    SAP AG BC420 8-#5

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    66/70

    Part 2 of the &as!

    > "erorm the olloing test reate an ,' document online using transaction ,&+>#

    Docuent header

    ocument date todayocument type S!ompany code +++>urrency reate the subpro*ect =

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    67/70

    3 reate a Mapping Planor the transport o the legacy documents#With the course material you ill ind a printout o an etract o the 1cel sheet#

    3-> The data rom the legacy system is displayed in the olloing table

    ie! ae ie!!e7th

    ie! va!'e tpe escriptio

    A-A

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    68/70

    Part + of the &as!

    5 ,ile &58+=>I1!"=S#L1G ith the document data rom the eternal systemis located on the application ser$er in the 'RI=M1 directory# Start the ile monitor(T! !L>>) in a ne session and display the ile#Io many ,' documents are there in this ileD

    Sitch to the LSMW session to create the source structures o the source ile#

    arry out the ork step Maintain source structuresThe source ile consists o 8 structuresThe document header structure and the document item structure# reate the structureI1! and the structure "=S' one le$el belo#

    E arry out the ork step Maintain source fieldsreate the source ields or the corresponding structures

    (the number in the brackets indicates the ield length)E-> The source ields or the document headerare

    S1T>(>) Set indicator ' or header I (I or header)%

    R1,(6) Reerence number in the legacy system%

    !T1(>+) ocument date note ield type M@%

    T@"1(5) ocument type%

    ) Set indicator or items " (" or item - means position)

    K1@(++5) "osting key%

    !=+) !ccount number%

    !M=E) !mount in document currency% note: field t(pe "M&2

    T10T(7) escription o the document item#

    7 arry out the ork stepMaintain structure relationshipsStructure relationships&GR++ and &&K", must be assigned to the document header# !nd &&S1G must beassigned to the document item#

    SAP AG BC420 8-#8

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    69/70

    9 arry out the ork step Maintain field mapping and con'ersion rules

    9-> "erorm the mapping according to your mapping plan#

    The olloing ields need to be assigned

    ocument date Mo$e

    Speciy a date ormat appropriate to your user settings#

    .ote This is possible as o LSMW $ersion >#9# 'n $ersions beore >#9 the date

    is alays con$erted into the internal !&!" ormat#

    ocument type on$ersion

    ompany code onstant ( +++> )

    urrency key on$ersion ( e#g# - >++#!lso maintain the ile name under-egacy dataUon the R/3 ser$er (application ser$er)V- 'n*ile contentschooseData !or several source structures

    .seg& *ile,&

    - Select code page >>++#

    6 arry out the ork step "ssign filesocument - ile &58+=>I1!"=S#L1G'tems - ile &58+=>I1!"=S#L1G

    >+ arry out the ork step Import data#isplay the read data as a structure and as a ield display# heck the data#

    >> arry out the ork step Displa( imported data#

    isplay the imported data as structure and as ield display# heck the data#

    >8 arry out the ork step Con'ert data4

    >3 arry out the ork step Displa( con'erted data#

    isplay the con$erted data as a structure and as a ield display# heck the data#

    SAP AG BC420 8-#9

  • 8/11/2019 BC420_46C - 008Legacy System Migration Workbench (LSMW)

    70/70

    >5 arry out the ork step Start direct input program# Select program R,&'&L++#5-> heck the ile irst ' no cancellation situation is determined% the actualtranser can be eecuted#

    >5-8 Sitch o the unction Chec/ !ile only Start the data transer# The data istranserred ith the call transaction#

    Write don the document numbers o the irst i$e documents#

    >E @ou can look at the documents using transaction ,&+3#

    Optional e%ercise:The ne ile )C*+,1DOC12"13#"D1POS4L#5ith documentsin legacy ormat has been created# &ut in this ile there is an error in the data record#

    "erorm steps 6 to >3 again ith this ile# When you transer the data% you ill recei$ean error message# This aulty data record is transerred into a batch input session#"rocess this session in the display all mode and correct the errors#