You are on page 1of 10

8/9/2019 Understanding message flow in XI | SAP Blogs

Products
Products Industries
Industries Services and Support
Services Support Training
Training Community
Community Developer
Developer

Partner
Partner About
About

 
Ask a Question Write a Blog Post Login

Former Member
May 25, 2005 5 minute read

Understanding message ow in XI
Follow RSS feed Like

8 Likes 16,492 Views 16 Comments

       The life cycle of the message is explained in detail by taking an example scenario. The le 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 di erent
stages.

Note: This article is targeted for the newbie’s who want to understand the message ow 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.

ONWARD JOURNEY:

https://blogs.sap.com/2005/05/25/understanding-message-flow-in-xi/ 1/10
8/9/2019 Understanding message flow in XI | SAP Blogs

1.

Fig1. Message ow 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.
4. 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 con guration object details
that have been created using the con guration time. The details are updated into the runtime cache when
you activate the Con guration objects in Integration builder –Con guration time. This cache is referred to as
CPA cache).
5.
6. 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.
7.
8. The module processor performs steps like structure conversion, communication channel speci c
conversions (that have been speci ed in the “module tab” of the adapter channel). These conversion
modules are executed in the same sequence as mention in the communication channel.
9.
10. 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

https://blogs.sap.com/2005/05/25/understanding-message-flow-in-xi/ 2/10
8/9/2019 Understanding message flow in XI | SAP Blogs

put into the send Queue” and “Message successfully put into the queue” are logged during this process. A
con rmation message (success/ failure) is sent back to the sender application at this stage. This
con rmation message is used by the channel to perform various steps like deleting the le that has a
processing mode as delete.
11.
12. 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.
13.
14. The XI adapter performs a SLD look up (System landscape Directory) to nd the Integration server with
which the Adapter framework has register itself.
15.
16. 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)
17.

Fig2. Audit Log of message during onward journey

RETURN 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”

https://blogs.sap.com/2005/05/25/understanding-message-flow-in-xi/ 3/10
8/9/2019 Understanding message flow in XI | SAP Blogs

1. br>

Fig3. Message ow from Integration Server to Adapter Engine


2. When the Integration Server (XI IS) nishes 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. Pro le: XI URL:
http://hostname:50000/MessagingSystem/receive/AFW/XI” is logged.
3.
4. 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.
5.
6. 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.
7.
8. 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.
9.
10. 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”
11.

https://blogs.sap.com/2005/05/25/understanding-message-flow-in-xi/ 4/10
8/9/2019 Understanding message flow in XI | SAP Blogs

12. The message is forwarded to the module processor where additional steps like structure conversions and
extra modules speci ed in the adapter are performed.
13.
14. 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 speci c 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.
15.

Fig4. Audit Log of message during return journey

RESULT:
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.

https://blogs.sap.com/2005/05/25/understanding-message-flow-in-xi/ 5/10
8/9/2019 Understanding message flow in XI | SAP Blogs

Alert Moderator

Assigned tags

Retagging required | siva maranani |

Related Blog Posts

We are sorry but we are currently unable to retrieve related content.

Related Questions

We are sorry but we are currently unable to retrieve related content.

16 Comments

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

Former Member

December 14, 2005 at 5:09 am


First of all, this is a very nice description of the message ow! One question remains for me: in Step 7 of the
message ow 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?

Like (0)

Former Member

January 7, 2007 at 5:34 pm


Hi
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

https://blogs.sap.com/2005/05/25/understanding-message-flow-in-xi/ 6/10
8/9/2019 Understanding message flow in XI | SAP Blogs

ram

Like (0)

Former Member

October 29, 2007 at 2:17 am


Hi Ram,
AFW = Adapter FrameWork.

Revert if more clari cation is required.

Regards,
Amit

Like (0)

Former Member

February 6, 2007 at 2:36 am


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

Like (0)

Former Member

March 13, 2007 at 7:22 pm


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 nd it di cult to understand all the elds in an entry in the SXMB_MONI

Like (0)

Prabhu S

April 15, 2007 at 1:45 am


hi siva
how can we compare pipeline service with the message ow in this blog?

Like (0)
https://blogs.sap.com/2005/05/25/understanding-message-flow-in-xi/ 7/10
8/9/2019 Understanding message flow in XI | SAP Blogs

Former Member

September 9, 2007 at 8:59 pm


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,


Kumar

Like (0)

Former Member

October 25, 2007 at 6:03 am


DLNG-delivering
DLVD-delivered.

Like (0)

Former Member

November 21, 2007 at 6:47 am


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

Like (0)

Former Member

May 9, 2008 at 5:57 am


The message ow is eaxplained in detail and it is intresting to know that IS and AE intercat with the help of XI
adapter internally.

Like (0)

https://blogs.sap.com/2005/05/25/understanding-message-flow-in-xi/ 8/10
8/9/2019 Understanding message flow in XI | SAP Blogs

Former Member

November 18, 2008 at 10:36 pm

this blog is very nice

Like (0)

Former Member

November 18, 2008 at 10:36 pm


this blog is very nice

Like (0)

Former Member

December 21, 2008 at 8:41 am


the blog was very useful…thanks….

Like (0)

Former Member

April 13, 2009 at 10:23 pm


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,
Shweta.

Like (0)

Former Member

October 20, 2010 at 1:08 am


Thats and excellent blog with detailed information bout the pipeline steps.
https://blogs.sap.com/2005/05/25/understanding-message-flow-in-xi/ 9/10
8/9/2019 Understanding message flow in XI | SAP Blogs

Like (0)

Hari Sonnenahalli

September 17, 2015 at 5:07 pm


Awesome explanation.

Thanks

HS

Like (0)

Share & Follow

Privacy Terms of Use

Legal Disclosure Copyright

Trademark Cookie Preferences

Sitemap Newsletter

https://blogs.sap.com/2005/05/25/understanding-message-flow-in-xi/ 10/10

You might also like