XI/PI: The XI Starter Kit

Exchange Infrastructure or Process Integration which now falls under SAP’s ESOA Middleware is SAP’s Integration Solution. It not only enables Application Integration (A2A) but also Business Integration (B2B). In fact it is much more than a plain message broker. It supports Cross-Component Business Process Management (ccBPM), which helps to streamline the business processes in the organizations.

Who should learn XI?

Are you aspiring to become XI Professional? It’s fairly easy! If you are an ABAP Professional, Java Professional or an EAI Professional you can easily acquire XI skills. Don’t worry even if you are not. If you are willing to learn a new technology, then you can become skilled at XI. A background of SAP and Knowledge of ALE/EDI, IDocs would certainly be an advantage.

What is XI?

Exchange Infrastructure or Process Integration as it is now called is an Integration Platform which helps different systems to communicate with each other across landscape. It acts as a message broker. Different systems in the landscape communicate with each other via XI Server, thus forming a bus topology with XI at the center. This helps avoid peer-to-peer communication (as in star-topology) thus providing a central mechanism to route and monitor the message flows.

SAP XI Architecture contains an Integration Builder, System Landscape Directory (SLD), Integration Server (IS) and Runtime Workbench (RWB). Integration builder has a Integration Repository (IR) which is a design time environment and Integration Directory (ID) which is configuration environment. Integration Server has Integration Engine (IE) which routes all the messages and Adapter Engine which helps in XML transformation. It also has a Business Process Engine which helps in execution of BPM flows. System Landscape Directory (SLD) stores information about the different systems involved in the landscape. This information is used by IE at runtime for message routing. More detailed information on the XI Architecture can be found here.

All the communication is via SOAP/XML messages. XI provides adapters to convert messages from and to XML format. XI thus provides interoperability between different heterogeneous landscapes due to its foundation on open standards. XI has its interpretation of SOAP protocol. Understanding of SOAP protocol and XML is absolutely essential to master XI. SOAP is an XML-based protocol for exchange of messages in a decentralized, distributed environment. A SOAP message is composed of three elements – (1) SOAP Envelop, which is a mandatory element and wraps the entire message (2) SOAP Header, which is an optional element which contains header information like sender and receiver, ports etc and (3) SOAP Body, which is again a mandatory element. It carries the actual message or the payload. In the coming blog posts, we shall discuss the XI concepts in more detail.

