25
1 | Pavan Golesar +91 9730448063 © abaper.weebly.com | Pavan Golesar - [email protected] LSMW: Vendor Master Creation using Standard Batch/Direct Input of LSMW [Author-Editor-Designer = Pavan Golesar ~15.01.2016]

1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

Embed Size (px)

Citation preview

Page 1: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

1 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

LSMW: Vendor Master Creation using Standard

Batch/Direct Input of LSMW [Author-Editor-Designer = Pavan Golesar ~15.01.2016]

Page 2: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

2 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Table of Contents Initial Step:....................................................................................................................................................................... 3

Step 1: Maintain Object Attributes ................................................................................................................................... 5

Step 2: Maintain Source Structures .................................................................................................................................. 8

Step 3: Maintain Source Fields ......................................................................................................................................... 9

Step 4. “Maintain Structure Relations” ............................................................................................................................11

Step 5. “Maintain Field Mapping and Conversion Rules” ................................................................................................15

Step 6. “Maintain Fixed Values, Translations, User-Defined Routines” ............................................................................16

Step 7. “Specify File” ......................................................................................................................................................16

Step 8: Assign Files ..........................................................................................................................................................19

Step 9: Read Files ............................................................................................................................................................19

Quick troubleshoot: ................................................................................................................................................20

Step 10: Display Read Data .............................................................................................................................................21

Step 11: Convert Data .....................................................................................................................................................21

Step 12: Display Converted Data .....................................................................................................................................22

Step 13: Create Batch Input Session ................................................................................................................................22

Step 14: Run Batch Input Session ....................................................................................................................................23

Testing: ...........................................................................................................................................................................24

Summary ........................................................................................................................................................................25

Pavan
Highlight
Page 3: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

3 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Introduction: Legacy System Migration Workbench or LSMW is an SAP System tool that supports when you are copying data from non-SAP (LEGACY) systems. LSMW can be used to easily load / change master data or transactions in SAP without any programming at all. It can also be used in a production system to make changes to existing data. Very limited authorization checks are available on the transaction, so the use of it must be very well controlled.

Why is it needed: To mention one, it can be used to upload data at cutover, such as: open orders, contracts, materials, vendors, stock on hand. In simple terms, we need carry out migration activity so as to move from legacy system to SAP.

Initial Step:

Go to transaction code LSMW.

Click on new

Pavan
Rectangle
Page 4: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

4 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Enter details as below:

Hit enter or press Enter as below for sub project details

Hit enter or press Enter as below for object name details & continue.

Once done, it should be looking something like this (below):

Page 5: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

5 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Step 1: Maintain Object Attributes

-> Click Execute

Pavan
Oval
Pavan
Oval
Page 6: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

6 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

In change mode select “Standard Batch/Direct Input”.

Press F4 key to get value help on Object field:

Press F4 key to get value help on Method field:

Pavan
Oval
Pavan
Rectangle
Pavan
Rectangle
Pavan
Oval
Page 7: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

7 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Select Save and press F3 or back

Notice that system automatically select next step,

In our case it is step two,

Execute

Pavan
Rectangle
Page 8: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

8 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Step 2: Maintain Source Structures

-> Click Execute to get below screen

Create new source structure:

Save

Pavan
Oval
Pavan
Oval
Pavan
Rectangle
Page 9: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

9 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Step 3: Maintain Source Fields

-> Click Execute to get below screen

Execute

Select the structure (Place cursor on structure name) and select

NOTE: In this tutorial, I’m only taking fields (mandatory field’s obvio), In real time such minimum fields may not suffice

thus you may need to get the technical details of fields.

Pavan
Rectangle
Pavan
Oval
Pavan
Line
Page 10: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

10 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Click Save .

Back & Save again here.

Tip: These fields in above image will be useful in making our flat file which will be

holding the data to be uploaded to our SAP System.

Page 11: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

11 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Step 4. “Maintain Structure Relations”

- > Execute

Page 12: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

12 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Tip: To maintain structure relations click on BGR00 and ‘click relationship’ (ctrl + F4) as shown in above screenshot it will assigned to structure. Repeat this for all required relations in that screen.

So, Select by placing cursor on respective structures.

Imp Tip: Well this might be confusing for few guys so let me put it straight, if you ever been to tcode XK01 (in below image), You probably have to enter Account group, Purchase Org, Company code… These fields are referred in structure BLF00. (DOUBLE CLICK IT TO OPEN)

