Professional Documents
Culture Documents
Idoc PDF
Idoc PDF
Applies to:
SAP Exchange Infrastructure (PI)
Summary
SENDING A CUSTOM IDOC DEVELOPED IN SENDER R/3 SYSTEM TO RECEIVER SYSTEM
VIA INTEGRATION SERVER.
Author(s): Mandeep Virk
Company: ArchitectSAP Solutions
Created on: 24 December 2007
Author Bio
Hi I am Mandeep Singh Virk working with ArchitectSAP Solutions as a Process
Integration Consultant.
Hi Folks,
Although IDOC to File is a common yet pivotal scenario. It is very challenging to trigger an IDOC to
integration server , rest part is up to integration server. So here we are mainly concerned on the
part from R/3 to integration server. We will create a custom IDOC and trigger it to receiver system
via integration server.
So Here we go..
© 2007 SAP AG 1
IDOC to File – Beginner’s Guide
Table of Contents
© 2007 SAP AG 2
IDOC to File – Beginner’s Guide
Fig No. 1
Go to TC: WE30
• To Create IDOC Type: Basic.
• Enter the Object Name, Select Basic Type and click Create icon
Fig No. 2
• Select the IDOC Name and click Create icon. The system prompt us to enter the segment
Type and its attributes. Choose the appropriate values and press enter.
• Save it and go back
• Go to Edit Set Release
© 2007 SAP AG 3
IDOC to File – Beginner’s Guide
Fig No. 3
Go to TC: WE81
• To Create Message Type
• Change the details from Display mode to Change mode.
• System will give the message “Caution: The Table is cross-client “. Press Enter.
• Click New Entries to create new Message Type
• Fill Details. Save it and Go Back
Fig No. 4
Go to TC: WE82
• To Assign Message Type to IDOC Type
Fig No. 5
© 2007 SAP AG 4
IDOC to File – Beginner’s Guide
Go to TC: WE60
• To See IDOC Documentation. Here you can see Structure of your Basic Type IDOC in text
format.
Fig No. 6
Go to TC: SM59
• To Configure RFC Connection for Receiver System
Fig No. 7
© 2007 SAP AG 5
IDOC to File – Beginner’s Guide
Fig No. 8
• Provide all Technical settings for your Receiver System. System Name for your XI Server
as Target Host and its System No .
• Move to Logon & Security Tab to provide Logon Details like Language, Client, User,
Password.
Go to TC: WE21
• To Configure Port in IDOC Processing for Receiver System .
• Choose tRFC as a Port for IDOC Processing and Choose Create New.
Fig No. 9
© 2007 SAP AG 6
IDOC to File – Beginner’s Guide
• In a Pop up system will prompt you to choose options from Generate port name or Define
your own port name. You can define port name of your choice.
Fig No. 10
• Give a short description to your port and assign RFC Destination to this port which you
have created in previous steps.
Fig No. 11
Go to TC: BD54
• To Configure a Logical System as Receiver System .
• Change the details from Display mode to Change mode.
• System will give the message “Caution: The Table is cross-client “. Press Enter.
• Create New Entries. Give name to your Logical System and Description for the same.
© 2007 SAP AG 7
IDOC to File – Beginner’s Guide
Fig No. 12
Go to TC: WE20
• To Configure a Partner Profile for your Receiver System .
• Select Partner Type LS (Logical System). Choose Create New.
• Enter Logical System Name as Partner No. which you have created in previous step i.e.
BD54. Partner Type should be LS.
• Fill all mandatory fields as per your system specifications. You can Choose F4 help.
• Add a new row in Outbound Parameters and select Message Type which you have created
in custom IDOC as shown in fig 13.
Fig No. 13
© 2007 SAP AG 8
IDOC to File – Beginner’s Guide
Fig No. 14
• Assign Message Type and Basic Type to Outbound Parameters of Partner Profile.
• Specify Receiver Port which we had defined earlier.
• Make sure that Output mode should be Transfer IDOC immediately instead of Collect
IDOC.
Fig No. 15
© 2007 SAP AG 9
IDOC to File – Beginner’s Guide
• As this was the last step of our configuration part for RECEIVER SYSTEM on Sender
System Side. We Developed a custom IDOC and Configured settings for the outbound
processing through all these steps. Now what we have to do is to Test the outbound IDOC
processing for the same.
• But before moving further with this step we have to do technical settings for SENDER
SYSTEM that should be on XI Server .Now Logon to XI Server in your Landscape.
Go to SM59.
• To Define RFC Destination for Sender System
• Maintain Technical Settings and Logon & Security Settings as per your system
specifications.
Fig No. 16
Go to TC: IDX1.
• To maintain Port and Logical System for Sender System in IDOC Adapter
• Give RFC Destination as Defined in previous step.
NOTE: Make sure that Port for sender system is of the format SAP<SID>. Where SID is your
three digit System ID.
© 2007 SAP AG 10
IDOC to File – Beginner’s Guide
Fig No. 17
• Now that is all from the configuration side of Ports and Logical Systems for both Sender
and Receiver Systems
TESTING
• To Test IDOCs outbound processing
Go to TC: WE19
• To Test the IDOC processing
• Select Basic Type button and search for your developed Custom IDOC with F4 help.
Fig No. 18
• Enter Data Records in segment type of your IDOC that you wish to send to other system.
• Here we are using some test data to test the processing for the same.
© 2007 SAP AG 11
IDOC to File – Beginner’s Guide
Fig No. 19
• Now we will specify Technical settings in the header of IDOC i.e. in EDIDC field.
• Click on EDIDC and specify the technical details for both sender and receiver. Click Enter.
Fig No. 20
• Select Standard Outbound Processing to trigger the IDOC for outbound Processing.
• You will get prompt as shown in case of successful triggering of IDOC else in case of failure
system will display message “ IDOC <Idoc No.>was saved but cannot or should not be
sent”.
© 2007 SAP AG 12
IDOC to File – Beginner’s Guide
Fig No. 21
Fig No. 22
MONITORING
Go to TC: SXMB_MONI
• To monitor IDOC received by integration server
Fig No. 23
NOTE: Here you can see the message flag along with red icon displaying status
“Acknowledgement not possible”. This is another most challenging area to deal with and fix the
problem. I will try to explain/troubleshoot this part in next article.
© 2007 SAP AG 13
IDOC to File – Beginner’s Guide
XI OBJECTS DEFINITION
Fig No. 24
• Import custom IDOC from SAP objects under Imported objects in a specific SWCV.
Eg. ZMATERIAL_MESSAGE.ZMATERIAL
Fig No. 24
• Define message mapping with custom idoc as sender interface and user defined message
structure as receiver interface as shown :
© 2007 SAP AG 14
IDOC to File – Beginner’s Guide
Fig No. 25
• Before moving with this step assign a Business System to existing/new Technical System.
• Now Import Business System assigned to Technical System from SLD to your integration
builder.
• Go to Integration Directory Objects Tab Service Without Party Business System
• Right Click Assign Business System Select newly built BS and proceed further.
Fig No. 26
© 2007 SAP AG 15
IDOC to File – Beginner’s Guide
RESULT
Received XML payload on receiver service
Fig No. 27
© 2007 SAP AG 16