Your SlideShare is downloading. ×
Using idoc method in lsmw
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Using idoc method in lsmw

4,510
views

Published on


0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,510
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
405
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Step-By-Step Guide for LSMW using ALE/IDOC Method Contributed By: Sarang KahuBusiness Case:In Business scenario, it is required to upload the data into R/3 and process the data in theIDOC form only. The data can be migrated to R/3 SAP system using IDOC GenerationMethod in LSMW. The data to be uploaded can be regarding material, vendor, customeretc. IDOC is the container, which stores the data in structured format and is used tocommunicate between R/3 systems. IDOC structure includes Status Record for storingstatus information of IDOC dispatch, Data Record for storing data into segments and itscorresponding fields and Control Record has receiver and source system details etc. This document contains Step-by-Step instructions to use LSMW to generate andprocess IDOC from the data file available. In first part user-defined IDOC structure iscreated and required ALE settings are done .In the Second part, this IDOC structure is usedin the LSMW IDOCPart One: To create IDOC structureStep One: Run transaction WE31.Create Segment with name ‘ZEMP_SEG’.Step Two: Input the fields for the segment structure, which would be required in LSMWfor mapping purpose.Copyrights reserved. 2007
  • 2. Step Three: Now, Go to Edit -> Set Release, so that you can use this segment in the R/3system further.Step Four: Run transaction ‘we30’ and enter IDOC structure name we want to create.Here, IDOC structure name is ‘ZEMP_IDC’.Copyrights reserved. 2007
  • 3. Step Five:(A)Add segment created earlier to this IDOC type ‘ZEMP_IDC’.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’.Copyrights reserved. 2007
  • 4. Step Six: Go to transaction ‘SALE’. Click as marked in red color.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 orreceiver.Copyrights reserved. 2007
  • 5. After clicking on to Goto->Details , you come to following screen. Input receiver system‘IDC87’ to client 800.Here in our LSMW using IDOC method, no need to assign client to sender as we are doingInbound IDOC Processing (i.e. Receiver side).Step Eight: Run transaction ‘WE21’ to create File port. Give directory name as thelocation of your file to be read. Give dummy name for ‘Outbound file’field.Copyrights reserved. 2007
  • 6. Step Nine: Run ‘SM59’ transaction to create RFC connection. Please make sure hereconnection 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).Copyrights reserved. 2007
  • 7. Step Eleven: Create process code using ‘WE42’.After saving this data, you go screen as below to attach function module to the processcode. The process code is the representation of the function module for inbound idocprocessing.Copyrights reserved. 2007
  • 8. Step Twelve: Now you can use this process code in the inbound parameters of thepartner’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.Copyrights reserved. 2007
  • 9. Step Two:Click the first radio button ‘Maintain Object Attributes’ , execute and enter the messagename and IDOC name into the screen as follows.Step Three:Click radio button ‘Maintain Source Structures’ and execute to create new source structureas follows.Step Four:Click radio button ‘Maintain Source Fields’ and execute to enter the fields in the sourcestructure. Here these fields are same as the fields in segment of the IDOC created earlier.Copyrights reserved. 2007
  • 10. Step Five:Click radio button ‘Maintain Structure Relations’ and execute to create relationshipbetween source and target structure. Here target structure is Message type ‘ZEMP_MSG’.Step Six:Click radio button ‘Maintain Field Mapping and Conversion Rules’ and execute to createfield mapping and a conversion rules between source structure and target structure.Step Seven:Copyrights reserved. 2007
  • 11. Click radio button ‘Maintain Fixed Values, Translations, User-Defined Routines’ andexecute to assign fixed values to any field, to call user defined routines etc. These activitiesare not required in our scenario.Step Eight:Click radio button ‘Specify Files’ and execute to assign file on the local workstation to theLSMW to read. The file has contents as shown below.And now we specify the location of file here.Copyrights reserved. 2007
  • 12. 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 pathspecified.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 ’.Copyrights reserved. 2007
  • 13. Step Thirteen:Click radio button ‘Display Converted Data’ and execute to display the converted data.Step Fourteen:Click radio button ‘Start IDoc Generation’ and execute to generate the IDOC from the dataprovided and structure mapping done earlier in this document. For this purpose, we camuse the converted file in step twelve. After successful generation of IDOC, below shownmessage is displayed.Step Fifteen:Click radio button ‘Start IDoc Processing’ and execute to process the IDOC by inputtingnecessary selection parameters.Copyrights reserved. 2007
  • 14. Step Sixteen:Click radio button ‘Create IDoc Overview’ and execute to show status and details of IDOCgenerated. This screen is similar to ‘WE02’ or ‘WE05’ transaction.Here , as you can see , the status of IDOC is OK (Green color Bubble) and hence confirmssuccessful processing of IDOC.Step Seventeen:Click radio button ‘Start IDoc Follow-Up’ and execute to reprocess the IDOC if not postedor generated properly initially.Copyrights reserved. 2007
  • 15. Copyrights reserved. 2007