Pavan
Highlight
Pavan
Rectangle
Pavan
Typewriter
Very.Imp step
Pavan
Arrow
Pavan
Highlight
Page 13: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

13 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Example: If you want to don’t know reconciliation a/c structure or table (like me) then simply goto xk01/02/03 tcode and press F1 on that particular field. You’ll get the structure there.

Here, I went to XK02 tcode and press F1 on recon a/c and under technical information (button) there it is LFB1…

Page 14: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

14 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Okay, back to our main topic. Once relationships are done Screen looks (In my case) like below:

Pavan
Rectangle
Page 15: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

15 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Don’t forget to Save

Step 5. “Maintain Field Mapping and Conversion Rules”

- > Execute this step

Keep your cursor on ‘TCODE’ field and click on ‘Insert Rule’ icon

Choose radio button ‘Constant’ (below image).

Enter value ‘XK01’ transaction code.

Pavan
Oval
Pavan
Oval
Pavan
Oval
Page 16: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

16 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Now, Keep your cursor on field ‘BUKRS’ and click on ‘Assign source field’ icon ,

Similarly, Carryout this operation for our rest of the fields (Purch. Org, Comp code…etc)

Step 6. “Maintain Fixed Values, Translations, User-Defined Routines”

You can also maintain re-usable translation & user-defined routines, which can be used across conversion tasks. In this case, that step is not required.

Step 7. “Specify File”

- > Execute We define how the layout of the input file is.

Pavan
Oval
Pavan
Oval
Pavan
Arrow
Pavan
Typewriter
Scroll below
Pavan
Line
Page 17: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

17 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Note: Before going further, create an Excel file & save it in Tab-delimited format on your local drive. My .txt file looks like this.

Keep cursor on Legacy Data - On the PC (Frontend) & click create button. Browse for your flat file on your pc as here we specify files take file from legacy data (on the pc front end).

Pavan
Callout
You may see the attachment of this Pdf to get flat file (.txt file)
Pavan
Rectangle
Pavan
Oval
Page 18: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

18 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Hit Enter (Click continue.)

Hit Save and go back.

Pavan
Rectangle
Pavan
Rectangle
Pavan
Oval
Page 19: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

19 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Step 8: Assign Files

- > Execute

System automatically defaults the file name to the source structure on execution of this step.

Step 9: Read Files

- > Execute

Pavan
Oval
Page 20: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

20 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Quick troubleshoot:

If you face Error:

Error when uploading file 'C:\Documents and Settings\Desktop\csk' (Return Code = 13).

Message no. /SAPDMC/LSMW_OBJ_070010.

Solution:

Check file is proper tab-delimited. If still error exits then delete file perform step 7 again (imp). If everything goes right, below screen appears (with Not Written = 0)

Pavan
Oval
Pavan
Highlight
Pavan
Oval
Pavan
Oval
Page 21: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

21 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Step 10: Display Read Data

- > Execute Optional step: Used to verify field contents for the row of data read.

Step 11: Convert Data

- > Execute

Pavan
Oval
Pavan
Oval
Pavan
Oval
Page 22: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

22 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Step 12: Display Converted Data

- > Execute

Step 13: Create Batch Input Session

Once the source data is converted to internal format, you may create batch input session.

Page 23: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

23 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Once you execute above step, to verify goto tcode SM35.

Yeaa ! Look Batch input session with session name ‘XK01’ is created.

Step 14: Run Batch Input Session

Successfully I had completed all these steps.

Pavan
Oval
Pavan
Oval
Pavan
Arrow
Pavan
Line
Page 24: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

24 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Testing:

Goto SE11 tcode, Enter table LFA1 - CONTENTS. (REMEEMBER: We had entered search term as ZAPPER – ha haa that’s what I like)

Pavan
Highlight
Pavan
Oval
Pavan
Arrow
Pavan
Arrow
Pavan
Arrow
Pavan
Arrow
Pavan
Arrow
Pavan
Typewriter
All 5 records from our Flat file
Page 25: 1 | Pavan Golesar +91 9730448063 LSMW: Vendor Master ...abaper.weebly.com/uploads/4/0/8/5/40852027/lsmw_-_pavan_golesar... · Vendor Master Creation using Standard Batch/Direct Input

25 | Pavan Golesar +91 9730448063

© abaper.weebly.com | Pavan Golesar - [email protected]

Summary: In this way, We can upload (vendor master) data using LSMW Direct input method.

Below links are for more info: