Load Data in SAP Using LSMW & File Created by BODS
Load Data in SAP Using LSMW & File Created by BODS
Load Data in SAP Using LSMW & File Created by BODS
What is LSMW?
The LSMW workbench is an interface that supports data transfer from non-SAP
systems (legacy systems) to SAP. LSMW offers number of techniques for migrating
data: Direct input, BAPI, IDOC & Batch input recording. The main functions of the
LSMW are:
Overview:
This document provides systematic approach for the data load in four sections:
Following job is designed to load data into ‘Tab delimited’ text file
Extracting Source table
• Go to Formats tab and right click on Flat File and select New.
• Enter the Root directory path where the file needs to be generated.
• Enter the File Name as LSMW_INPUT_FF.txt
• Select Type as Tab Delimited.
Screenshot 2: Configuring the Flat File format screen shot
BODS job will generate the flat file; it will supply data which is to be loaded in SAP using
LSMW.
Note:
No structure is defined in the flat file. As this file acts as target, it can take up the
sturture of the immediate previous transformation defined before target by the option
“Propogate Column From…”
Drag the table as source and Flat File as target. Place the Query transformation
between source and target. Double click on Query transformation. Map required fields
from the source table to query, build the required logic to process.
Screenshot 3: BODS JOB Screenshot
Transformations
Transformations
Query Transformation: Query transformation will map the required columns from
source to target file.
Flat File “LSMW_IP_FF.txt”: it performing as File Target on the designer to create file in
given directory. Click on target LSMW_IP_FF.txt to open the target file editor. Right click on the
target & select “Propogate Column From…”
Screenshot 4: Target Flat File Configuration Screen Shot
Select required columns from the list of presented. Propogated columns will be shown
on right hand side & click on “Propogate & Close”.
Screenshot 5: Propagate Column to LSMW_IP_FF.txt Screen Shot
Click on Query Transform to open the Query editor. Review the mapping done.
Validate the BODS job by clicking validate all button to check on errors if any.
Execute validate Job by right clicking on the Job and click on execute (option)
Running BODS Job
Removed image
Go to the Log tab, expand the Job, and click on the execution log to check the entries.
Screenshot 8: Log View Screenshot
Statistic view of Job Execution
After successful execution, result of the batch job is generation of flat file in directory
path. The generated flat file will be as follows:
Use Legacy System Migration Workbench (LSMW) to upload the flat file created using
BODS designer.
• Project
• Subproject
• Object
Screenshot 10: Creation of Legacy System Migration Workbench Screen Shot
Click on Radio button “Maintain objects Attributes” & Click on execute button
Click on Radio Button “Batch Input Recording” to provide New Recording name as
Provide the ‘Recording Description’ for newly created ‘Recording’ & Click on continue Button
green tik mark
Screenshot 13: Recording Description
Enter Transaction Code (TCODE) MM01 for Recording & Click on continue Button
Create Source Structure for Maintain Source Structure. Save the Structure & go back to
main menu of Process Step
Map all required fields here according to requirement. Click on save & go back to main
menu of Process Step
Screenshot 19: Source Fields for Maintain Source Fields Screen Shot
Go to Change, Click on Relationship. Click on save & go back to main menu of Process
Step
Click on Field Mapping and Rule Parent Node to expand. Go to Extras tab, select the
option “Auto-Field Mapping”
Screenshot 22: “Auto-Field Mapping Option “Screen Shot
Choose the required settings by clicking on radio buttons for Auto-Field Mapping. Click
on Continue
Screenshot 23: Auto Field Mapping Settings
Click on radio button “Maintain Fixed Values, Translations, User-Defined Routines” &
click on execute
Screenshot 26: “Maintain Fixed Values, Translations, User-Defined Routines”
Select the file from Presentation Server Directory Path, which have already created
from BODS Batch job and click radio button. Choose the File Contents “Data for One
Source Structure (table)”. Choose the Delimiter “Tabulator”. Click on Save & go back to
main menu of Process Step
Assign Files
Enter required fields and click on continue to check the Display read data
Screenshot 35: Imported Data Screen
Imported Data will display read Records from Read Data & go to back
Convert Data
Data converted for given Transaction Number as displaying in above screen shot & go
to back
Display Converted Data
Enter the required fields click on Continue to look into display data
Screenshot 41: Convert Data Display
Click on radio button “Create Batch Input Session” & click on execute
Enter Name of Batch Input Folder. Check box on Keep batch input folder & click on
execute
Click on radio button “Run Batch Input Session” & click on execute
Screenshot 45: Batch Input Session overview
Use T-CODE SE11 and check entries in table MARA to confirm the data loaded
Records are loaded into table MARA after successful run batch input session.