+ All Categories

lsmw_sp

Date post: 23-Dec-2015
Category:
Upload: sanjay-parab
View: 1 times
Download: 0 times
Share this document with a friend
Description:
lsmw
Popular Tags:
34
www.jhsoftech.in
Transcript

www.jhsoftech.in

JH SOFTECH

LSMW - PROJECT

www.jhsoftech.in

OVERVIEW OF LSMW

• Legacy System Migration Workbench (LSMW) isa graphical tool provided by SAP R/3 formigrating data from a Legacy System into SAP.This tool is available through an SAP standardtransaction code ‘LSMW’.

• The actual data upload takes place from aspecific transaction depending upon therequirement such as MM01 (Create MaterialMaster).

• The data to be uploaded is entered in a Flat File(such as a text file). This text file is uploadedinto a Batch Input Structure through theinterface of LSMW.

• After populating the data into the Batch Inputstructure, the LSMW transaction generates aBatch Input Session with a name. The session isthen executed through transaction SM35 (BatchInput: Session Overview).

• When the session is executed, the SAP standardtransaction embedded in the session issimulated with the data (also embedded in thesession). The transaction is then responsible foruploading the data into the SAP Database.

• This documentation has been prepared with anexample of a simple transaction involving only afew screens. The LSMW interface can also beused to upload data through complex SAPtransactions and requires more exploring andpractice in using this tool.

www.jhsoftech.in

THE OBJECTIVE

• Before proceeding with LSMW, let us define asuitable requirement and map this requirement to anSAP standard transaction that we will use to uploadthe data. The rest of the topics in this documentare explained with respect to this requirement.

THE REQUIREMENT : -

• Create the Material Master Record for a Finished Goods Product with the following data to be inserted in the Basic View.

Field Data

o Material Number S0101230o Material Description FLUCORT H SKIN o Material Description FLUCORT H SKIN

OINTMENT 15 GM

o Material Type FERT o Base Unit of Measure EA

o Material Group F011o Division 20o Gross Weight 2

o Net Weight 1o Weight Unit KG

• SAP already provides a standard transaction tocreate Material Master. This transaction is MM01.

• Hence we will upload the above given data throughSAP Transaction MM01.

www.jhsoftech.in

DEFINING A PROJECT

• The LSMW process starts with the definition of theProject. All the activities ranging from data mapping,uploading of data from the legacy system, dataconversion and eventually data upload into SAP systemare all performed through this interface. This will beclearer as we proceed.

• Start Transaction LSMW from the SAP Main Menu. Thefollowing screen appears.

• The Project name in LSMW is hierarchical and henceallows the user to group data upload programs thatcome under similar functional areas. This makes iteasier to locate and manage the projects.www.jhsoftech.in

• Press the Create button on the application toolbar andyou will arrive at this screen.

1. Project

Enter ‘MM’

2. Subproject

Enter ‘MASTER’

3. Object

Enter ‘CREATE’

You must enter the following details on the screen: -

PROJECT

Here you can enter for example, the functional area of SAPin which the data is to be uploaded.

SUBPROJECT

Here you can enter for example, subset of the functionalarea of SAP in which the data is to be uploaded

OBJECT

Here you can enter for example, the type of transactionthat is to be performed e.g. Create, Change or DeleteTransaction.

Enter ‘CREATE’

www.jhsoftech.in

Our Objective is to Create a Material Master.

This can be classified as follows: -

Materials Management|

|���� Material Master

|

|���� Create Material

Let us define the project name as follows: -Let us define the project name as follows: -

PROJECT ���� MM (Materials Management)SUBPROJECT ���� MATERIAL (Material Master)

OBJECT ���� CREATE (Create Material Master)

Press the Enter or the Execute button to proceed to theLSMW 14-step Workbench screen.

www.jhsoftech.in

THE 14 STEP WORKBENCH SCREEN

The above Radio buttons are in the following order:

• MAINTAIN OBJECT ATTRIBUTES

• MAINTAIN SOURCE STRUCTURES

• MAINTAIN SOURCE FIELDS

