57
7/27/2019 In Business Scenario http://slidepdf.com/reader/full/in-business-scenario 1/57 In Business scenario, it is required to upload the data into R/3 and process the data in the IDOC form only. The data can be migrated to R/3 SAP system using IDOC Generation Method in LSMW. The data to be uploaded can be regarding material, vendor, customer etc. IDOC is the container, which stores the data in structured format and is used to communicate between R/3 systems. IDOC structure includes Status Record for storing status information of IDOC dispatch,  Data Record for storing data into segments and its corresponding fields and Control Record has receiver and source system details etc. This document contains Step-by-Step instructions to use LSMW to generate and process IDOC from the data file available. In first part user-defined IDOC structure is created and required ALE settings are done .In the Second part, this IDOC structure is used in the LSMW IDOC. Part One: To create IDOC structure Step One: Run transaction WE31.Create Segment with name ‘ZEMP_SEG’.  Step Two: Input the fields for the segment structure, which would be required in LSMW for mapping purpose. Step Three: Now, Go to Edit -> Set Release, so that you can use this segment in the R/3 system further.

In Business Scenario

Embed Size (px)

Citation preview

Page 1: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 1/57

In Business scenario, it is required to upload the data into R/3 and process the data in the IDOC formonly. The data can be migrated to R/3 SAP system using IDOC Generation Method in LSMW. The data tobe uploaded can be regarding material, vendor, customer etc. IDOC is the container, which stores thedata in structured format and is used to communicate between R/3 systems. IDOC structureincludes Status Record for storing status information of IDOC dispatch, Data Record for storing data intosegments and its corresponding fields and Control Record has receiver and source system details etc.

This document contains Step-by-Step instructions to use LSMW to generate and process IDOC from thedata file available. In first part user-defined IDOC structure is created and required ALE settings are done.In the Second part, this IDOC structure is used in the LSMW IDOC.

Part One: To create IDOC structure

Step One:  Run transaction WE31.Create Segment with name ‘ZEMP_SEG’. 

Step Two: Input the fields for the segment structure, which would be required in LSMW for mappingpurpose.

Step Three: Now, Go to Edit -> Set Release, so that you can use this segment in the R/3 system further.

Page 2: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 2/57

 

Step Four: Run transaction ‘we30’ and enter IDOC structure name we want to create.

Here, IDOC structure name is ‘ZEMP_IDC’. 

Step Five:

(A) Add segment created earlier to this IDOC type ‘ZEMP_IDC’. 

Page 3: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 3/57

 

The maximum and minimum repetitions can be from 000000000000 to 99999999999.

Choose any number rang as per requirement.

Now, Go back to earlier page and Click Edit-> Set Release.

(B)Create new Message type in transaction ‘WE81’.  

(C) Attach message type and IDOC type with the help of transaction ‘WE82’. 

Step Six: Go to transaction ‘SALE’. Click as marked in red color. 

Page 4: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 4/57

 

Now add two logical system names for sender and receiver ex. IDC64 and IDC87.

Step Seven: Now assign clients to the logical systems created.

Select the client of your current system as per decision to make that system sender or receiver.

Page 5: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 5/57

 

 After clicking on to Goto->Details , you come to following screen. Input receiver system ‘IDC87’  to client800.

Here in our LSMW using IDOC method, no need to assign client to sender as we are doing InboundIDOC Processing (i.e. Receiver side).

Step Eight: Run transaction ‘WE21’ to create File port. Give directory name as the location of your file tobe read. Give dummy name for ‘Outbound file’

Page 6: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 6/57

field.Step Nine: Run ‘SM59’ transaction to create RFC connection. Please make sure here connection type is‘T’ for TCP/IP

.

Step Ten: Run transaction ‘WE20’ to create partner profile for partner of receiver system (IDC87) i.e.sender system (IDC64).

Page 7: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 7/57

 

Step Eleven: Create process code using ‘WE42’. 

 After saving this data, you go screen as below to attach function module to the process code. Theprocess code is the representation of the function module for inbound idoc processing.

Page 8: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 8/57

 

Step Twelve: Now you can use this process code in the inbound parameters of the partner’s profile.  

Part Two: 

Following are the steps to be performed on LSMW side.

Step One: 

Enter the project, sub-project and Object name for our scenario.

