XI/PI: Configuration using Integration Directory

In previous article, we discussed IR Settings needed for your first XI scenario. Now, let us delve into ID Configuration. Integration Directory is a configuration tool which helps to configure the routing rules for the business scenarios created in Integration Repository. The ID binds the technical routing information to the interfaces via the communication channels. Communication channels contain the adapters which do the job of translating incoming message to XML and vice versa in case of outgoing message. There are different types of adapters like File, IDoc, RFC, JDBC, JMS, Mail, SOAP, HTTP etc. There are many Third-Party adapters provided by Third-Party Vendors like Seeburger, RosettaNet etc. Note that incoming message (i.e message from the sender system) is referred to as outbound message while outgoing message(i.e message being delivered to the target system by XI) is referred to as inbound message. The frame of reference is always the communicating systems and never the XI box or the integration system. Now, let us start with Directory Configuration.

Define Collaboration Profiles

Collaboration Profiles contain the information about involved parties, business systems/services, and the communication channels.

SAP XI File Adapter

  • Access path – Start Integration Builder (SXMB_IFR) -> Integration Directory
  • Create a new scenario object and save it
  • Expand the above created object
  • Choose ‘Service Without Party’
  • Right-click on ‘Business System’ and choose ‘Assign Business System…’
  • In the wizard, leave the Party name blank, select your BS and uncheck the box ‘Create Communication Channels Automatically’
  • Expand your service (BS), right-click on ‘Communication Channel’ and select ‘New…’
  • Name the communication channel as ‘File_sender’
  • Choose adapter type as ‘File’ and option as ‘Sender’
  • Specify the transport protocol, message protocol, adapter engine as shown
  • Also specify the File Access Parameters and Processing Parameters as shown
  • Sender file adapter is now configured
  • Save the communication channel
  • Similarly, create receiver communication channel ‘IDoc_Receiver’ with adapter type as ‘IDoc’, option as ‘Receiver’, Transport and Message Protocol as ‘IDoc’. You will also need to specify Adapter Engine, RFC Destination, Interface Version, Port and SAP Release. RFC destination must be defined in SM59 to point to the target SAP R/3 system, likewise port should defined using transaction IDX1.

Define Logical Routing

Logical Routing Objects contain Receiver Determination and Interface Determination. Receiver Determination determines one or more receivers for a particular combination of sender and outbound interface. Interface Determination determines which interface should be used for inbound message processing.SAP XI Receiver Determination

  • From the left frame create a new ‘Receiver Determination’ object
  • Select your sender service and interface
  • In the ‘Configured Receivers’ section, choose the receiver service (BS for the R/3 System)
  • Save the object
  • In the section ‘Configuration Overview for Receiver Determination’ in Receiver Determination screen, hit ‘Refresh’
  • In the column ‘Receiver (Partner/Service), right-click and select ‘New Specific’ in order to create a new interface determination object
  • Select your interface ZRZSO_MT.ZRZORDER
  • Select your interface mapping Orders_out_ZRZORDERS
  • Save the object

Define Collaboration Agreements

Collaboration Agreement consists of Sender Agreement and Receiver Agreement. The Receiver Agreement defines a binding between the receiver communication channel and the inbound interface while the Sender Agreement defines a binding between the sender communication channel and the outbound interface. Let us create a Receiver Agreement.

  • In the section ‘Configuration Overview for Receiver Determination’ in Receiver Determination screen, hit ‘Refresh’
  • In the column ‘Receiver Agreement (Communication Channel)’, right-click and select ‘New Specific’
  • Specify the Receiver Communication Channel as ‘IDoc_Receiver’
  • Save the agreement
  • Go back to the receiver determination screen and hit ‘Refresh’

Now, create a Sender Agreement,

  • In the left frame, right-click on ‘Sender Agreement’ and select ‘New…’
  • Select your service
  • Select your outbound interface (Orders_out)
  • Choose the sender communication channel (File_sender)
  • Save the agreement and close