• MAINTAINS STRUCTURE RELATIONS

• MAINTAIN FIELD MAPPING AND CONVERSION RULES

• MAINTAIN FIXED VALUES, TRANSLATIONS, USER-DEFINED ROUTINES

• SPECIFY FILES

• ASSIGN FILES

• READ DATA

• DISPLAY READ DATA

• CONVERT DATA

• DISPLAY CONVERTED DATA

• CREATE BATCH INPUT SESSION

• RUN BATCH INPUT SESSION www.jhsoftech.in

STEP 1: MAINTAIN OBJECT

ATTRIBUTES

• From the 14-step LSMW screen (Second Screen), if youpress the Execute button, you arrive at the screen shownbelow.

• Press the Display<->Change button if required to switchto change mode.

2. Choose ‘Batch Input Recording’

1. Switch to ‘Change’ mode.

3. Then Press the Overview button.

mode.

www.jhsoftech.in

• You will arrive at a blank screen.

• Press the Create Recording button.• Enter the name of the Recording, it’s Description and

then press Enter to start recording as shown below.

1. Press the ‘Create Recording button’

2. Enter Recording Name as ‘CREMAT’

3. Enter a Short Description and then press the Enter/Continue button. Another dialog box will appear asking for the transaction code. Enter

MM01 as the t-code and proceed.

www.jhsoftech.in

• Once the Recording begins, enter the data in thetransaction like any online transaction.

• End the transaction by pressing the Save button. Thefollowing screen appears.

Press the Default All button on this screen.

• The above screen contains the results of the recording.The function codes, screen sequences and the dataentered are all captured and displayed here.

• You can edit this recording using the available tools onthe list menu.

www.jhsoftech.in

• Press the Default All button to assign the appropriatetechnical field name to each of the screen fields.

Press the Save button when done and return to the LSMW

14-step screen

• Press the Save button to save all the changes.

• LSMW Workbench screen. Press the Save button tosave all changes while returning to the screen.

www.jhsoftech.in

STEP 2: MAINTAIN SOURCE

STRUCTURES

• When you return to the 14-step screen, the radiobutton will be on the second step.

• In LSMW, whenever a step is successfullycompleted, then on returning to the mainWorkbench screen, the transactionautomatically moves to the next step.

• In this way, the transaction guides the usertowards completion of the LSMW process.

• The radio button is now on the second step which is• The radio button is now on the second step which isMaintain Source Attributes. Press the Execute buttonagain.

• You will come to a blank screen.

• Press the Display<->Change button on the toolbarto go into edit mode if required.

www.jhsoftech.in

• Press the Create button on the Application toolbar.

• A dialog box will appear.

• Enter a suitable name for the Source Structure alongwith its description and proceed.

1. Press the Createbutton

2. Enter the source structure name as ‘SOURCETAB’. Enter the

description and press the Enter key

• Press the Save button when done and return to theLSMW Workbench screen by pressing the Back button.

www.jhsoftech.in

STEP 3: MAINTAIN SOURCE FIELDS

• Once the source structure is created, you must assignthe required fields to this structure.

• When data is uploaded from the input file, it populatesthese fields in the source structure.

• Shown below are the fields that we will assign to thesource structure.

4Material TypeMATERIALTYPE

40Material DescriptionDESCRIPTION

18Material NumberMATERIALNO

LengthShort TextField

2DivisionDIVISION

13Gross WeightGROSSWEIGHT

3Base Unit of MeasureUNIT

9Material GroupMATERIALGROUP

3Weight UnitWEIGHTUNIT

13Net WeightNETWEIGHT

40Material DescriptionDESCRIPTION

• The field lengths of these fields have been determined from the Data dictionary (Transaction SE11).

www.jhsoftech.in

• Place the cursor on ‘Maintain Source Fields’ on theLSMW workbench screen and press the Execute button.

• Press the Display<->Change button to switch to Changemode.

• Place the cursor on the Source Structure Name andpress the Create button.

1. Enter source structure field name ‘MATERIALNO’

2. Enter field 2. Enter field description ‘Material

Number’

