Synchronous and Asynchronous communication

While testing last month a new solution with a client, one of my team members asked me a following question:

Why there are only asynchronous messages present in srt_util or sxi_monitor? What about the synchronous communication?

I remember the same question occurred to me when I was using those transactions for the first time but back then I never had the time to check it, until now.

Typically, if we want to see the payload along with a status of message sent from/to SAP system we go to one of the transactions specified in the question or to the monitoring tab in the SOA Manager. Those transaction shows the same logs so its only question of habit where you decide look. However as mentioned in the official SAP Sources (3-5) normally they will only show asynchronous communication messages, which are configured in the standard srt_util -> Error Log -> Global configuration and would probably look like this on your SAP system:

There aren’t too many options here as far as you can see and nothing for the synchronous ones, so the next transaction you would visit following an internet advice would be the SXMB_ADMIN. Here as explained perfectly on one of the SAP blogs (1) you can in the section Configuration -> Integration Engine Configuration -> Configuration specify a special parameter called LOGGING_SYNC and TRACE_LEVEL to 1 and 3 respectively to finally see the synchronous messages in SXI_MONITOR.

However as mentioned in the SAP Note (6) this setting should be only used as a last troubleshooting option (and it’s easier to ask the sender for the message payload if possible anyway) since it might consume large amount of space and also cause various performance issues. Moreover it also won’t show any messages prior to setting this option.
There actually exist a clever modification of this method which tries to mitigate this problem that was mentioned on another sap blog (2). In the same transaction SXMB_ADMIN in the section Administration -> Error Analysis Settings, you can specify various conditions that will limit or even start logging of the messages in certain conditions. Additionally, by default the expiry date is always set (24h normally), which in case you forget about the rule it won’t cause system logs to overflow. With this setting the messages might get logged even if the parameters in previous configuration are turned off.

The last method that I won’t go into the details here are the traces, which when enabled allow us to log communication on several levels. This setting can be activated in the transaction srt_util, from which we started this long research, for a limited amount of time (1h normally). How to enable/set them and afterwards analyze the logs is best explained in the official SAP tutorial (3).

Is that all? From the standard side yes, but actually like with everything in the SAP ecosystem there is always one more way, which is of course writing a custom log for this purpose. Sounds like an overkill? Might be in some situations, but actually there are several scenarios where it can be really useful, especially if you might need to check communications older than a month, which is a standard retention period. However, like with every custom solution you would need to check with the client if the costs of introducing such implementation and its maintenance later on are worth it.
Spoiler: If you have some web services which might be hard to check with the other side, because they are unwilling/slow or you want to avoid cooperation above necessary level altogether, the answer to this question is yes.

Conclusion

So in the end what is the best place to check out your synchronous messages on a standard SAP GUI instance? The answer that I came up with is unfortunately nowhere. However there are a few ways to achieve it if you really need them like putting on the trace, switching the LOGGING_SYNC parameter (which as a reminder shouldn’t be overused on any environment, especially productive on), trying the modified version of it with Error Analysis Setting or making a custom log on the system that would store the data. Otherwise you can always ask the person/company that sent the communicate for the full payload or check it on the PI/CPI if it was sent through it and is in the retention period.

Sources:

  1. https://blogs.sap.com/2005/05/10/xi-i-cannot-see-some-of-my-messages-in-the-sxmbmoni/
  2. https://blogs.sap.com/2007/04/30/xipi-personalized-logging-tracing/
  3. https://help.sap.com/doc/saphelp_nw73ehp1/7.31.19/en-us/2f/9eddbb74b84775931ca9f2297c77be/frameset.htm Web Service Logging and Tracing
  4. https://wiki.scn.sap.com/wiki/display/ABAPConn/ABAP+Web+Service+Monitors
  5. SAP Note 1575707 – ABAP Web Service Connectivity
  6. SAP Note 2167673 – High growth of PI table SXMSCLUP

Leave a Comment

Your email address will not be published. Required fields are marked *