Skip to Content
Author's profile photo Roberto Clemente

Asynchronous processing of third-party system messages in SAP ECC using WS-RM

The traditional use of web services in SAP ECC (Publish functions modules from SE37 transaction) has some disadvantages that in a lot of cases motivate the adoption of more complex solutions (file processing, middleware use, etc.).


In my opinion, the main disadvantages of traditional web service are:

  • Message Persistence does not exist. This makes impossible: Message monitoring (making error detection more complex), message reprocessing or cancelation.
  • Asynchronous message processing in order (EOIO) is not permitted. In a standard way, the calls to these web services are processed in parallel by the application server. In some cases,


Since SAP NetWeaver 7.0 SP 14, Web Services Reliable Messaging (WS-RM) has been introduced in ABAP stack. From the point of view of SAP systems integration, WS-RM provides reliable delivery of asynchronous messages using the SOAP protocol. The guide How To… Develop, Monitor and Debug WS Consumer and Provider provides details on how to configure WS-RM in SAP NW.


With WS-RM it is possible to process messages in order and also to persist them in the same persistence layer as the messages from SAP PI ABAP proxies. This has some important advantages: Message monitoring, message reprocessing or cancelation of erroneous messages.


But, how can we take advantage of WS-RM capacities for third-party system integration? In order to respond to this question, the next example simulates the sending of some messages from a web service traditional client through the soapUI tool to a SAP ECC.


First, we have configured our SAP ECC system (7.01 SP8 version) following the guide indicated above, and we have implemented a simple example service (ZEgpFmHolaMundoas, Asynchronous “Hello World in Spanish” 🙂 ) that receives a company code and stores it in a table.


The message sequence is the following:



  1. CreateSequence: Creates a sequence, with a queue associated for message processing.
  2. First message is sent. This message contains the sequence identifier created in the previous step and the data for our service (company code).
  3. Second message is sent, with different data (different company code).
  4. TerminateSequence: This message terminates the sequence created.

These steps are described with more detail below:


This message has the following structure:


<soapenv:Envelope xmlns:soapenv=”“>

     <soapenv:Header xmlns:wsa=”“>





<soapenv:Body xmlns:wsrm=”“>


<wsrm:AcksTo xmlns:wsa=”“>






For testing we used the soapUI tool. We didn’t check the flag “Enable/Disable WS-Reliable Messaging”, because we were simulating WS-RM sending messages individually:


The response received contains the identifier of the sequence created. This identifier must be used in the subsequent messages:


In SAP ECC, this sequence has been created, as we can see in SRT_TOOLS transaction, “Sequence Monitor” option:


This sequence has a queue associated, ready to process messages:


First Message:

In this message, the sequence identifier is indicated in field Identifier, and the Body tag contains the message for our service:


<soapenv:Envelope xmlns:soapenv=”” xmlns:urn=”urn:sap-com:document:sap:soap:functions:mc-style”>

     <soapenv:Header xmlns:wsa= xmlns:wsrm=”“>
















The response received is an acknowledgment message (ack) that indicates the message has been successfully enqueued for its processing.


In SAP ECC, the sequence status has changed:



The message processing can be monitored from SXMB_MONI transaction. This represents one of the main advantages of this solution:



From this transaction it is possible to see the message content:



If an error occurs during the asynchronous processing, it is possible to restart the message processing or cancel it with the following buttons:



Second Message:


This message has the same structure of the first message. The only changes are the message number (field MessageNumber) and the body of the message (company code).


The message is processed in the same queue as the first message, and we can also monitor it in SXMB_MONI transaction:





Finally, once the messages have been sent, it must be necessary to terminate the sequence with the following message:


<soapenv:Envelope xmlns:soapenv=”“>

     <soapenv:Header xmlns:wsa=”“>





     <soapenv:Body xmlns:wsrm=”“>






In SAP ECC, the sequence status has changed again, and it will be deleted by the execution of a batch process:


Next links provide more information about WS-RM protocol and web services in SAP:

Assigned Tags

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

      Hi Roberto,

      thanks for your clear blog.

      I need a monitor for synchronous Web service(Publish functions modules from SE37 transaction) .

      can you help me?!

      thanks in adevance.



      Author's profile photo Roberto Clemente
      Roberto Clemente
      Blog Post Author

      Hi Claudio,

      As far as I know, you can't monitor these web services 🙁

      You can see the errors in the ICM Monitor (SMICM transaction), and monitor the workload and statistics in the workload monitor (ST03N transaction), but you can't monitor the payload and details of the messages.



      Author's profile photo David Encinas Fernandez
      David Encinas Fernandez

      Hi Roberto,


         Did you manage to get this working with authentication enabled? SOAPUI is not sending the user and password for the first soap messages (start sequence) so I always get login errors.

         Thanks in advance,


      Author's profile photo Roberto Clemente
      Roberto Clemente
      Blog Post Author

      Hi David,

      We worked with authentication disabled, because we used a test system.



      Author's profile photo Rodrigo Castro
      Rodrigo Castro

      Que bueno Roberto!

      Con dibujos y todo!

      Un abrazo!

      Author's profile photo Former Member
      Former Member

      Nice blog for people starting on WS-RM in ABAP.Thanks.

      Author's profile photo Former Member
      Former Member


      I am trying to access an enterprise service delivered by SAP from SOAP UI.

      I have enabled the all the settings that you have mentioned SRT_ADMIN_CHECK is green

      I have not enabled WSRM in SOAP UI, i have used your create sequence in the request.

      I keep getting this error "Only the anonymous value for wsrm:AcksTo is supported"

      Any clues ?

      Also when i enable WSRM and WSA in  SOAP UI and try the same i can see that first SOAP UI tries to createsequence then 2nd and 3rd step mentioned here.
      There i get a "HTTP 401 Unauthorized."

      I have created a service endpoint with BASIC auth in SOAMANAGER.

      Could you please give some pointers?



      Author's profile photo Claudio Capra
      Claudio Capra

      Hola Roberto,

      do you think it's possible to define a Queue Name(BGRFC) from a parameter of a provider asyncronouns web service?

      Thanks in advance