cancel
Showing results for 
Search instead for 
Did you mean: 

Alerts with runtime exception generated in UDF

Former Member
0 Kudos

Hi All,

I have the following validation in a file:

If the numbers of records are not the same mentioned in summery record, should raise an error and stop the processing of file:

MY approach:

I have created one User Defined Function to validate this:

If file is valid according above condition then only, the outbound message will be created, otherwise it thrown exception:

I tried creating alert for sending this information.

My problem:

I’m able to send the alert information in which component the error has come..

But, what I want is “ generate alert with the runtime exception message”

Ex:

throw new RuntimeException("Error in File , Total number of 02 03 records is not equal to the total number of records in summary");

This particular message (created in message mapping) , I want to get in alert message:

Thanks,

venu.

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi venu,

Apart from using BPM there is no way you can get such Dynamic Content into your Alerts.

/people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated

If you are using Alerts without BPM, only the container variable in this link can be used.

http://help.sap.com/saphelp_nw04/helpdata/en/d0/d4b54020c6792ae10000000a155106/content.htm

Regards,

Bhavesh

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

in this particular case, i would probably go for an ABAP mapping instead of a graphical mapping, because you can raise Alerts from within ABAP programs. In the ABAP program you have to pass container elements such containing the number of records expected and the number of records. These container elements have to be defined in ALRTCATDEF transaction and can then be used to put the error text together.

Have a look at this link: http://help.sap.com/saphelp_nw04/helpdata/en/d0/5e073c8e56f658e10000000a114084/content.htm section "Triggering by Calling a Function Module directly".

Regards

Christine