Skip to Content
Author's profile photo Former Member

SAP PI 7.31 : ABAP proxy monitoring and Alerting using CBMA

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 🙂

Assigned Tags

      16 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      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 ?

      Author's profile photo Former Member
      Former Member
      Blog 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

      Author's profile photo Former Member
      Former Member

      Thanks. I will try to implement this in my project....

      Author's profile photo Former Member
      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

      Author's profile photo Venkata Rama Krishna Raju mudunuri
      Venkata Rama Krishna Raju mudunuri

      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.

      Author's profile photo Former Member
      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

      Author's profile photo Former Member
      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.

      Author's profile photo Former Member
      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.

      Author's profile photo Jens Schwendemann
      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

      Author's profile photo Former Member
      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.

      Author's profile photo Matthias Lüthi
      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

      Author's profile photo Apu Das
      Apu Das

      Need to create for each back end ECC system.

      Author's profile photo Jens Schwendemann
      Jens Schwendemann

      Did you go that way (creating an resource adapter for each backend system) or did you find a smarter approach?

      Author's profile photo Sharada Prabhakar
      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

      Author's profile photo Ashish Goel
      Ashish Goel

      Hi,

       

      Will it work for Async proxy Fault ?

      If inbound proxy raises a fault , will alert be triggered in SAP PI (Single stack).

      Also, can we see the fault in SAP PI monitoring ?

       

      BR

      Ashish

      Author's profile photo Phani kumar malakapalli
      Phani kumar malakapalli

      Hello,

      i have same question as Ashish Goel. will it work for Async proxy fault??

      If inbound proxy raises a fault , will alert be triggered in SAP PI (Single stack).

      Also, can we see the fault in SAP PI monitoring ?

       

      i have done setup as given in blog and we are able to capture error but not for proxy fault why??

       

      Thank you.