3. Enter field length as ’18’ characters since Material Number

in SAP is 18 chars. long.

4. Enter data type as ‘C’.

• Fields in the source structure are generally of data typeC (Character data type) since type C is directlycompatible with several data types used in SAP screenfields. This prevents any loss or corruption of data dueto a type mismatch.www.jhsoftech.in

• In the same manner, insert the rest of the fields intothe source structure.

• The display appears as shown below.

Press the Save button

• Check the field lengths of all the fields and when done,press the Save button.

• Press The Back button to return to the LSMWWorkbench screen.

www.jhsoftech.in

STEP 4: MAINTAIN SOURCE

RELATIONS

• Place the cursor on ‘Maintain Source Relations’ on theLSMW workbench screen and press the Execute button.

• Press the Display<->Change button to switch toChange mode.

2. Press the Save button

1. Create a relationship

• If a relationship has not been maintained, then pressthe ‘Create Relationship’ button on the toolbar. Thesystem proposes a relationship between the SourceStructure which we have defined and the Targetstructure created through the Transaction Recording,

• Press the Save button and return to the LSMWWorkbench screen.www.jhsoftech.in

STEP 5: MAINTAIN FIELD MAPPING

AND CONVERSION RULES

• Place the cursor on ‘Maintain Source Relations’ on theLSMW workbench screen and press the Execute button.

• Press the Display<->Change button to switch to Editmode. The following screen appears.

2. Press the Create Source Field button

• Here you must map the fields of the source structurewith the fields of the destination structure.

• This mapping is important as it will direct the data inthe fields from the Source Structure (populated fromflat file) to the appropriate fields in the DestinationStructure.

1. Position cursor on target structure field

www.jhsoftech.in

• Position the cursor on a field in the destinationstructure and press the Create Source field button onthe toolbar.

• You will get a list of all the Source Structure fields.Select the appropriate field.

Constant Value button

• Position the cursor on a field in the Target structure andpress the Create Source field button on the toolbar.

• You will get a list of all the Source Structure fields.

• Place the cursor on the source field that you want toassign and press the Enter button.

• In this manner proceed with this method for all theother fields.

3. Choose the Source structure fields and

press Enter.

www.jhsoftech.in

• Some fields in the transaction may have a constantvalue throughout. These fields need not be populatedfrom the flat file.

• The LSMW Workbench allows you to assign a constantvalue to such fields using the ‘Constant’ button on thetoolbar.

• To assign a constant value, position the cursor on thetarget structure field and press the ‘Constant’ button.Enter a Value and press Enter.

• When the transaction is called, this screen field will befilled with the constant value specified.

4. Press Save when done

• When you are done, press the Save button and returnto the LSMW Workbench screen.

The Basic View checkbox in the MM transaction screen is to be checked in all cases. Hence it

has been assigned a Constantvalue of ‘X’

when done

www.jhsoftech.in

STEP 6: MAINTAIN FIXED VALUE,

TRANSLATION, INDIVDUAL ROUTINES

• Place the cursor on ‘Maintain Fixed Value, Translation,Individual Routines’ on the LSMW workbench screenand press the Execute button.

• Press the Display<->Change button to switch to Changemode. The following screen appears.

• You can specify any additional settings or specificationsin your project on this screen.

• Press the Back button to return to the Workbenchscreen.

www.jhsoftech.in

Creation of the input file

• Create a flat file (text file) on the front end PC using anySpreadsheet editor such as Microsoft Excel.

• Enter the data to be uploaded in this file in its columns.

Column Name MaterialType in this flat file matches with the field name

• You must enter the names of the columns in the Flatfiles.

• The column names and the names of the fields in thesource structure should be the same. This is the methodthat LSMW follows to populate the data from a columninto the correct field in the source structure.

• Save the file on the Front End PC file system as a TABDELIMITED TEXT FILE (.txt extension with Tabs).

matches with the field name MATERIALTYPE in the source structure

SOURCETAB.

www.jhsoftech.in

STEP 7: SPECIFY FILES

• Place the cursor on ‘Specify files’’ on the LSMWworkbench screen and press the Execute button.

