With ABAP stack alerting it was possible to generate an alert using a function module which could be called from many different places (message mapping – RFC lookup, adapter module, abap proxy etc.). like shown in other blogs:
For Component Based Message Alerts we currently don’t have an API which would allow trigerring alerts. Does not mean however that we cannot easily create it on our own. In this article I will try to show a concept which shows how to create a simple “API” for generating custom alerts in CBMA.
Create HTTP callable integration flow which will server as an alert service.
a) create an integration configuration (ICO) flow which will always fail (for example wrong condition in receiver determination)
b) use a XML structure which will hold all the information details which you want to see in the alert monitoring for example:
c) as we want to be able to call this “API” from many different places use SOAP (HTTP) as an outbound adapter (this way we can call it from majority of the applications)
d) create an alert rule where you add the ICO created above as an object to be monitored and make sure you select the field “Payload in alert” is set to enabled
e) create user defined message search on the outbound service interface for all important fields which need to be monitored
a) call the your ICO via HTTP from any kind of tool (like soapui) and populate the xml with the alert related info.
b) inside the Message Monitor you should be able to see all relevant details as shown below
c) when you receive the alert it should also contain all the important information (as user defined attributes) which you wanted to pass to the alert
This is the alternative way to be able to receive all kinds of alerts with alert specific information.
Drawback : Clean up jobs.
If you use this approach you need to remember to take care of the failed messages (cancel them) as in standard failed messages will not get archived.
How to use CMBA – Michal’s PI tips: Component-Based Message Alerting