Now go to the Change List tab in the left-frame and activate your change lists. This completes our Directory Configuration. In the next blog post we will understand what settings are required in the receiving R/3 partner system and how to test the scenario.


  1. says

    If you want to locally test the ID Configuration, you can use menu path Tools -> Test Configuration.

    If you want to test your scenario, you can use Test Message tab on the Component Monitoring section of Runtime Workbench. Select Component Monitoring -> Click Display button –> Integration Engine then click the Test Message tab. Provide the details and Click Send Message button.

    Let me know if you need additional info.


  2. says

    Hello Riyaz,

    Thank you for prompt reply. Just two small requests.

    Request 1) you know in the article for steps for configuring a scenario in the integration directory you have mentioned as quoted…

    “Note that incoming message is referred to as outbound message while outgoing message is referred to as inbound message. The frame of reference is always the communicating systems and never the XI box or the integration system”

    I was wondering could you explain it on a diagram basis, please excuse me if it sounds like a stupid question but any help would be greatly appreciated.

    Request 2) Also is it possible to could you post an article that shows a linear diagram on a particular scenario like for E.g.file to idoc, and show two system with XI in between and lines arrows pointing on what do you need to enter at a particular point. Would be grateful for any help provided.


  3. says

    In my future articles I shall try to include a diagrammatic view. When you speak of any message from the sender system – it is referred to as an outbound message, whereas when you speak of message being delivered to the target system (by XI) – it is referred to as an inbound message.

    For file to IDoc scenario, the article Your first XI scenario does have a diagrammatic representation of the scenario with arrows showing the flow and adapters/message conversion. If you want me to explain the diagram, do let me know. I will be more than happy to help you.


  4. says

    Hello Riyaz,

    Thank you very much for your reply, also went through the diagram and got my query resolved, it has been a great help, I am sure you have a very clear understanding of XI, because you can explain things in a very simple way and most importantly very effective .

    Also Riyaz, I have got an idea and i wonder if it can be of any help, you know this XI has many confusing statements like the one we discussed in the previous correspondence, i think if we add these confusing statement with an explanation in the brackets it would be great help our community especially for people who are just getting to know XI, i have mentioned the same statement with an in brackets explanation below as an example for your reference .

    Note that incoming message(i.e message from the sender system ) is referred to as outbound message while outgoing message is referred to as inbound message(i.e message being delivered to the target system by XI). The frame of reference is always the communicating systems and never the XI box or the integration system.

    Let me know what you think


  5. Mohammad Salahuddin says

    Hello Riyaz,

    I have just started studying on XI .I have gone through the article related to a scenario
    File to IDOC.Could you explain all the basic scenarios which is generally used in projects.

    Mohammad Salahuddin

  6. Nandha says


    How can I trace an IDOC on the target system back to the sending system ?
    Using an asychronous call .

  7. says

    To trace an IDoc back to the sender, open the IDoc control record using we02 in the target system. On the Details tab, you will find Identification field under Referneces which holds the Message ID of the XI message. Search the message in SXMB_MONI or SXI_MONITOR in XI using this message ID and you will get the corresponding source message.


  8. s.ravi says

    Hi Friend,

    I need one help from your side.i have already created sales order through BAPI function module using RFC adapter.
    step 1 : sender is file Receiver is RFC.
    step 2 : After creating sales order how to send mail for customer through mail regarding sales order no and details…Please send me any screen shot for this….


  9. s.ravi says

    Dear Friend,

    when iam creating sales order in R/3 i have to pass this number and details to customer through mail using XI server …please send me any screen shot.


  10. says

    what kind of file are you sending? How is the file generated? I did not understand what you intend to do with file to RFC scenario.

    For you step 2 part, you could either setup an IDoc to mail or Proxy to mail scenario.

  11. farooq says

    Hi Riyaz,
    I am having a bit of knowledge on XI.But I didn’t have experience of any project.Right now i need to Integrate my Java systam into SAP how I need to proceed can u please send me the entire process with scenarios.

  12. Ravi.S says

    Hi Friends,

    iam facing some problem in my system.
    Like when iam mapping flat file to Bapi_salesorder_creatdat2 .
    after test my scenario program executing successfuly but sales order not created .
    can u please give me some input how to test .


  13. says


    Check the status of the adapter. Also test the RFC destination used in SM59.

    In order to create sales order, you can also have a file to IDoc scenario, where you can use ORDERS IDoc. Advantage of using IDoc is that you can easily track the IDoc statuses in the target SAP system using WE02/05 and get information on any errors while posting IDocs.


  14. Gautam says

    First of all.. I just want to tell you that your blogs are one of the best I came across..
    I cannot even think of the time and effort you put, not only into the explanation, but also replying to the questions/comments posted…. Keep up the good work…

    My question for you..
    I configured the above mentioned scenario and it works fine. In MONI, I see that that the message is successful. When I goto WE02 in my Target System(SAP 4.7 EE), the IDoc has been posted with Status 56 and the following is the message:

    EDI: Partner profile not available
    Message no. E0332
    Diagnosis :A partner profile could not be found with the following key:

    /LS_Legacy /LS/

    This involves the key fields of the table EDPP1:

    -PARNUM partner number
    -PARTYP partner type

    Does this mean that I have to create a partner profile for the legacy system in the target system? I can see doing that if I was using just IDocs, without using XI. But, I am failing to see why I would need to do that when I use XI as the broker? Any comments..? Thanks.


  15. says

    Hi Gautam,

    Thanks for the compliments.

    You need to create a partner profile for the legacy system in the target system, just the same way you would do in case you are using ALE/IDocs. This is necessary as the target system needs to know from whom the message has been sent and how the message should be further processed in order to post the data to the database tables.

    Hope this helps.


  16. helmut klinger says

    Hi Riayez,
    many thanks for ‘demystifying things’ (not only java mapping).

    May be You know the solution to the following problem:

    If the text-representation of an Idoc field as displayed in WE05 or WE19 is empty,
    then no corresponding xml-element will be generated in XI and thus no target field will be generated, when used as mapping input.
    Is there any process instruction like ‘suppress empty fields = “false” ‘ – which would be the solution to this problem in BizTalk ?


  17. helmut klinger says

    Hi Riyaz,

    trying to put data via NFS into target directory ‘ \myserverTest’

    communcationchannel motoring displays the following error:

    target directory ‘/usr/sap/WXY/DVXYZ/j2ee/cluster/server1/\myserverTest’ not found

    It looks as the adapter would look for this directory on its own server.

    How to instruct PI to …… ?



  18. Raja Sekhar says

    Hi Riyaz,

    I am working on File to JMS Scenario,my requirement is i need to set MQMD MsgID Value ,using standard JMS Rec adapter its not possible.what are the ealternatives to achieve this one??


  19. Ajeet says

    Dear Riyaz,
    An outbound scenario in FICO module. The file name should change dynamically depending upon status of a field,mode of payment.I have modified the message mapping accordingly and then in Interface Mapping in IR and then in Interface determination of ID, tested it in development box. Tested locally in IR. Working fine But when the actual file coming from R/3 then the file name not getting changed. Pl. advice and tell me where I am on mistake.
    Ajeet Kumar Choudhry
    Bokaro, Jharkhand