Skip to Content

Alerts can help us so much with the monitoring of the Exchange Infrastructure. Till now there are Blogs, which tells how to create alerts for Monitoring Errors, Imagine the luxury of Alerts being created for the errors in Inbound and Outbound Queues.

In most of the support projects it is always a mechanical task to check for errors in Queues (SMQ1 & SMQ2) very frequently. An Alert creation for this task will less the burden of queue monitoring and will enrich the usage of the alerts in monitoring space.

Through this Blog I would walk through with the steps to create Queue Alerts. The task here is broken into two-piece.

1. Programming with the qRFC API to obtain the Queue Information.

2. Alert Category creation and triggering Alerts from the Program.

qRFC API’s :

TRFC_QOUT_OVERVIEW – This function module gives an overview of the current outbound queues that exist for various optional import parameters, for example, queue name, destination, SAP client.

TRFC_QIN_OVERVIEW – This function module gives an overview of all the inbound queues that currently exist for various optional import parameters, for example, queue name or SAP client.

Alert API:

SALERT_CREATE – This Function module is used to create alert by importing parameters like alert category, Container name and its value.

Let us now look at the steps to create queue alerts.

Step 1:

Create an Alert Category QUEUE_ERR (T-Code: ALRTCATDEF) with the following Containers.

Step 2:

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

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

Step 3:

Create a report Z_QUEUE_ALERT in SE38.

Copy paste the below source code to check the queues and create Alert for queues with the Status SYSFAIL.

Step 4:

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

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

To report this post you need to login first.


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

  1. Former Member
    Definitly a good one. I was looking out for a easy solution than configuring CCMS.

    I think there is typo, you have mentioned to create report in SM38.


  2. Former Member
    Thanks a lot for the wonderful blog, this really eased my life in the current support assignment where I need to run through SMQ1 and SMQ2 every hour on three different instances.

  3. Former Member
    Looks like a quick alternative to configuring CCMS.
    Just one omission, what would you set as the alert rule? If you’d set a rule with no restrictions any alert in PI will result in an e-mail about a qRFC error.


  4. Volker von Gloeden
    Everybody enjoying this blog should also have a blog from Johannes Fleig in 2008 which describes an even easier and more flexible qRFC alert monitoring with the help of Business Process Monitoring in SAP Solution Manager.

    New Business Process Monitoring functionalities in SAP Solution Manager – qRFC Monitoring

    No need to program an API. You get the following key figures out of the box

    Status Monitoring

    •          Number of entries with critical status in group

    •          Age of oldest critical status in group

    •          Combination of “Entries” and “Age” in critical state

    •          Number of entries with interim status in group

    •          Age of oldest interim status in group

    •          Combination of “Entries” and “Age” in interim status

    Backlog monitoring

    •          Number of individual queues in group

    •          Total number of entries in all queues of group

    •          Average number of entries per queue in group

    •          Maximum number of entries per queue in group

    •          Age of oldest entry in group

    •          Combination of “Total entries” and “Oldest age”

    Or you visit –> Media Library –> Technical Information –> Setup Guide for Interface Monitoring.pdf

    and learn more about qRFC, tRFC, IDOC, File, Batch Input and XI/PI monitoring with BPMon.


  5. Former Member

    Any one can find several blogs on how to create alert for errors coming in SAP PI but this blog is quite different and really very helpful.

    Good Work Santosh… keep it going.


    Sandeep Sharma

  6. Former Member

    Hi Santosh,

    Is this still works in new PI (PI 7.30 onwards) environment?

    In runtime workbench, do you still have to create a rule for it? Any specific details with the rules if mandatory since the program only refers to queue not related to PI interfaces?



  7. Former Member

    Hi Santhosh.

    Very nice. I followed the howto, but the alerts that I received not show the content of container: ZDIR, ZQUEUE, ZQUEUE_NO and ZERROR.


    My container has this:

    And my text describe this:

    What can I be doing wrong? Can you help me?





Leave a Reply