Complete Scenario of LSMW: Direct Method Batch Input - Record Method BAPI Method Idoc/Ale
Complete Scenario of LSMW: Direct Method Batch Input - Record Method BAPI Method Idoc/Ale
Attachments"##
Add
ed $% Ra&'amal (addipati) last edited $% Ra&'amal (addipati on Ma% *+) #,,- ./ie0 chan1e2
sho0 comment
(o to start of metadata
Description:
LSM-3he tool supports con/ersion of data of the le1ac% s%stem in a con/enient 0a%4 3he data can then $e imported into the R/5 s%stem /ia $atch input) direct input) BAPIs or
IDocs4
In this 0i!i 0e 0ill use the LSM to 6pdate Customer Master Records 0ith 3ransaction Recordin14
3he LSM or!$ench is an R/5-$ased tool that supports 7ou 0hen transferrin1 data from non-SAP s%stems .8Le1ac% S%stems82 to R/5 once or periodicall%43he tool supports
con/ersion of data of the le1ac% s%stem in a con/enient 0a%4 3he data can then $eimported into the R/5 s%stem /ia $atch input) direct input) BAPIs or IDocs4
9urthermore) the LSM or!$ench pro/ides a recordin1 function that allo0s to 1enerate a 8datami1ration o$&ect8 in an entr% or chan1e transaction4
Si1nificance of Data Mi1ration
Data mi1ration comes in the end of R/5 implementation4 At this time) the R/5 s%stem is normall% installed and application customi:in1 is finished .in the $est case24
An e;amination of R/5 implementation pro&ects $% SAP Consultin1 has sho0n that data mi1ration is a$out #,< of the total implementation e;penses4 3his portion ma% rise up to
=,< in smaller implementation pro&ects4
A si1nificant reduction of the e;penses for data mi1ration results in a correspondin1 si1nificant reduction of the total pro&ect $ud1et and the pro&ect runtime4
3he first e;periences 0ith the LSM or!$ench in R/5 implementation pro&ects are /er% promisin1"Both the e;penses and the costs of data mi1ration could $e reduced
si1nificantl%4
3he LSM Workbench 0as de/eloped on the $asis of the follo0in1 principles"
>Most of the functions should reside in R/54 ?o collection of indi/idual pro1rams on different platforms4
>3he @ualit% and consistence of the data imported into R/5 should $e more important than speed and performance of data mi1ration4
>E;istin1 !no0led1e and codin1 should $e used4
>3he de/eloped 8mappin18 and rules should $e reusa$le and thus $e used repeatedl% in pro&ects4
3he main advantages of the LSM Workbench:
- Part of R/5 and thus independent of indi/idual platforms
- A /ariet% of technical possi$ilities of data con/ersion"
- Data consistenc% due to standard import techni@ues"
- Batch input
- Direct input
- BAPIs .Business Application Pro1rammin1 Interfaces2
- IDocs .Intermediate Documents2
3he import techni@ue to $e used in an indi/idual case depends on the $usiness o$&ect4
> (eneration of the con/ersion pro1ram on the $asis of defined rules
> Clear interacti/e process 1uide
> Interface for data in spreadsheet format
> Creation of data mi1ration o$&ects on the $asis of recorded transactions
> Char1e-free for SAP customers and SAP partners
Preconditions
3he LSM or!$ench is a tool that supports data transfer from non-SAP s%stems to R/54 3he main
functions of the LSM or!$ench are"
*4 Import data .le1ac% data in spreadsheet ta$les and/or se@uential files2
#4 Con/ert data .from source format to tar1et format2
54 Import data .into the data$ase of the R/5 application2
Authorizations
Authorization level Profile Function
Disply B_LSMW_SHOW The user can display all projects and their work steps. He/she cannot switch to chane !ode.
"#ecute B_LSMW_"$"% The user can display data& and read& con'ert and i!port data.
%hane B_LSMW_%H( The user has )"#ecute) authori*ation& and can chaneand copy o+jects.
,ll B_LSMW_,LL The user can use all -unctions !ade a'aila+le +y the tool.
3he profiles listed a$o/e are not included in the profiles of the standard R/5 s%stem4 3herefore %ou ha/e to add the re@uired profiles to %our user master record4
Step-by-Step Guide for using LSMW
Pro&ect) Su$pro&ect and O$&ect
On the initial screen) %ou can create a ne0 pro&ect) correspondin1 su$pro&ects and o$&ects /ia Edit -->Create new entry4
A Project: An ID 0ith a ma;imum of *, characters to name %our data transfer pro&ect4 If %ou 0ant to transfer data from se/eral le1ac% s%stems) %ou ma% create a pro&ect e414 for
e/er% le1ac% s%stem4
A Subproject: An ID 0ith a ma;imum of *, characters that is used as further structurin1 attri$ute4
A Object: An ID 0ith a ma;imum of *, characters to name the $usiness o$&ect4
3he main screen of LSM pro/ides 0i:ard-li!e step-$%-step tas!s) as sho0n in the Figure $elo043o complete %our data con/ersion) %ou need to e;ecute these steps in
se@uence4 Once a step is e;ecuted) the cursor is automaticall% positioned to the ne;t step4
?ote that these steps ma% loo! different dependin1 upon %our Personal menu settin1s4 7ou could ma!e step num$ers /isi$le $% B?um$ers onB icon or hidden $% B?um$ers offB
icon4 7ou can e;ecute a step $% dou$le-clic!in1 on the ro04 3o11le icon BDou$leclic!CDispla%B or BDou$leclic!CEditB) ma!es the step in Bdispla%B mode or Bchan1eB mode4
Step 1: Maintain !"ect attri!utes
In this e;ample) %ou 0ill $e updatin1 the customer master records 0ith the help of recordin1 a transaction .DD,#24 Choose radio $utton Batch Input Recordin1 and clic! on the
recordin1 o/er/ie0 icon to record the R/5 transaction4 Enter the Recordin1 name as DD,#EREC) the description as Customer Master 6pdates Recordin1) and the transaction
code as DD,#4
3he s%stem calls the transaction code DD,# and prompts %ou to complete the Chan1e Customer transaction) as sho0n in 9i1ure $elo04 Enter the !e% customer information .I
entered customer num$er *,,,) sales or1ani:ation *,,,) distri$ution channel ,*) and di/ision ,,2 and choose BSalesB /ie0 0ithin BSales area dataB4 Ma!e chan1es to these three
fields .I entered) sales office *,*,) sales 1roup **,) and customer 1roup ,*2 and sa/e the transaction4
Once the transaction is completed) R/5 records the flo0 of screens and fields and sa/es the information) as sho0n in 9i1ure4
Note that the fied! are popuated with defaut "aue!# $he "aue! you entered when you recorded the tran!action are !et by defaut#
Note that if you ha"e %ore fied! in the recordin& than needed' you can re%o"e the% by cickin& ()e%o"e Screen fied( icon#
O$ser/e that the transaction-recordin1 process stores field names in a technical format4 B% pressin1 the 9* !e% on indi/idual screen fields and then pressin1 the 9F !e%) the
s%stem displa%s technical names4 7ou then can replace the technical names 0ith descripti/e names4 Dou$le-clic! on the field R9,#D-'6??R and enter the name as '6??R
and the description as Customer Account ?um$er and remo/e the default /alue4 .See 9i1ure2
Similarl%) dou$le-clic! on all other fields 0ith default /alues and ma!e appropriate chan1es4 Once %ou ha/e made chan1es) the recordin1 o/er/ie0 screen loo!s li!e 0hat %ou
see in 9i1ure
Sa/e %our chan1es4 hen %ou 1o $ac! to the initial screen) %ou 0ill see that the initial screen steps ha/e chan1ed4 Since %ou 0ant to import data /ia the BDC method) the
Direct Input and IDoc-related steps are hidden) as the% are not rele/ant4
Step #. Maintain Source Structures
(i/e a name and a description to the source structure .Figure24
Step $. Maintain Source Fie%ds
In this step) %ou need to list 0hat fields are present in the source structure4 3he easiest 0a% is to clic! on B3a$le MaintenanceB icon to enter 9ieldname) 3%pe and Len1th for each
field as sho0n in 9i1ure4
Note that your input fie wi ha"e four fied! a! key fied! and you need to update three fied! in the !y!te%#
Step &: Maintain Structure 'e%ations
E;ecute a step to BMaintain Structure RelationsB4 .See 9i1ure2 Since) there is onl% one Source and 3ar1et Structure) the relationship is defaulted automaticall%4
Step (: Maintain fie%d mapping and conversion ru%es
9ield R9,#D-D,5*, represents that %ou chose BSales /ie0B for the customer Master screen accordin1l% its /alue should $e set to D4 'eep %our cursor on field R9,#D-D,5*,
and clic! on Constant rule icon to choose the constant /alue of BDB4
If %our source file alread% has the field /alue) %ou choose rule BSource 9ieldB4
'eep cursor on field B'6??RB and clic! on BAssi1n Source fieldB icon to choose source field C6S3OMER from structure DD,#S as sho0n in 9i1ure4
Similarl%) assi1n BSource 9ieldB rules to the remainin1 fields4
Once all the fields are mapped) %ou should ha/e an o/er/ie0 screen as sho0n in 9i1ure4
Step ): Maintain fi*ed va%ues+ trans%ations+ user,defined routines
7ou can also maintain re-usa$le translations and user-defined routines) 0hich can $e used across con/ersion tas!s4 In this case) that step is not re@uired4
Step -: Specif. fi%es
In this step) 0e define ho0 the la%out of the input file is4 3he input file is a G3a$H delimited 0ith the first ro0 as field names4 It is present on m% PC .local dri/e2 as C"IDD,#4t;t4
.See 9i1ure2
Create an E;cel file .Figure 2 0ith %our data and sa/e it as a 3a$-delimited te;t file on %our local dri/e .C" 2 and name it DD,#4t;t4
Step /: Assign fi%es
E;ecute step BAssi1n 9ilesB .9i1ure2 and the s%stem automaticall% defaults the filename to the source structure4
Step 0: 'ead data
In this step) LSM reads the data .9i1ure2 from the source file .from %our PCBs local dri/e24 7ou ha/e the option to read onl% selected ro0s and con/ert data /alues to internal
format4
Step 11: Disp%a. read data
3his step .9i1ure2 is optional4 If re@uired) %ou can re/ie0 the field contents for the ro0s of data read4
Step 11: 2onvert data
3his is the step that actuall% con/erts the source data .in source format2 to a tar1et format4 Based on the con/ersion rules defined) source fields are mapped to tar1et fields4
Step 1#: Disp%a. 2onverted data
A1ain this is an optional step to /ie0 ho0 the source data is con/erted to internal SAP format
Step 1$: 2reate !atch input session
Once the source data is con/erted in an internal format) %ou can create a $atch session to process updates
Step 1&: 'un 3atch 4nput Session
1. 5ou can e*ecute the 3D2 session !. 'un 3atch input session. 6*ecuting a !atch input session is a standard SM$( transaction for managing 3D2
sessions. nce .ou have successfu%%. e*ecuted the !atch input session+ the customer master records are updated in the s.stem. 5ou can confirm this !. vie7ing
the customer master records 89D1$:. ,B,. De'elop!ent
2. Data Trans-ers / B,.0& BD%& ,L"& LSMW& D$/WB
3. LSMW
%reatin a LSMW usin Standard Batch or Direct 0nput 1ecordin
S!ip to end of metadata
Attachments"-
Added $% 3arun (am$hir) last edited $% 3arun (am$hir on Jan ,-) #,,F ./ie0 chan1e2
sho0 comment
(o to start of metadata
Data Migration , Step !. Step via Standard !atch;Direct 4nput 'ecording
><oto =,2ode >LSMW and create pro"ect+ su!pro"ect and the o!"ect.
n the initia% screen+ .ou can create a ne7 pro"ect+ corresponding su!pro"ects and o!"ects via Edit -> Create new entry.
, Pro"ect: An 4D 7ith a ma*imum of 11 characters to name .our data transfer pro"ect. 4f .ou 7ant to transfer data from severa% %egac. s.stems+ .ou ma. create
a pro"ect e.g. for ever. %egac. s.stem.
, Su!pro"ect: An 4D 7ith a ma*imum of 11 characters that is used as further structuring attri!ute.
, !"ect: An 4D 7ith a ma*imum of 11 characters to name the !usiness o!"ect.
>Step 1: Maintain !"ect attri!utes In this e;ample) %ou 0ill $e updatin1 the Material master records 0ith the help of recordin1 a transaction .MM,*24 Choose radio
$utton 3atch 4nput 'ecording and clic!
As an alternati/e to usin1 B3ransaction Recordin1B) %ou could also use a standard SAP o$&ect to update Material Master Records4 Business O$&ect B,,#,B is alread% pre-defined
in the s%stem 0ith standard Batch Input Interface Pro1ram BRMDA3I?DB4
>Steps # and $ are same as e*p%ained in !atch input recording.
https"//0i!i4sdn4sap4com/0i!i/displa%/ABAP/StepsKtoKcreateKaKsimpleKLSMKusin1K$atchKinputKrecordin1
Step &: Maintain Structure 'e%ations7ou need to update structure B(R,,4 Lo0e/er) in addition) the Standard O$&ect B,,#,B also re@uires updates to BM,,) BMML*) BMML#)
BMML5) BMML=) BMML+) BMMLM) BMMLN) BMML- structures4 .If %ou do not maintain Structure relations for mandator% entries) %ou mi1ht 1et a messa1e such as B3ar1et
structure needs a relation to a source structureB42 E/en thou1h %ou donBt 0ant to update an% fields in these structures) %ou need to create a relationship 0ith source structures4
Create relationship $et0een source structures MM,*O= 0ith these tar1et structures 0ith icon BCreate RelationshipB 4 E414 clic! on BM,, and then clic! on relation ta$4
Step (: Maintain fie%d mapping and conversion ru%es
'eep %our cursor on B3CODEB field and clic! on BInsert RuleB icon4
Choose radio $utton BConstantB to enter /alue BMM,*B transaction code4
Choose source field MA3?R) MBRSL) M3AR3) MEI?S) MA'3D and assi1n source field as sho0n $elo0 $% selectin1 the field and then clic!in1 on the source field ta$4
>Steps ) to step 11 are same as e*p%ained in !atch input recording.
https"//0i!i4sdn4sap4com/0i!i/displa%/ABAP/StepsKtoKcreateKaKsimpleKLSMKusin1K$atchKinputKrecordin1
>Step 1#: Disp%a. 2onverted data
hen %ou con/ert data) LSM automaticall% con/erts into the appropriate structure la%outs) as re@uired $% Standard pro1ram4
Step 1$: 2reate !atch input session
Once source data is con/erted in internal format) %ou can create a BDC session to process the updates4
E;ecute to load the data $% direct input method4
Done4