Professional Documents
Culture Documents
IDOC To File Beginner Guide 20090615
IDOC To File Beginner Guide 20090615
IDOC To File Beginner Guide 20090615
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..
Table of Contents
Applies to: .......................................................................................................................1 Summary.........................................................................................................................1 Author Bio .......................................................................................................................1 STEPS TO DEVELOP CUSTOM IDOC IN R/3 SYSTEM ................................................3 STEPS TO ESTABLISH CONNECTION BETWEEN R/3 SYSTEM AND XI SERVER.....5 TESTING ......................................................................................................................11 MONITORING...............................................................................................................13 XI OBJECTS DEFINITION ............................................................................................14 Integration Repository: Design ......................................................................................14 Integration Directory: Configuration ...............................................................................15 RESULT........................................................................................................................16
STEPS TO DEVELOP CUSTOM IDOC IN R/3 SYSTEM Go to TC: WE31 To Create IDOC Structure: Segments Enter the name of your segment type and click on Create button. Enter short text and Save it. Now go back. Go to Edit menu option Set Release.
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
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. 5
SAP DEVELOPER NETWORK | sdn.sap.com 2007 SAP AG BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 4
Go to TC: WE60 To See IDOC Documentation. Here you can see Structure of your Basic Type IDOC in text format.
Fig No. 6
Fig No. 7
SAP DEVELOPER NETWORK | sdn.sap.com 2007 SAP AG BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 5
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
SAP DEVELOPER NETWORK | sdn.sap.com 2007 SAP AG BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 6
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.
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
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
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.
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.
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.
Fig No. 21 Go to TC: WE02 / WE05. To check the status of triggered IDOC You can see your IDOC under the node of Outbound IDOCs
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.
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 :
Fig No. 25
Fig No. 26
Define a Receiver Communication Channel as FILE Adapter and assign it to Receive Service. Also Define all the configuration objects either manually or through wizard. Remember in this case sender should be Business System and there is no need define communication channel for the same. Use IDOC Adapter as sender adapter. Now you can test the idoc by triggering it from R/3 system form WE19.
RESULT
Received XML payload on receiver service
Fig No. 27