• Press the Display<->Change button to switch to Changemode. The following screen is displayed.

2. Press the Create button.

1. We are uploading data from a flat file on the front end machine. So position the

cursor here.

www.jhsoftech.in

• A dialog box appears as shown below.

1. Enter the full path of the file as it exists on your front end machine. You

can press the F4 button to locate your file from the file

selection dialog.

2. We are using a tab as a delimiter for columns in the

flat file. Hence check this field

3. Check this box also and then press the Enter key.

www.jhsoftech.in

4. Press the Save button when done.

• Press the Save button when done and return to the LSMW Workbench screen.

www.jhsoftech.in

STEP 8: ASSIGN FILES

• Place the cursor on ‘Assign files’ on the LSMWworkbench screen and press the Execute button.

• Press the Display<->Change button to switch to Changemode. The following screen is displayed.

1. Assign the flat file to source structure if

required by pressing this button

2. Press the Save button

• On this screen, you can establish the link between theflat file and the source structure.

• This directs the data from the flat file specified to theassigned source structure.

• Follow the above steps is required and return to theWorkbench screen.

this button

In our project, the system has proposed the flat file name and

assigned to the source structure.

www.jhsoftech.in

STEP 9: READ DATA

• Place the cursor on ‘Read Data’ on the LSMWworkbench screen and press the Execute button.

• The following screen appears.

Enter the number of Transactions to be written into the source structure

• The transaction number field is useful especially whenyou have a large flat file with many records but want toread only one transaction and test it before batch input.

• Press the execute button to Proceed. The data from theflat file is uploaded into the source structure.

www.jhsoftech.in

• The following report appears with information about of the flat file that was read.

Only 1 transaction has been written as

specified

• Return to the LSMW Workbench screen when done

www.jhsoftech.in

STEP 10: DISPLAY READ DATA

• Place the cursor on ‘Display Read data’ on the LSMWworkbench screen and press the Execute button.

• A dialog box appears in which you can choose therecord/line numbers of the flat file which were read.To view all the records press Enter without enteringanything in the dialog box.

• An interactive report is displayed of the lines that areread from the flat file into the source structure.

Name of the Source

Structure

Line of the source structure populated from the flat file. Click here to view the data

column-wise.

• Return to the LSMW Workbench screen.

www.jhsoftech.in

STEP 11: CONVERT DATA• Place the cursor on ‘Convert Data’ on the LSMW

workbench screen and press the Execute button.

Enter the number of Transactions to

• When you press the Execute button, the data in thesource structure is populated in the target structure inthe appropriate format. The data in the targetstructure will be used to populate the screen fieldswhen the transaction is simulated.

• On Execution, a report is generated indicating theStatus of transactions that have undergone dataconversion.

• Return to the LSMW Workbench screen.

Enter the number of Transactions to be populated in the target structure

www.jhsoftech.in

STEP 12: DISPLAY CONVERTED DATA

• Place the cursor on ‘Display Converted Data’ on theLSMW workbench screen and press the Executebutton.

• The following screen is displayed.

• Return to the LSMW Workbench screen.

Name of the target Structure to be used

in batch input session

Line of the target structure populated from

the source structure. Click here to view the

data column-wise.

www.jhsoftech.in

STEP 13: CREATE BATCH INPUT

SESSION

• Place the cursor on ‘Create Batch Input Session’ onthe LSMW workbench screen and press the Executebutton.

• The following screen appears.

Enter the number of transactions to be inserted

• Press the Execute button to generate the Batch Inputsession. An information message is displayed whenthe session is created.

• Return to the LSMW Workbench screen.

transactions to be inserted into the batch input

session. You can leave this field blank to insert all

transactions

www.jhsoftech.in

STEP 14: RUN BATCH INPUT SESSION

• Place the cursor on ‘Run Batch Input Session’ on theLSMW workbench screen and press the Executebutton.

• The system starts transaction SM35 (Batch InputSession Overview).

• From here you can select the session and execute thesession in Foreground or Background mode like inBatch Data Communication (BDC) method.

www.jhsoftech.in