Page 9: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 9/57

 

Step Two: 

Click the first radio button ‘Maintain Object Attributes’  , execute and enter the message name and IDOCname into the screen as follows.

Step Three: 

Click radio button ‘Maintain Source Structures’  and execute to create new source structure as follows.

Step Four: 

Click radio button ‘Maintain Source Fields’ and execute to enter the fields in the source structure. Herethese fields are same as the fields in segment of the IDOC created earlier.

Page 10: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 10/57

 

Step Five: 

Click radio button ‘Maintain Structure Relations’ and execute to create relationship between source andtarget structure. Here target structure is Message type ‘ZEMP_MSG’.  

Step Six: 

Click radio button ‘Maintain Field Mapping and Conversion Rules’ and execute to create field mappingand a conversion rules between source structure and target structure.

Page 11: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 11/57

Step Seven: 

Click radio button ‘Maintain Fixed Values, Translations, User-Defined Routines’ and execute to assignfixed values to any field, to call user defined routines etc. These activities are not required in ourscenario.

Step Eight: 

Click radio button ‘Specify Files’  and execute to assign file on the local workstation to the LSMW to read.The file has contents as shown below.

 And now we specify the location of file here.

Page 12: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 12/57

 

Step Nine: 

Click radio button ‘Specify Files’  and execute to specify file to source structure as follows.

Step Ten:

Click radio button ‘Read Data’  and execute to read file from local workstation as per path specified.

Page 13: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 13/57

Step Eleven: 

Click radio button ‘Display Read Data’  and execute to display data just read.

Step Twelve: 

Click radio button ‘Convert Data’  and execute to create a file with extension ‘.conv ’. 

Step Thirteen: 

Click radio button ‘Display Converted Data’  and execute to display the converted data.

Step Fourteen: 

Page 14: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 14/57

Click radio button ‘Start IDoc Generation’  and execute to generate the IDOC from the data provided andstructure mapping done earlier in this document. For this purpose, we cam use the converted file in steptwelve. After successful generation of IDOC, below shown message is displayed.

Step Fifteen: 

Click radio button ‘Start IDoc Processing’   and execute to process the IDOC by inputting necessaryselection parameters.

Step Sixteen: 

Click radio button ‘Create IDoc Overview’  and execute to show status and details of IDOC generated.This screen is similar to ‘WE02’ or ‘WE05’ transaction. 

Page 15: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 15/57

 

Here , as you can see , the status of IDOC is OK (Green color Bubble) and hence confirms successfulprocessing of IDOC.

Step Seventeen: 

Click radio button ‘Start IDoc Follow -Up’  and execute to reprocess the IDOC if not posted or generatedproperly initially.

LSMW for Functional Consultants in

simple step-by-step waycreated by Ravi Sankar Venna on Sep 10, 2013 10:40 AM, last modified by Ravi Sankar Venna on Sep 10, 20131:53 PMVersion 1inShare 

Legacy System Migration Workbench (LSMW) is handy tool for data uploads. In most of the big projects there is a separate

development / data migration team is available. However, at times, it would be responsibility of the functional consultant to loadthe data such as vendor master, customer master and asset master etc. It would be real handy for a functional consultant to knowLSMW (at least recording method) and it would help them to successfully complete the task. Hope this document would helpmany of our functional consultants, as I am seeing number of questions around LSMW. The simple rule is: Follow this document

and practice is for number of times possible, then you will become master.

Go to Transaction Code "LSMW" and follow the following steps:

Page 16: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 16/57

 

Give some Unique name for Project, Subproject and Object. Click Create (Shift+F1). Now execute or press

CTRL+F8. 

Give the description for Project, Sub Project and Object and say OK. Now execute or press CTRL+F8.  

Page 18: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 18/57

Click Display / Change (it will make you to change). Select the Radio Button Batch Input Recording. Now click

on “Goto”  –  

Recordings Overview. Click on Create Recording (Ctrl+F1). 

Click OK

Give Required Transaction Code (In this case it is FK01)  

Create Vendor or Make changes for Entering Withholding tax details in the Vendor.  

Page 20: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 20/57

Press Enter

Click on Save Button.

Recording is saved now. Click on “Default All” Button. 

Page 21: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 21/57

 

Click

Ctrl+Y, a + will come. With this, you can drag and copy whatever you want. In case if any field is appearing twice

