on 05-14-2008 11:51 AM
Dear Experts,
This is a concern regarding sending Alert to users by mail in XI.
IDOCs are reaching XI.The validations are not done in the Sender Side.
For a certain field of the IDOC, the permitted values are 2/3/4 . If user passes some other values or a blank value , an Alert mail needs to be triggered .
We have succeeded in sending alert for failure of a particular Interface, but we have no idea , how to read certain field of a message interface and how to trigger the alert on that basis.
Please suggest.
Regards,
Navneet
Hi,
We have succeeded in sending alert for failure of a particular Interface, but we have no idea , how to read certain field of a message interface and how to trigger the alert on that basis.
For raising an alert you need to first configure the alert please follow the below weblog written by Michal Krawczyk
/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
Configuration steps are: go to transaction ALRTCATDEF
1) Define Alert Category
2) Create container elements which are used for holding an error messages.
3) Recipient Determination.
Raise an alert after checking whether the data 2/3/4 using the below method. all has to be done inside ur mapping..
1) Triggering by Calling a Function Module Directly.
/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
chirag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can trigger the exception explicitly by using
throw new RuntimeException("This occurred to trigger an alert");
You can simply configure alerts in ALRTCATDEF and it should trigger the alert.
/people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping
/people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
Have a look on Bhavesh Reply also
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can use udf
package com.guarneri.xi.mapping.udf;
public class CustomMappingException extends RuntimeException {
public CustomMappingException() {
super();
}
public CustomMappingException(String message) {
super(message);
}
public CustomMappingException(Throwable cause) {
super(cause);
}
public CustomMappingException(String message, Throwable cause) {
super(message, cause);
}
}
Throwing Smart Exceptions in XI Graphical Mapping
/people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
Use a UDF to throw the alert. Have a look at Bhavesh's weblog on how to do this.
/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
package com.guarneri.xi.mapping.udf;
public class ExceptionThrower {
public static void fire(String message) throws CustomMappingException {
throw new CustomMappingException(message);
}
}
Here the UDF will throw if the input a has blank or does not contain permitted value 2/3/4
imports com.guarneri.xi.mapping.udf;
function myudf(String a, Container container)
{
if (a.length==0 || a.trim().length()==0)
ExceptionThrower.fire("Blank input");
int num[]={2,3,4};
int flag=0;
for(int i=0;i<num.length;i++)
{
if (a!=num<i>)
flag=1;
}
if (flag==1)
ExceptionThrower.fire("Permitted values are 2/3/4");
else
return a;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Triggering Alerts
http://help.sap.com/saphelp_nw04/helpdata/en/49/cbfb40f17af66fe10000000a1550b0/frameset.htm
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide
Hope it is helpful........
Thanks,
Madhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.