Skip to Content

SAP XI/PI: Alerts for tRFC(SM58) Errors

In my earlier Blog SAP XI/PI: Alerts for Queue Errors I showed how to trigger Alerts for SMQ1 & SMQ2 error. This Bog is an extension of it and l will show how to trigger Alerts for SM58 entries thru this.

It is common problem in the Integration project to look for messages that are stuck in the Queues very often. The Intension of my Blog on alert configuration for Queues is to avoid the complexity of monitoring the Queues regularly by automating the Monitoring and creating Alerts.

Transaction SM58 allows you to have control over the transactional RFC (tRFC) messages. tRFC call can end abnormally during the sending process because of various reasons like error with the sending data, error in the target system, problem to login to target system with the credentials maintained etc…

The messages that get stuck/fails in SM58 are retried with a schedule job for report RSARFCSE. If the messages can’t be delivered to the target system within a certain interval the status of the message is set as “SYSFAIL”.  All the tRFC calls are maintained in table ARFCSSTATE& ARFCSDATA and the successfully processed message entries are deleted from the table (this is why in SM58 you only see the error/executing entries and not the success one).

With this knowledge let us now look on the design for triggering Alert for SM58 entries.

Step 1 : Alert Category Creation

Create an Alert Category TRFC_ERROR with the following Containers.

Step 2 : Alert Definition

Add Message Title, Short, Long Text and your SAP logon id in Fixed Recipients list.

Stuck with Alert creation..? Refer Michal’s Blog  The specified item was not found.

Step 3 : Report Creation

Create a report Z_TRFC_ALERT in SE38.
The report logic is to read the table ARFCSSTATE for entries with status “SYSFAIL” for the past 5 minutes and trigger an alert for each entries if found.

Some times the IDoc or RFC triggered to SAP PI can get stuck in SM58 of the source system itself. So the same report can also be done in the sender R/3 or ECC system to retrieve alert only for the message that are triggered to SAP PI by filtering the message based on the RFC Destination name.

Step 4 : Scheduling

Schedule this report using SM36 to check and trigger alert time after time.

With this above four steps you are ready to receive an Alert message in RWB Alert Inbox as below and an email to the smtp address maintained for your SAP logon id in SU01.

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