you

need to change the field name by double clicking on that. Otherwise, your uploading will get failed.  

Copy

the fileds to an excel file.

Remove the Blank Rows. 

Page 22: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 22/57

 

 Now the field name and descriptions are in one Column. I.e., “A”. You need to

segregate that. To do that, select Column “A” and Select in Excel “Data”  –  Text

to Column as shown in the following graph.  

 Now Select the fixed with and say “Next”. 

Page 23: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 23/57

 

Select Fixed Width and click next.

Keep columns wherever you want by clicking.

 Now say Next and then again say “Finish”. Now all fields and texts are divided into two Columns.  

Page 24: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 24/57

 

 Now copy the fields and texts as shown in the Sheet1 (Ctrl+C) 

Go

to Sheet2 

Keep

the cursor in the Sheet 2 (A1) and then  

Edit, 

Paste

Special 

Check

in Transpose as shown below and say OK. 

Page 25: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 25/57

 

 Now all your rows will become your columns as shown in the blow Screen. 

 Now

fill the required details exactly as shown below. You should note that you have

to enter „0001 for payment method instead of 0001, since if you straight enter

0001 it will become 1, therefore you must ensure whenever it is starting with

“0” should be preceded with „. 

Page 26: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 26/57

 Now

select the whole sheet2. 

Remove

all grids. 

 No colors should be there in the sheet. 

 No letter should be typed in different colors. All are in normal color only. 

Keep the columns to “LEFT” Margin. 

 Now, 

Format

=> Cells => Number => General as shown in the following screenshot.  

 Now say OK. 

 Now copy the whole Sheet2 and paste it in the Sheet3. Thendelete the header rows as shown below: 

Page 28: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 28/57

 Click on "YES" button as shown below.

 Now, Click on "NO" button as shown below.

Press F3 or Click on Back Button. 

Page 30: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 30/57

 

Click

F4 in the Recording Button, your structure will be populated. In this case it

is “VENDRECO”. 

 Now click on Save on Ctrl+S to save your recording. 

After saving your recording click Back button or press Ctrl+F3 to go back.  

 Now you will observe that few steps have been disappeared. Only few steps are left

out. This is because of the recording mode that you have been selected. Ideally

there should not be any Idoc related steps should be visible. 

 Now Step1 is being completed and the system automatically takes you to second step.

 Now press CTRL+F8 or Executed. 

Page 32: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 32/57

 

 Now Press F3 or Click back button to go back. 

 Now the second step is completed and system automatically takes you to third step. 

Click CTRL+F8 or Press Execute Button, which will take to maintain source fields.  

Click on Display / change as shown above OR press Ctrl+F1. 

 Now press on Table Maintenance as shown above by keeping your cursor on the Source

Structure (in blue color in the above screen shot). 

Page 33: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 33/57

 

Copy those Fields from Sheet1 and copy it here. (from your excel file)  

In case if your fields are came twice in recording, none of the field should be

similar. As already advised that change the field names to different field

names. Whatever, field names that you have changed in the structure should also

appear here. Meaning that in case these fields does not map with your changed

fields in your Structure, uploading will fail. 

Enter the Field Type as “C”  –  Characteristic and Length as 60. If you know the length

enter the exact length. If you do not enter the maximum length 60. You should

not enter the length less than the actual length of the field.  

Say “Save”. 

Page 35: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 35/57

 

Click CTRL+F8 or Click on Execute Button.  

Select the Structure and click on Display / change button or press Ctrl+F1  

Click on Relationship (Ctrl+F4) 

Though

it is customary step, you should go to this step. And say OK for the message

that the system has issued. “A source structure is already assigned to target

structure VENDRECO”. 

Page 36: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 36/57

 Now press Save and PressF3 or Click on back button to go back. 

It will take you to the next screen automatically.  

Press CTRL+F8 or Click on Execute Button. 

In the above screen, select the structure and then click display / change or (Ctrl+F1).  

Again Select the Structure, 

Page 37: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 37/57

 

Go select the auto filed mapping as showing above in the above screen shot. 

Say “OK” with this 50 number screen. Do not make any changes. 

Page 38: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 38/57

 

Keep on Pressing “Accept Proposal” for all the proposal as shown above. 

Your entire field mapping should appear as above. Each field should have four rows as above.  

