Skip to Content

Many of you aware of a new feature in SAP PI 7.31 which is Component Based Message Alerting ( CMBA) . You can find more information about CMBA in Michal’s blog at http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/03/25/michals-pi-tips-component-based-message-alerting

But there are some questions about components that runs on AS ABAP system ( ABAP proxies) .

  • Is it possible to capture ABAP proxy errors in SAP PI 7.31?  – Answer : Yes
  • Can we get alerts from CMBA for  such failures? – Answer YES
  • What are the configurations to be done in ECC and PI systems?    – Answer- There are some

The following steps should be done

1) Create an alert rule in PI for ABAP proxy components and activate the alert rule .

2) Create a TCP/IP connection named CENTRALMONITORINGSERVER-XIALERTS in ECC with program ID SXMS_ALERT_ERROR_RECEIVE

3) Create a RFC connection in PI .Points to ECC ( You can reuse your existing IDOC default destination as well )

4) Create JCO resource adapter + JCA connection Factory in NWA

Steps 2,3,4 should be done in each ABAP system which are connected to AAE/AEX.

Alert Rule in PI

The alert rule should look like this and I have two connected ABAP proxy systems.Make sure you checked ABAP Runtime option in Message Status Tab

/wp-content/uploads/2013/02/26_02_01_189441.jpg

TCP/IP connection in ECC

Create TCP/IP connection named as CENTRALMONITORINGSERVER-XIALERTS, Connection Type T with program ID as SXMS_ALERT_ERROR_RECEIVE and gateway host as PI system details. Please refer  OSS note 1584248.

This RFC will be used to send alert events to AAE/AEX system

/wp-content/uploads/2013/02/26_02_02_189442.jpg

I am reusing the default IDOC destination (i.e) XI_IDOC_DEFAULT_DESTINATION for this configuration hence step 3 is not required in my case. But you can create a new a RFC destination as per http://help.sap.com/saphelp_nw73/helpdata/en/C2/91865252C84716B3B8BE394851C9C0/frameset.htm.

JCO resource adapter + Connection Factory

Now there should some activities to be done in NWA.

-Go to Configuration–>Infrastructure –>Application Resources

     Create a New resource adapter

/wp-content/uploads/2013/02/26_02_03_189557.jpg

Select SAPJRATemplate

/wp-content/uploads/2013/02/26_02_04_189558.jpg

In application field , please enter value on your own for each ABAP AS system

/wp-content/uploads/2013/02/26_02_05_189559.jpg

Enter Unique Value for JNDI name

/wp-content/uploads/2013/02/26_02_06_189560.jpg

Please enter the following parameters

Program ID           : SXMS_ALERT_ERROR_RECEIVE

MaxThread Count  :  <Your own value ? Normally this should be 3

Gateway server     :  PI gateway Server

Gateway service    :  PI gateway Service

Destination name  : XI_IDOC_DEFAULT_DESTINATION

/wp-content/uploads/2013/02/26_02_07_189562.jpg

In the next step JCA connection Factory Set up, please enter the same JNDI name which you entered in the previous step

/wp-content/uploads/2013/02/26_02_08_189561.jpg

And in configuration Properties , enter the DestinationName (i.e) _IDOC_DEFAULT_DESTINATION

/wp-content/uploads/2013/02/26_02_09_189563.jpg

Thats alll 🙂

How to test

Please make sure you configured alert consumer+ email client configurations in NWA to receive the alert notifications as per Michal’s bolg

Create a alert event like simple stop Sender SOAP adpater in PI which is used to send ABAP proxy messages from ECC to PI and this will be throw an error message ” Channel Stopped by Administration Task ”   and wait for the alert consumer job to finish.

You could see the email alert in your inbox.

/wp-content/uploads/2013/02/26_02_10_189564.jpg

Original Source : http://help.sap.com/saphelp_nw73ehp1/helpdata/en/ce/d9b40646464dc78d750169d25d7278/content.htm

Thanks to Michal Krawczyk for his valuable inputs 🙂

To report this post you need to login first.

