8/10/2019 Lsmw(Step by Step)
1/12
STEP-BY-STEP GUIDE FOR USING LSMW TO UPDATE CUSTOMER MASTER
RECORDS
Note!The screenprints in this article are from
IDES Release 4.6. They may differ slightly inother versions.
LSMW to Update Customer Master Records
with Standard Object
As an alternative to using TransactionRecording! you could also use a standard SA"
o#$ect to update %ustomer &aster
Records. 'usiness (#$ect ))*) is already pre+defined inthe system ,ith standard 'atch Input
Interface "rogram R-'IDE)).
%reate an
(#$ect CUST_OB,ithin rojectas LSMW_"#MOand Subprojectas CUSTOM#RSassho,n in$i%ure &'(
$i%ure &' S&/ (#$ect ,ith Standard SA" (#$ect
Note!-or the Demo e0ample 1! I ,ill list only those steps that are different from the first
demo e0ample.
Step )* Maintain Object attributes
2ou ,ill #e updating the customer master records ,ith the help of Standard 'atch Input3
therefore! choose radio+#uttonStandard Batch+"irect ,nput as sho,n in $i%ure &). Enter
(#$ect ))*) for %ustomer &aster records and default method )))) and clic on Save.
http://sapbrainsonline.com/TOOLS/LSMW/SAP_LSMW_steps_introduction.html8/10/2019 Lsmw(Step by Step)
2/12
$i%ure &) Standard 'atch5Direct Input (#$ect Attri#utes
Step &( Maintain Source Structures
ive a name and a description to the source structure 7$i%ure -8.
$i%ure - Source Structure
Step .( Maintain Source $ie/ds
In this step! you need to list ,hat fields are present in the source structure. The easiest ,ay is
to clic on Ta#le &aintenance icon to enter -ieldname! Type and ength for each field
as sho,n in $i%ure 0.
8/10/2019 Lsmw(Step by Step)
3/12
$i%ure 0 Source fields of source Structure
9ote that your input file ,ill have four fields as ey fields and you need to update three fields
in the system.
Step 1* Maintain Structure Re/ations
Sales vie, of %ustomer &aster is stored in ta#le :9;;. Accordingly! you need toupdate structure ':9;;. needs arelation to a source structure.8
Even though you dont ,ant to update any fields in these structures! you need to create a
relationship ,ith source structures. In all! you need to create relationship for four target
structures.
%reate relationship #et,een source structures ?D)1S ,ith these target structures ,ith icon
%reate Relationship
:eep %ursor on these four target structures and clic on icon %reate Relation and structure
relations are maintained as sho,n in $i%ure &&.
8/10/2019 Lsmw(Step by Step)
4/12
$i%ure && Structure Relation
Step 2* Maintain 3ie/d mappin% and con4ersion ru/es
++ :eep your cursor on T%(DE field and clic on Insert Rule icon
8/10/2019 Lsmw(Step by Step)
5/12
$i%ure &. S&/ %onversion Rules
%hoose radio #utton %onstant 7$i%ure &.8 to enter value ?D)1 transaction code.
++ :eep your cursor on field :@99R and clic on Assign source field icon
%hoose source field %ustomer from source structure ?D)1S. 7See $i%ure &1.8
8/10/2019 Lsmw(Step by Step)
6/12
$i%ure &1 Assign Source fields
++ Similarly! choose source fields for Sales (rganiation! Distri#ution %hannel! and Division.
7See $i%ure &2.8
$i%ure &2 -ield &apping and %onversion Rules
++ Scroll do,n to structure ':9;; fields and assign source fields to three fields Sales (ffice!
Sales roup! and%ustomer roup 7$i%ure &58.
8/10/2019 Lsmw(Step by Step)
7/12
$i%ure &5 -ield &apping and %onversion Rules
Save and go #ac to main screen.
Step 5* Maintain 3i6ed 4a/ues7 trans/ations7 user8de3ined routines
2ou can also maintain re+usa#le translations and user+defined routines! ,hich can #e used
across conversion tass. In this case! that step is not re=uired.
Step 9* Speci3: 3i/es
In this step! ,e define ho, the layout of the input file is. The input file is a BTa#C delimited
,ith the first ro, as field names. It is present on my "% 7local drive8 as %?D)1.t0t.7See $i%ure )..8
8/10/2019 Lsmw(Step by Step)
8/12
$i%ure ). -ile attri#utes
%reate an E0cel file 7$i%ure )18 ,ith your data and save it as a Ta#+delimited te0t file on your
local drive 7%8 and name it ?D)1.t0t.
http://sapbrainsonline.com/TOOLS/LSMW/SAP_LSMW_steps_introduction.html8/10/2019 Lsmw(Step by Step)
9/12
$i%ure )1 Source data in E0cel file 7saved as Ta# delimited file8
Step -* ;ssi%n 3i/es
E0ecute step Assign -iles 7$i%ure )28 and the system automatically defaults the filenameto the source structure.
$i%ure )2 Assign file to Source Structure
Step 0* Read data
In this step! S&/ reads the data 7$i%ure )58 from the source file 7from your "%s localdrive8. 2ou have the option to read only selected ro,s and convert data values to Internal
format.
$i%ure )5 Read Data
Step )'* "isp/a: read data
This step 7$i%ure )98 is optional. If re=uired! you can revie, the field contents for the ro,s of
data read.
8/10/2019 Lsmw(Step by Step)
10/12
$i%ure )9 Display Read Data
Step ))* Con4ert data
This is the step that actually converts the source data 7in source format8 to a target format.'ased on the conversion rules defined! source fields are mapped to target fields.
Step )&* "isp/a: Con4erted data
/hen you convert data! S&/ automatically converts into the appropriate structure layouts!
as re=uired #y Standard program 7R-'IDE))8. 7See $i%ure &98.
$i%ure &9 %onverted data into multiple structures
9ote that if you had only one record in source file! the converted file has four records.
Earlier! creating this input file! so that the standard interface program can read it! ,as a #ig
8/10/2019 Lsmw(Step by Step)
11/12
nightmare! the primary reason #eing that it could have multiple record layouts. Even for a
simple conversion ,ith one input record! you ,ould have to create this comple0 file ,ith
many record layouts. The advantage of S&/ is that it prepares these multi+layout filesautomatically.
Step ).* Create batch input session
(nce source data is converted in internal format! you can create a 'D% session to process theupdates 7$i%ures &-and&08.
$i%ure &-%reate 'D% Session
$i%ure &0 'D% Session %@STF('G created
Step )1* Run Batch ,nput Session
2ou can e0ecute the 'D% session #y Run Batch input session. E0ecuting a #atch input
session is a standard S&H*transaction for managing 'D% sessions. (nce you have
successfully e0ecuted the #atch input session! the customermaster records are updated in the
8/10/2019 Lsmw(Step by Step)
12/12
system. 2ou can confirm this #y vie,ing the customer master records 7?D)H8.