Once it is being completed the system issues a statement that “Auto Field Mapping is completed” 

Page 40: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 40/57

 

 Nothing to do with “Maintain Field Values, Transactions, User Defined Routines” 

 Now Go to “Specify Files” Screen Manually and press “Ctrl+F8” or Execute Button. 

Select the first row and click on Display / change Button.  

Page 41: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 41/57

 

 Now Click on Add Entry “Ctrl+F2” as shown above. 

Select the “TEXT (Tab Delimited)” file that you have already created and say Open. 

Page 43: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 43/57

 

Your file has come and Enter some relevant “Name” 

Select “Tabulator” Radio Button and say OK. 

 Now Save (Ctrl+S) and press F3 or Back Button to go back. 

Page 44: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 44/57

 

 Now the system will take you to next step i.e., “Assign Files”. Press Ctrl+F8 or

 press Execute Button. 

Select Source Structure (as shown in blue colour above) and press Display / Change

Button (Ctrl+F1). 

Page 45: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 45/57

 

Click on Assignment (Ctrl+F2) 

Though it is a customary step, you need to visit this step compulsory. The system will

issue a message stating that “A file has already been assigned to source

structure “VENDOR_RECORDING”. Say Ok. 

Click on Save (Ctrl+S) and Press F3 or click on back button.  

The system will take you to next step i.e., “Read Data”. Click on Execute or Press Ctrl+F8.  

Page 46: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 46/57

 

Remove the Checks for  

Value

Fields -> 1234.56 

Date

Value -> YYYYMMDD as shown above. There should not be any check in the above

two check boxes. 

 Now

Click on Execute (F8) 

The system will tell that total 8 records are being read.  

Page 47: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 47/57

 Now Click on Back Button or press F3 TWICE, which will take you to initial screen. 

 Now the system takes you to next step “Display Read Data” 

Click on Execute or Press Ctrl+F8. 

Here you give the number of lines in your text file and say OK.  

Page 48: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 48/57

 

Click on Any one row and see whether the fields in SAP and columns in your Text File

are matching. 

Once you are satisfied that everything is matching and going fine, press F3 or Click

on Back button TWICE, which will take you to initial screen.  

Page 49: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 49/57

 

 Now you are automatically in “Convert Data” Screen. 

PressCtrl+F8 or Click on Execute Button. 

Just press F8 or Execute Button. 

Page 50: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 50/57

 

The following screen will appear. See the screen and press Back Button (F3) twice,

which will take you to initial screen.  

 Now the system will automatically takes you to “Display Converted Data”. 

Press Ctrl+F8 or Click on Execute Button.  

Page 51: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 51/57

 

Enter the number of lines From 1 to 8 in this case, to see how it is showing in

Converted Data and Say Ok. (Click on Rite Tick).  

Click on any one of the converted data line and see how the data is going. 

Page 52: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 52/57

 

If you are satisfied that everything is going fine, then Click on Go back button

(F3) TWICE, which will take you to initial screen. 

You will be automatically taken to “Create Batch Input Session”. 

Click Ctrl+F8 or press “Execute” Button. 

Page 53: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 53/57

 

Select "Keep Batch input Folder(s)?

Just Click on Execute Button (F8). 

One Batch input session will be created. The system will state that “1 batch input

folder with 8 transactions created” will be issued. Say OK. (Click Right),

which will take you to initial screen.  

Page 54: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 54/57

 

Click Ctrl+F8 or Press on Execute Button.  

 Now you are in SM35 Screen. Select the line that is being created to upload and

 press Execute (F8) button as shown above. 

Page 55: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 55/57

 

Select “Background” Radio Button. 

Check in: 

Extended log 

Expert Mode 

Dynpro Standard Size 

As shown above and the click on “Process” button. 

Page 56: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 56/57

 

See the log and click on Line, if there are any problems in your log.  

Click on back button (F3) to come out of the session FOUR TIME, which will take you

to Easy Access Screen. 

Go to Report

“S_ALR_87012086” 

 Now You are Viewing the vendor records that you are uploaded. You can also follow

the same steps for Change also. 

Page 57: In Business Scenario

7/27/2019 In Business Scenario

http://slidepdf.com/reader/full/in-business-scenario 57/57

 

Please let me know if you have any doubts.