SAP XI IDoc Adapter is by and far the most widely used adapter. This article describes its configuration on sender and receiver end along with related settings in XI and the involved SAP application systems. The configuration is fairly easy and straightforward. This article simply summarizes the different steps involved.
IDoc Adapter converts the incoming IDoc to XML and XML messages to outgoing IDoc. The IDoc adapter resides on the ABAP stack of the integration server and hence no Sender Agreement is necessary in order to setup the sender adapter. A point to note is that using IDoc adapters, we can only have asynchronous (tRFC) processing. Apart from using Runtime Workbench and transaction SXMB_MONI, IDoc messages can be monitored using transaction IDX5.
Now, let us understand the settings required in order to send an IDoc from SAP Application system to XI.
IDoc Sender Adapter Configuration
The source SAP Application system must be setup to send IDoc to the XI server. In one of my previous articles, I have described how to set up the source SAP Application system to send an outbound IDoc.
On the XI system, create a RFC destination of type R/3 connection, pointing to the source SAP Application system. Also, create a port for the source system using transaction IDX1. Mention the above created RFC destination in the IDX1 port configuration. This is required as XI uses this configuration to read the IDoc metadata from the source system. Once you have done this, your XI system is ready to receive IDocs from the source SAP system.
The metadata for an IDoc is loaded in the Integration Server when the first message for the particular IDoc is processed by the Integration Engine. You can see the IDoc metadata using the transaction IDX2. If you dont see the metadata for your IDoc in transaction IDX2, you can manually load it using the Menu options in IDX2. You need to specify the port and the IDoc type before you can import the IDoc metadata.
You can then import the IDoc definition from the source SAP system in XI Integration Repository and build your scenario on it. Then complete the Directory configuration necessary for your scenario. You don’t need to create any sender agreement as IDoc adapter resides on integration engine itself.
IDoc Receiver Adapter Configuration
Configuring IDoc Receiver Adapter is equally easy. On the XI system, create the RFC destination of type R/3 connection, pointing to target SAP Application system using transaction SM59. Create a port for the target SAP system using transaction IDX1. Mention the above created destination and port names in the communication channel used in your receiver agreement. Adjacent figure shows the configured IDoc receiver.
In the target system, you should create the partner profile for the source system using the transaction WE20. For a detailed understanding refer my post on Settings in R/3 Partner System to Receive IDocs. This post discusses the steps assuming you are using a custom IDoc. In case you are using a standard IDoc you are only required to define the source system in transaction BD54 and create a partner profile using WE20 as discussed in the same article.