13 Comments

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

  1. Former Member

    Suppose we have asynchronous message going to ECC, message failed in ECC SXMB_MONI due to abap code. Data is transferred successfully from PI to ECC(No adapter error)

    Will it still raise an alert ? in Simple words… Will it send alerts for sxmb_moni error ?

    (0) 
    1. Former Member Post author

      >>>

      Will it still raise an alert ? in Simple words… Will it send alerts for sxmb_moni error ?

      Yes. It does. The alert event will be created for application error ( ABAP code) and System errors

      (0) 
      1. Former Member

        Hi Rajesh,

        It is a very nice blog. I wanted to get further information specific to ABAP proxy scenarios.

        I am proposing Forward error handling framework to handle exceptions related to all the inbound interfaces mainly proxy. I wanted to know how CBMA will complie with my requirement. I wanted to alert a user for proxy business or validation related errors.

        through FEH I am loggin an error message to Post processing office through ECH but also wanted to raise an alert to user.

        Appreciate your input on the same.

        Thanks

        Chirag

        (0) 
      2. Former Member

        Is there anyway to configure Alerts on PI 7.30, if the message fails in ECC SXMB_MONI. Currently, we are achieving this through the custom ABAP code in ECC proxy.

        (0) 
  2. Former Member

    Hi Rajesh,

    Thanks for the blog. It covers exactly what I am trying to acheive on my project.

    I have configured the ECC/PI connection as you described and this is functioning correctly. Additionally the alert rule has been defined. However when I try and raise an alert from ECC using function module SALRT_CREATE_API this fails with an RFC error ‘Rollback fault: Not defined type of Handler class’. Is this because I am not correctly raising the alert? We are running PI 7.31 single stack.

    Regards

    Ian

    (0) 
  3. Former Member

    Hi Rajesh,

       Great Blog. I tested same thing and it is triggering alerts for System errors and Not Application Errors. Can you please check and confirm are you receving alerts for Application errors in case of Synchronous scenario. I see Application error in SXMB_MONI but not getting alerts even I check job status in PI 7.31 NWA and following message getting “0 alerts had been consumed and aggregated successfully”.

    Please confirm.

    Regards,

    Venu.

    (0) 
    1. Former Member

      Hi Venu,

      I tried for same by configured everything as addressed above, but no alerts are generating as expected for both the error types system as well as Application.

      can you please suggest if any additional steps to be needed? or it will be great if you can list every step involved in this.

      Thanks..

      Regards,
      Siva.

      (0) 
  4. Jens Schwendemann

    rajesh shanmugasundaram / all: I’m curious about whether this setup is really necessary for ABAP receiver proxy systems > NW 7.31. Shouldn’t it be enough to switch to CBMA in transaction SXMS_IECONF via ALERTING_TARGET = 1?

    I find the helpfile a little missleading because one could assume that the steps you outlined in your blog would only be necessary when you want to connect a NW less than 7.31 to a CBMA PI environment (Integrating Alert Framework-Based Systems – Administering Process Integration (PI) – SAP Library)

    Many thanks and kind regards

    Jens

    (0) 
  5. Former Member

    Hi Rajesh,

    We have PI 7.4 dual stack and using CBMA for Alert mechanism.

    Receiving mails as expected for alerts generating with In PI when using default consumer as well as my own consumer.

    Completed all required configuration as addressed above to trigger alerts for ECC proxy (Inbound and Outbound) messages failed in SXMB_MONI with system and application errors.

    Unfortunately not generating any alerts. I have been verified using AlertRetrieveAPI if alerts are exist for any of my consumers but it says NO alerts.

    Can you please advise if there are any blockers that restricting alerts send to PI alert Engine? Or i am i missing any configuration?

    Thanks in advance,

    Regards,
    Siva.

    (0) 
  6. Matthias Lüthi

    Dear all

    Great Blog, thanks to Rajesh

    I still got a short question about the Integration of the backend Systems.

    Do I Need to configure for each backendsystem which i would like to connect to my PO System his own JCO ressource Adapter or can I use one for all my backendsystems?

    Thanks for help

    Matthias

    (0) 
  7. Sharada Prabhakar

    Dear all,

    . The alerts from SAP PI from sxmb_oni is working file. We wish the same to be implemented in ECC end.  I tried all the steps given in this blog.

    But from ECC the SM59 sink itself is generating error while testing.
    Ours is SAP ECC EHP6 FOR SAP ERP 6.0  and  SAP NetWeaver AS ABAP 7.31 .

    Thanks for the help

    Sharada

    (0) 

Leave a Reply