cancel
Showing results for 
Search instead for 
Did you mean: 

Not function in XPath Receiver Determination

Former Member
0 Kudos

Hi Guys,

Could you please advise on the correct syntax for Not() function in XPath Receiver Determination for PI? I am trying several statements but none of them works:

not(/ZMDPU_ORDERS05/IDOC/E1EDP01[1]/E1EDP19/IDTNR[contains(.,"|")])

/ZMDPU_ORDERS05/IDOC/E1EDP01[1]/E1EDP19/IDTNR[not(contains(.,"|"))]

Please note that the XPath statement part without the Not function, works just fine, i.e.:

/ZMDPU_ORDERS05/IDOC/E1EDP01[1]/E1EDP19/IDTNR[contains(.,"|")]

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Evaggelos,

I am using not contains extensively in our pi environment here and it is working perfectly fine as you explained in 2nd example:

/ZMDPU_ORDERS05/IDOC/E1EDP01[1]/E1EDP19/IDTNR[not(contains(.,"|"))]

Can you make sure that multiple occurrence of the IDOC segments is not causing any issue here.

Regards,

Anurag Mahendru

Former Member
0 Kudos

Hi Anurag,

That was the root cause of the problem, i.e. the multiple occurrences check of the Idocs segments which was not required when we explicitly refer to a segment at a specific position. The issue has been solved now. I already assigned reward points

Answers (1)

Answers (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Can you try using single-quotes instead of double-quotes? In the example stated here, the contains operation uses single quotes

http://www.w3schools.com/xpath/xpath_functions.asp#string

Hope this helps,

Mark

Former Member
0 Kudos

Hi Mark,

Thank you for your reply but that was not the problem.