Post on 19-Mar-2017
transcript
1 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
LSMW: Vendor Master Creation using Standard
Batch/Direct Input of LSMW [Author-Editor-Designer = Pavan Golesar ~15.01.2016]
2 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
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
3 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
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
4 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
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):
5 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
Step 1: Maintain Object Attributes
-> Click Execute
6 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
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:
7 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
Select Save and press F3 or back
Notice that system automatically select next step,
In our case it is step two,
Execute
8 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
Step 2: Maintain Source Structures
-> Click Execute to get below screen
Create new source structure:
Save
9 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
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.
10 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
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.
11 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
Step 4. “Maintain Structure Relations”
- > Execute
12 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
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)
13 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
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…
14 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
Okay, back to our main topic. Once relationships are done Screen looks (In my case) like below:
15 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
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.
16 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
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.
17 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
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).
18 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
Hit Enter (Click continue.)
Hit Save and go back.
19 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
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
20 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
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)
21 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
Step 10: Display Read Data
- > Execute Optional step: Used to verify field contents for the row of data read.
Step 11: Convert Data
- > Execute
22 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
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.
23 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
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.
24 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
Testing:
Goto SE11 tcode, Enter table LFA1 - CONTENTS. (REMEEMBER: We had entered search term as ZAPPER – ha haa that’s what I like)
25 | Pavan Golesar
© abaper.weebly.com | Pavan Golesar - sapparamount@gmail.com
Summary: In this way, We can upload (vendor master) data using LSMW Direct input method.
Below links are for more info: