Skip to Content
Author's profile photo Dimitri Sannen

Sending and receiving IDOCs using a single stack SAP PO system

Why this document?

On SCN, a lot of questions occur concerning sending and receiving IDOCs on a java-only SAP PO system. Sometimes people get confused what they need to do, especially when lacking transactions on the familiar ABAP stack.

This document contains all the configuration details to enable IDOC processing.

On the SAP PO system

Configure destinations to send IDOCs

Define destinations in the SAP NetWeaver Administrator.

Path: Configuration -> Infrastructure -> Destinations

Make sure destination XI_IDOC_DEFAULT_DESTINATION (with this exact name) is defined as the default one. Next to that, define other destinations in case multiple sending or receiving SAP systems are involved in your scenario(s).

Configure the resource adapter to receive IDOCs

To avoid error with the connection factory, the resource adapter inboundRA must be configured properly in the SAP NetWeaver Administrator. Path: Configuration -> Infrastructure -> Application Resources

Make sure the resource adapter is available and started properly.


InboundRA configuration details


  1. The program ID should be like XI_IDOC_DEFAULT_<SAP PO SID>. Make sure you use this program ID in the RFC destination on the back end system to send IDOCs to SAP PO.
  2. SAP recommends putting the value between 5 and 10, but this could cause a failure of the resource adapter. Please be careful when setting the value. If not, the resource adapter will not start.
  3. The default destination is mentioned here.
  4. In case different SAP back end systems send IDOCs to the SAP PO system, you can mention different System IDs here. Syntax should be like <SID>=<destination>; <SID2>=<destination2>;

      Make sure all other parameters are adapted accordingly.

On the SAP back end system

Define partner profiles to send/receive IDOCs. Make sure, in case you send IDOCs to SAP PO, the program ID within the RFC destination correlates with the program ID defined within the inboundRA resource adapter.


Integration scenario specifics

To send IDOCs

The message mapping sometimes causes confusion and errors when trying to send IDOCs to the backend system. Keep in mind

  • To map constant value 1
    • To field BEGIN
    • To every SEGMENT field within a specific segment you want to use.


  • The EDI_DC40 segment takes care of sender and receiver information (ports, partner numbers, message type, etc.).  In case you want to use the same message mapping for different target systems, leave the following fields blank (by putting constant value 1 in e.g.):  SNDPOR (sender port),  SDNPRN (sender partner number), RCVPOR (receiver port), RCVPRN (receiver partner number).

    Instead, use the Header Mapping part within your Integrated Configuration object to overwrite the empty fields in segment EDI_DC40.

    In the example above, the ECC system client 300 is the receiving back end system. Please note this is a business system, used within the Integration Directory and registered within the System Landscape Directory (SLD).

On communication channel level, make sure the IDOC adapter (IDoc_AAE) is properly configured using the default destination, a specific one from the NetWeaver Administrator or refer manually to the receiving back end system.

To receive IDOCs

The most important object, necessary to receive IDOCs on a single stack system, is the sender IDOC adapter. In previous releases (SAP XI 3.0, PI 7.1(1)), no explicit sender IDOC adapter, and thus no sender agreement, was needed to receive IDOCs.

Make sure the sender IDOC adapter (IDoc_AAE) is properly configured using the default destination, a specific one from the NetWeaver Administrator or refer manually to the receiving back end system.

Optionally, acknowledgements (ACK) can be used.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Thanks for such a nice blog Dimitri.




      Author's profile photo Stefan Hilpp
      Stefan Hilpp

      Nice blog... unfortunately I didn´t see it 2 days ago, when I was setting up my latest scenario on PI 7.31 Java-Only.

      (must have been looking in the wrong place...)




      Author's profile photo Former Member
      Former Member

      Nice blog... Just one question about the header mapping for sending IDocs to the backend system:


      Here you have put ECCCLNT300 as "sender communication component". But as this is the receiver system, shouldn't you set ECCCLNT300 as "receiver communication component?



      Author's profile photo Former Member
      Former Member

      Requires Correction to your statement regarding the mapping of PI To Send IDocs

      New IDoc_AAE Adapter does xml validation and it expects the mapping to generate the IDoc as per IDoc xsd schema and schema says the value of segments (begin,segment,...) with value 1. if you dont provide those values it fails to post..


      one more thing regarding the IDoc Destinations , if we have only one SAP System and configured the XI_IDOC_DEFAULT_DESTINATION with those system values do we still need to configure the Destination with SID Name.. I believe not required




      Author's profile photo Christoph Ostrop
      Christoph Ostrop

      our configuration attribute in multiRepository is always lost after system-restart ?


      any idea ?

      Author's profile photo Nirmal kumar V
      Nirmal kumar V

      Hi Everyone,

      We had to configure ports in dual stack.  WE21 in ECC & IDX1 or IDX2.  Is there no port configuration needed for single stack     ?  If so how would we get the values for SNDPOR and RCVPOR. ?


      Author's profile photo Ankur Agrawal
      Ankur Agrawal

      Hi Dimitri,


      I have made all the required configuration in SAP PO to send the IDOC to SAP ECC system. So I want to know the configuration in ECC, which is required.

      Thanks in advance.



      Ankur Agrawal