cancel
Showing results for 
Search instead for 
Did you mean: 

Alerts based on message payload condition

Former Member
0 Kudos

Hi All,

i have a scenario SOAP to RFC sync.

PI will receive  the request from the third party based on that request ECC will provide the response by execuiting the RFC.

generally RFC provides response with the status for the request like S = success,W= warrning,E= error.

when we got the response message from ECC with status "E" we need raise the alert.

i have gone through the some blogs

alert using UDF :http://scn.sap.com/community/pi-and-soa-middleware/blog/2006/07/25/triggering-xi-alerts-from-a-user-...

in this blog i have not found the java code for the UDF.

include payload in alert message body using BADI with out UDF & BPM:

http://scn.sap.com/people/amith.dharmasiri2/blog/2011/01/07/include-payload-values-in-exception-aler...

i need to raise an alert with out affecting mapping...

please let me know suggestions

thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mahesh,

  If you dont want to use UDF to create alerts, other option would be to fail the map on receiving response status "F". You can raise an exception in your mapping to fail the message and enable alert on this interface at integration engine to raise the alert.

http://scn.sap.com/people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphi...

http://scn.sap.com/community/pi-and-soa-middleware/blog/2007/04/26/xipi-throwing-generic-exceptions-...

Regards,

Amol

Former Member
0 Kudos

Hi Amol,

thanks for your reply.

i can use UDF but my  main concern is it needs to raise alert with out stoping mapping

please is there any UDF for this requirement.

is it possible......?

Former Member
0 Kudos

Hi Mahesh,

In that case, you will have to follow this blog-

http://scn.sap.com/community/pi-and-soa-middleware/blog/2006/07/25/triggering-xi-alerts-from-a-user-...

If you need java code to perform the RFC Look up. Then there is standard function RFC lookup under conversions(Assuming you are on PI 7.1).

Regards,

Amol

Former Member
0 Kudos

Hi Amol,

thanks for your quick reply.

yes i am using SAP PI 7.11.

here i have few queries.

1. do we need to write the UDF to pass the inpiut value status ( based on this value we need to raise the alert)

sample:

if (status== E)

then raise alert(message )(it may be container variable as per my understanding. correct me if i am wrong)

//message contains the detailed description about the error.

2) we need to call the RFC "SALERT_CREATE" which is in PI box how we need to import it.

3) do we need to use any communication channels here.

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

Create alert rule for this specific interface and create UDF to thorw mapping failure when desired response not received.

if you dont want mapping failure then use UDF or JAVA Mpaping in response mapping then trigger a email.

Best Regards,

Raj

Former Member
0 Kudos

Hi Raja sekhar,

thanks for your reply.

can you please provide the sample UDF code to trigger the alert with out stop the mapping.

my requirement is i have two fields from source which are status & Message.

status values will be "S","W" & "E"

if i got the value "E" for the Status field i need raise the alert which will contain the value of message field.

Former Member
0 Kudos

Hi Mahesh,

Yes, That's correct, Using Boolean functions based on status you can call RFC lookup.

for 2) & 3), Check this-

http://scn.sap.com/docs/DOC-3805

Regards,

Amol

Former Member
0 Kudos

Hi Amol,

its nice document.

now i am getting the alert message.

one last question is i have not getting the value which i passed to the value using filed message in alert mail.

do we need create the container element for the prticular filed in alert category?

thanks for your support amol i have given points to you.

Former Member
0 Kudos

Hi Mahesh,

  Try execute the FM in SE37 and check what values you are missing in the alert. I don't think you need any container element as the value is directly accessible from your source structure.

Regards,

Amol

Answers (0)