In the next part of this article series, we shall understand how to create your first XI scenario.


  1. Naga says

    Hi Riyaz,

    I have a very basic question in SAP ?
    What is synchronous and asynchronous ?
    I know that syn waits for a response and async doesnt wait for one.
    I would like to have real scenario of how these are used, like when to use an synchronous interface and when to use sync ?

    Wat happens if we try to send a msg from async sys to a sync sys and the vice versa ?

    I hope clarifying these would help beginners like me .

    Thank u

  2. says

    Synchronous => two way communication i.e. request and response mechanism, and works by “Best-Effort” quality of service.

    Asynchronous => one way communication and works by EO (Exactly once) or EOIO (Exactly once in order) quality of service.

    In async, we can have acknowledgments send back from the receiver to ensure delivery.

    We can have async and synch interfaces talk to each other by using synch-asynch bridge. This can be done using a BPM process.


  3. Naga says

    Can u for example give some systems that are sync and that are async, and at the same wat happens if one sends a msg from sync system to an async system and the vice versa,

    I would like to have an clear idea because by the time a reader reads this it should be clear to him so the reason y I am keeping on shooting questions, let me know if its too much to take for u.

    In XI when we say sync msg does that have any thing to do with sync systems ?

    Y should it always be a sync OB msg mapped to sync IB msg in IM?
    Y not sync OB to async IB ?

    sync – syncrhonous
    async – asynchronous
    OB -out bound
    IB – Inbound
    IM – Interface mapping

  4. says

    system by itself wont be termed as sync or async. If sending system send a message and requests some data in the form of response from the target system, we call this as sync. If no response is expected, this will be asynch, however acknowledgements can be sent back in async.

    sync interface has a request message and expects a response message, while async interface only has outbound or request message. Hence sync message needs to be mapped to a sync message.

    We can have async interface communicate with synch interface by means of bridge which can be created using BPM. I will talk about this in detail in one of my upcoming posts.

    I hope this gives you a fair idea. If not, just reply back.

  5. Naga says

    Hi Riyaz,

    It gives me a fair idea but stil i think i didnt exactly get what I am looking for, I might not be clear while I am asking my prev questions.

    If it is always as we discussed that a sync inter always mapped to a sync interf, y would we need a async interf talking with a sync interf, any real time scenario..

    wat are +ve n -ve’s of using one instead of other, when would we know which one to use and which to not.

    This time if u have a chance to give a reply, pls do mention a sample scenario….

    Thank u

  6. says

    The advantage of async-sync bridge is that the calling application (being asynchronous) does not have to wait for the synchronous response.

    For example, say the calling system sends a quote to SAP ERP which should create a sales order or calling system sends a PO request to SAP which should create a purchase order in SAP ERP.

    If the calling system does not want to wait for the response, implementing async interface on sender end is the right option. however this poses a disadvatage of not being able to track whether a PO or SO was created in the target system. The only way to check this is to go to relevant transaction (ME23N or VA03).

    By creating a synchronous interface on receiver end we provide a central way to monitor the message in XI. Hence, when calling system sends an async message, the call is persisted in XI and calling system can move on. XI will make a synchronous BAPI call to the target system which would provide the success/failure of the messge in the BAPI response. BAPI response can be tracked in XI. Thus async-sync bridge improves the situation.

    I guess this clarifies your query. If not let me know.


  7. naga says

    Thank u Riyaz,

    Now ur post helped me to think in the right way.

    So async msg’s are not persisted in XI only sync msgs are persisted in XI.
    So XI is like as u said in ur post is acting as a central monitoring system.

    This is the picture i got,

    An async intf doesnt necessarily have to wait for a response/ requires a response, and when it wants to speak with a sync interface which gives a response (its by default).

    Now XI takes the place of a middleman, using its async-sync bridge it receives the msg from an async intf and now persists the msg because it has to talk to a sync intf and waits for the resp from it . If any comm failure occurs it takes steps in such a way that this sync comm takes place.

    And since async intf doesnt expect a response, xi stores the response it received from sync intf in its dbase/ deletes the msg which it persisted perviously, once it gets a resp from sync intf.

    Please feel free to correct me if still my perception is wrong
    Thank u

  8. says

    Yes Naga, you are very much right. XI acts a middleware or message broker. But unlike other middlewares, it also has the ability to persist messages by making use of BPM.


  9. Naga says

    Hi Riyaz,

    How would one, looking a head in future decide whether to go MDM + XI or ALE/EDI + Xi or EP+XI or a FModule + XI. Whats r the possibilities of each of those above combinations to exist in near future or hot areas for a consultant to get in or high probability of being in a project for a longer time. I couldnt able to foresee the projects that might come.

    How would one build a career in XI, wil they start from ABAP -> XI -> Java ? Could u throw some light or ur views on this

    Thank U

  10. says

    It rather depends on your experience and your interests. MDM is a fairly new and nascent technology, and still not that robust. ALE/EDI knowledge cannot be separated from XI. You must be aware of these technologies in order to excel in XI. XI with EP would be a better bet, however MDM and XI would even be useful since MDM is based on data consolidation and synchronization across system, XI plays a major role. XI being majorly technical, clubbing any industry/functional domains would not help much. However, a prior domain knowledge helps in understanding and designing interfaces better, I would not recommend a fresh learning/training of any specific functional domain.


  11. Naga says

    Hi Riyaz,

    Thank u for the reply and also sory if I am bugging u with questions, some one has to make a blog or a group active either by asking quesitons or answering questions.

    can i know y would EP+XI a better bet, can i also know how MDM is connected to Xi as well as ALE/EDI and EP to XI.

    I am trying to get the big picture dont get me wrong.

    Thank u

  12. says

    Community grows by sharing and collaboration. And you are playing a great role. Thanks for that. I appreciate your interest and enthusiasm.

    EP and XI both are well established and deep-rooted technologies, so the number of customers going in for EP, XI implementations is high as compared to MDM. MDM is still in the budding stage, but should be well recognized in the near future. XI being a middleware technology helps communicate different systems. So in a way it is connected to every other product/application for facilitating communication between them. ALE/EDI is a parallel technology to XI and have been prevailing before XI came into being. ALE is SAP’s technology while EDI is an industry standard for message exchange between business partners. Knowledge of ALE certainly helps XI professionals in terms of IDoc communication.


  13. suresh says

    i have configured FILE TO FILE scenario with required information like DATATYPES,MESSAGE TYPES,MESSAGE INTERFACES,MAPPING INTERFACE,INTERFACE MAPPING and tested the mapping by using ‘Test’ tab in message interface.Afterwards did the configuration and test the configuration in ID.it is successfully processed like incoming message->sender aggrement->Receiver Determination–>interface Deterimination/mapping–>receiver aggrement in TEST CONFIGURATION in ID.All integrarion respository objects/integration directory objects are acitivated.

    file Sender in communication channel:
    file access parameter : \\osi-0011\MDMShare

    file receiver in communication channel:
    file access parameter : \\osi-0011\MDMShare

    did all the respective configuration………i could not able to see the output message? what happened even it doesn’t show anything in monitor? what happens……i got fed up ……everything works fine…..but i could not able to trace? can you please help me out?

  14. says

    HI Suresh,

    Are you using FTP or NFS protocol? If you are using NFS, you must have the files on the same server on which XI is installed. In case of FTP, you can use any network location where FTP server is installed.

    For FTP, specify source directory in the format – /FTPfolder/
    where FTPfolder is the name of your folder and / is the root FTP folder.

    For NFS, Specify source directory in the format – //XI-Server-hostname/your-folder
    Tip – browse to your folder using Windows Explorer, copy the path from the address bar, and replace all occurances of ‘\’ with ‘/’ and paste the resulting path in the source directory box in sender file adapter. See this article for file adapter configuration.

    I guess your problem should get resolved by changing the slash characters. Try using //osi-0011/MDMShare.

    Are you using XML files? If you aren’t, you need to use file content conversion. If your file contains xml data, simply change the file extension from .dat to .xml

    I hope this helps. If not, do let me know.


  15. suresh says

    Hi Riyaz,

    Thanks a lot for the reply and it was successfully executed when input file is xml and am trying with file content version with is showing exception in message mapping.

    input.txt contains

    File Content version parameters,
    DocumentName: input_DT
    Recordset set Structure:Row,*




    Message Mapping did the dragged the Row,FirstName,LastName of source to Row,FirstName,LastName to target

    Can you let me know where is the error……………………


  16. suresh says

    Hi riyaz,

    How to stop my interface so that it should continue to publishing the message until i correct the message.

  17. says

    Hi Suresh,

    To stop the message flow, you may want to deactivate the channel from RWB. Alternatively, you can change the communication channel in ID with random values and activate it.

    As regards the error in message mapping, please check your parameters for content conversion. I am not aware of processConfiguration parameter. Also, specify the correct namespace as per your datatype.

    Check the Communication Channel for errors in Channel Monitoring section in RWB. It will give you the exact error in case anything is wrong in content conversion parameters.

    If this doesnt help, provide me the details of the error message you are getting. maybe it helps.



  18. suresh says

    Hi riyaz,
    Once again millions thanks to u :)))))))))
    I have made a mistake in file content conversion that message type given wrongly and now its works fine.if i want output as same as input like csv then receiver channel should mention file content conversion?


  19. says

    Yes Suresh, you are right. If you want the target file format other than XML (say csv or tab-separated etc), you can use File Content Conversion at the receiver side. You can generate files with simple as well as complex structures.


  20. Zeid says

    Hi Riyaz,

    I have to develope an abap application that exchange edi messages in xml with an application in non-sap environment. The message exchange should go over https protocoll.

    I build xml messages from abap data via transformation and also the validation will done using xslt. Now I really do not know if I need XI for this aim or if I need proxy + xi.

    What can be the best way to send and recieve xml data in this case on ecc 6.


  21. says

    Hi Zeid,

    If you are using ECC6, then proxies should be preferred. However, if you have standard IDocs that can be used, you can use IDocs as well.

    Proxies are preferred over RFCs. Use of web services is the best way to go. However, proxies are equally good.

    All three proxies, RFCs and Web services are supported by XI.


  22. Zeid says

    Well – the data exchange must go over https protocoll. So, only as consideration. I know that it is also possible without proxies and XI. How will it look in this case? Is it the way with BSP Application?


  23. says

    You can also consider use of Web Services or Enterprise services. This way you can make use of WS Security which is an open standard for security via internet communcation.

  24. Kumar says

    Hi Riyaz,
    Your Blogs are one of the best that i ever come acroos, the best part is the simplicity, its amazing, i would like to learn more on ALE IDOC and XI from you, are ther any other professional methods by which you share knowledge on the above topics.

  25. Lavi says

    Hi Riyaz,

    I started reading your scenarios and answers regarding XI. I really wonder and your blogs are one of the best that I ever come across. It’s just great!!!

    I am newbie to XI. i just have some idea with XI components. I have tried file to file scenario as per your sample scenario. It just worked fine.

    Good to read all your suggestions and it shows your talent!!!


  26. vijay says

    Hi Riyaz,

    i want to learn SAP XI/PI. i got some doubts.

    1. whether ABAP knowlege is required for learning XI?

    2.what happened to SAP’S previous proprietary cross appl. technologies like BAPI,ALE,IDOC.whether XI/PI is replacement of all the above or XI/PI can be used
    simultaneously along with cross appl technologies.How the XI/PI is different from BAPI.ALE,IDOC.let me answer clearly.

  27. says

    ABAP knowledge is not pre-requisite, however a good background would be useful. ALE is not replaced by XI. Both technologies co-exist.

  28. srinivas says

    Hi Riyaz,

    Subject: Technology changing from java/j2ee to sap(ABAP) module

    I had done my MCA and currently working as Java/J2EE developer from last 6 months,

    and looking to change from Java/J2EE to SAP professional,

    which SAP module best suits me and how is going to be the feature??..

    Kindly asist me.


  29. veda says

    hi Riyaz,

    i have done outbound synchronous proxy from R/3 to third party system.
    i have created outbound and inbound interfaces and also done message mapping for request and response.
    and when test the scenario i am getting the following error

    Failed to load resource from the context classload
    er of the current thread! Loading from classloade~

    Runtime exception occurred during application mapping com/sap/xi/tf/_PORES_MM_; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Failed to load resource from the context classloader of the current thread! Loading from classloade~

    could you please help me out to identfy what causing this error. i have tested my mapping individually and it is working fine.
    Your help Greatly appreciated.


  30. Amjad says

    Hi Riyaz,
    I am planning to take Certification on SAP PI 7.1 so do you have any latest updated materials for the same?
    Like TBIT 40 TBIT 51 etc.

    Thanks in Advance.
    – Amjad

  31. saikrishna says

    Hi Riyaz,
    I have a question, “what is the SYSTEM flow of a project before production and what’s the flow after the same project/product has been moved to client system??”

  32. Basu says

    Hi Riyaz,
    I am greatful that i found your site.
    I have a quick question on SAP. I planning to do sap crm, currently am working on microsoft dynamic crm and i have done b.com. Please suggest me how can i proceed with this? And what are the opportunities after completion. Please note that i dont have much knowledge on programming. Please help.. Waiting for your reply..

    Thank you


  33. Saranji says

    Hi Riyaz,
    While triggering an IDOC from ECC to PI, sometimes I’m getting the following error in SM58.
    “Trying to access row values in a table which does not have any rows yet”
    “Message no. SR053”
    We checked the JCo, java patchup and all. But unable to rectify the error.
    Please provide a solution.
    Thanks in advance.