on 04-12-2013 6:05 PM
I have this situation in a proxy to file/email scenario.
My date from the proxy can look like this:
<RECEIVER_ID>0002000135</RECEIVER_ID>
<EMAILID>foo@fooland.com</EMAILID>
or
<RECEIVER_ID>0002000135</RECEIVER_ID>
{no EMAILID NODE}
I need to route the data to an email (as an attachment) or to a file to be FTP'd. Notice the <RECEIVER_ID> node has the same value in both case. I need to make this determination based on the existance or non-existance of the <EMAILID> node. I read about a million blogs and web pages and what I found does not work.
I have tried as the Xpath rule for a file to be sent as
/p4:CustInvcWandPOS_MT/Records/RECEIVER_ID = 0002000135 AND
/p4:CustInvcWandPOS_MT/Records/[not(exists(EmailID))] EX
and
/p4:CustInvcWandPOS_MT/Records/RECEIVER_ID = 0002000135 AND
/p4:CustInvcWandPOS_MT/Records/[not((EmailID) EX
I have as the XPath for the email
/p4:CustInvcWandPOS_MT/Records/RECEIVER_ID = 0002000135 AND
/p4:CustInvcWandPOS_MT/Records/RECEIVER_ID EX
What happens is when there is no EMAILID node at all, PI is still trying to send out an email and not trying to send a file. I verified it was finding the [not(exists(EMAILID))] as invalid but finding the "send email" version as valid and failing, of course, as there is no EMAILID node.
Please help!
Hi Dave,
Is your scenario such that if Email exists then send as email otherwise file. You can have it such that if email ID exists then send to Email. After that , in your ICO,at the bottom select 'If no receiver found', send to file. You may also consult the below links:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could fill the email id in the mapping with a default value (e.g. dummy@dummy.com) and check for this value in your receiver determination..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Had ABAP change the data into the proxy so when there is no email address, they will populate with the word NONE. That I can look for in Standard Receiver Determination. Moving this interface to use Enhanced when time permits
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 try to make EMAILID mandatory (if custom proxy) and check it for not NULL. Just a suggestion... it may work.
cheers,
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Can you try these conditions?
For File
/p4:CustInvcWandPOS_MT/Records/RECEIVER_ID = 0002000135 AND
/p4:CustInvcWandPOS_MT/Records/[not(EmailID)] EX
For Email
/p4:CustInvcWandPOS_MT/Records/RECEIVER_ID = 0002000135 AND
/p4:CustInvcWandPOS_MT/Records/RECEIVER_ID/EmailID EX
http://stackoverflow.com/questions/767851/xpath-find-if-node-exists
Or if that does not work, try using the count as your argument e.g
For File
/p4:CustInvcWandPOS_MT/Records/RECEIVER_ID = 0002000135 AND
/p4:CustInvcWandPOS_MT/Records/[count(EmailID)<1] EX
For Email
/p4:CustInvcWandPOS_MT/Records/RECEIVER_ID = 0002000135 AND
/p4:CustInvcWandPOS_MT/Records/[count(EmailID)>0] EX
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I would suggest you to go with ERD (Enhanced Receiver Determination).You can comfortably achieve your req in ERD.
Regards
Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.