on 05-13-2009 7:09 AM
Hi,
My sceanrio is Asynchronous.
Sender & receiver datatype is like this
HEADR
HedgId
ItemNo
ITEMDDATA
Month
Vol
Hsfo
conditions are:
1). If above fields are come to blank, alert will tigger and send that alert to Alert box. ( Header details how can i make it mandatory in XI can i give occurances are 1:1). & if the field value is empty how can send the alert to alert in box.
2). At least one Itemdata is mandatory. if there is no item data in this messge xi hase to send the altert to aertbox.
please let me no how to do this.
Hi,
>>1). If above fields are come to blank, alert will tigger and send that alert to Alert box. ( Header details how can i make it mandatory in XI can i give occurances are 1:1). & if the field value is empty how can send the alert to alert in box.
yes. you can make it mandatory by changing occ to 1:1. You can create a alert for mapping exception. If you input file does not have the mandatory field it will fail in mapping and the alert will be triggered, however if your field occurs in source with an empty value it would pass the mapping. If this is the case you may check for the field value in the UDF and trigger alert as from UDF . Refer blog [Triggering XI Alerts from a User Defined Function|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/4077] [original link is broken] [original link is broken] [original link is broken];
>>2). At least one Itemdata is mandatory. if there is no item data in this messge xi hase to send the altert to aertbox.
Make the occurance to 1:unbounded. With no item data message will fail in mapping and would trigger an alert.
Thanks,
SaNv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I assume your target is of occurrence 1:1 i.e mandatory.
So what you can do is have a UDF that will check if the input value is an empty string and if it is then pass out a suppress value. Since a suppress value is encountered at a mandatory target element, the mapping will fail and you can have your alert triggered.
the code for the UDF to do the above check will be something like below;
for(int i=0; i<a.length;i++)
{
if (a<i>.equals(""))
{result.addSuppress();}
else
{result.addValue(a<i>)}
}
More @ - http://help.sap.com/saphelp_nw04/helpdata/en/7d/028c4057d5701de10000000a1550b0/content.htm
>>If the field occurs in source with an empty value it would pass the mapping. but in my case if no value in that field it has to fail and send a alert message to alert inbox.
You would require to check in the UDF for empty value and throw alert. Alter and easier would be check the value and suppress it as suggested by shabarish.
Thanks,
SaNv...
Hi,
Please refer the following blog:
/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
Regards,
Manjusha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
one way to do this is use a BPM.....
check for the existence of the node or check for a value in the node using a switch branch...use a control step within the same switch-branch to raise an alert....similarly you can check for Itemdata...
I suggest this way only if:
1) you are flexible to use a BPM
2) if the number of fields which you want to check is not large and also not varying
Please note that only the first occurence will be checked....the remaining nodes wont be checkd for node exeistence
Regards,
Abhishek.
Edited by: abhishek salvi on May 13, 2009 11:47 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.