Skip to Content

       The life cycle of the message is explained in detail by taking an example scenario. The file is picked up by the Sender File adapter and the data is inserted into DB table by Receiver DB Adapter.

       The adapter engine uses the messaging system to log the messages at every stage. This log is called the Audit Log. The audit log can be viewed from the runtime work bench (RWB) to look into the details of the lifecycle of the message. During our journey we will also have a look at the messages that are logged at different stages.

Note: This article is targeted for the newbie’s who want to understand the message flow in Adapter Engine. So the insight into the message lifecycle is provided here by taking only the Technical adapters (File/ JDBC/ JMS/ Mail) into consideration. It doesn’t delve into the lifecycle of the messages that have reached XI Adapter Engine using RNIF/ BC/ CIDX adapters.

  1. image

    Fig1. Message flow from Adapter Engine to Integration Server

  2. For the message to be picked up by the communication channel, the channel should be associated with a sender agreement. Mere creation of a communication channel doesn’t ensure the message to be polled and picked up by the adapter. The message reaches the adapter in its native message format. As the communication in SAP XI happens in XI message format, a module inside the adapter converts the message in native format into XI message format.
  3. During this process, a message ID is generated for the message. To build the XI header (sender agreement details like the sender system, sender message interface and the interface namespace) the details are fetched by performing a CPA lookup(collaboration-partner-agreement are the configuration object details that have been created using the configuration time. The details are updated into the runtime cache when you activate the Configuration objects in Integration builder –Configuration time. This cache is referred to as CPA cache).
  4. This message is then sent to module processor for further processing. During the process of sending the message to module processor, the message “Application attempting to send an XI message asynchronously using connection AFW” is logged.
  5. The module processor performs steps like structure conversion, communication channel specific conversions (that have been specified in the “module tab” of the adapter channel). These conversion modules are executed in the same sequence as mention in the communication channel.
  6. After the successful execution of the conversion modules, the appropriate module (call SAP adapter module) of the module processor is called which will send this message for persistent storage. This message is put into the Send Queue of the messaging system for further processing. Messages like “Message trying to put into the send Queue” and “Message successfully put into the queue” are logged during this process. A confirmation message (success/ failure) is sent back to the sender application at this stage. This confirmation message is used by the channel to perform various steps like deleting the file that has a processing mode as delete.
  7. The message that has been put in the Send Queue has to be picked up and sent to the Integration Engine. The Adapter Engine and XI Integration server use XI Adapter for internal communication purposes. So the XI Adapter picks up message from the send queue and parses the XI message. In this process, the status of the message is set to DLNG and. Messages like “The message was successfully retrieved from the send queue and message status set to DLNG”are logged.
  8. The XI adapter performs a SLD look up (System landscape Directory) to find the Integration server with which the Adapter framework has register itself.
  9. On successful SLD look up, the message is sent via HTTP to the XI IS pipeline, using the pipeline URL (http://hostname:abap-httpport/sap/xi/engine?type=entry). . If this is successful, a message “The message was successfully transmitted to endpoint http://hostname:8000/sap/xi/engine?type=entry using connection AFW” is logged and the message statues is set to DLVD means message has been successfully delivered to the endpoint( XI IS in this case)
  10. image

    Fig2. Audit Log of message during onward journey


The return journey commences when the IS has successfully processed the message and delivers it to the Messaging system using the URL “http://hostname:50000/MessagingSystem/receive/AFW/XI”

  1. imagebr>
    Fig3. Message flow from Integration Server to Adapter Engine
  2. When the Integration Server (XI IS) finishes processing of the pipeline steps (like receiver determination, interface determination and interface mapping), the message has to be delivered to the required Receiving system. So the XI Integration server will send the message to the messaging system of the Adapter Engine (AE) using the mentioned above. Once the message is successfully received by messaging system, the message “The message was successfully received by the messaging system. Profile: XI URL: http://hostname:50000/MessagingSystem/receive/AFW/XI” is logged.
  3. As discussed Integration server and Adapter Engine use XI adapter for internal communication purposes. So the XI message that has been received by the messaging system URL is parsed by the XI Adapter’s protocol handler.
  4. The XI message is put into the receive queue and persisted. During this stage messages like “Using connection AFW. Trying to put the message into the request queue; Message successfully put into the queue.” are logged.
  5. The XI messages that are put in the receive queue are retrieved by an application (Worker thread) and are sent to AFWListenerBean. AFWListenerBean is a module (an EJB) in Adapter Engine that is capable of parsing the XI message. On successful receive of the XI message by the AFWListenerBean, messages like “The message was successfully retrieved from therequest queue.” are logged and the status of the XI message is set to DLNG.
  6. The AFWListenerBean reads the receiver agreement and the corresponding channel from the XI header to determine the appropriate adapter. In this stage the adapter channel is logged in the audit log. “Delivering to channel: XYZ_Channel”
  7. The message is forwarded to the module processor where additional steps like structure conversions and extra modules specified in the adapter are performed.
  8. The exit module is called and the message is sent to the appropriate adapter (DB Adapter in this case). The format conversion will be executed within the specific adapter and sent to the Receiving system (DB in this case) using the channel that has been determined by the AFWListenerBean and the required action is reformed (select statement is performed in this case). On successful processing of the message the status is set to DLVD.
  9. image

    Fig4. Audit Log of message during return journey


This blog should help you in understanding the complete life cycle of the message in XI.

I thank my team members Mr. Varun Joshi & Mr. Arpit seth, for helping me in the collaborative study and also Mr. Sudhir Porumamilla for his excellent architectural inputs.

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Julia Segnitz
    First of all, this is a very nice description of the message flow! One question remains for me: in Step 7 of the message flow from the AFW to the IS you explained that the IS URL is retrieved from the SLD. However, in Fig. 1 you illustrated that the value is retrieved from the CPA Cache. My question thus is: is the IS URL from the SLD cached in the CPA Cache?
    1. Ram Nagireddy

      What is AFW stands for can you explain bit more about that.
      This message is then sent to module processor for further processing. During the process of sending the message to module processor, the message “Application attempting to send an XI message asynchronously using connection AFW” is logged


  2. Jochen Reitzig
    Thank you for the comprehensive insight. Do you have any link to a resource describing the module programming to edit the message structure to my liking ? Thx, Jochen
  3. sudeep dhar
    hi this was extremely hekpful and descriptive…
    is it possible to provide a blog for the describing audit/message log and the process in the abap stack…….. i mean to say the SXMB_MONI… coz i find it difficult to understand all the fields in an entry in the SXMB_MONI
  4. sap abap
    what is DLNG and DLVD?

    It’s very good blog..and very good information about the messages in Adapter framework..

    May i know What is DLNG and DLVD?

    Thanks and Regards,

  5. Does the message Id change between the AE and IE.

    That means does the IE generate a new message id in case of an inbound scenario

  6. srinivas kapu
    The message flow is eaxplained in detail and it is intresting to know that IS and AE intercat with the help of XI adapter internally.
  7. Shweta Singh
    Hi Siva,
    Excellent Blog!

    I have some question regarding XI MDM Integration. If I m sending data from ECC system to XI, and then from XI to MDM, then after the pipeline steps are executed by the XI IS, how does the message go further to MDM? What are the components involved in delivering the message to the MDM system from XI IS?

    Thanks in Advance,


Leave a Reply