on 07-13-2017 2:16 PM
HI All ,
I have a small doubt what to use in the Xpath configuration for my requirement !
Requirement : we have to split the file by Infotype 45 , so in the IDOC if Infotype 45 exist there should be one file name or else another should occur .
So I have used the X path Configuration :
/ZHRMD_XX01/IDOC/E1PLOGI/E1PITYP[count(Z1P0045) = 0]
/ZHRMD_XX01/IDOC/E1PLOGI/E1PITYP[count(Z1P0045) > 0]
with the Operation as EX .
But the Logic is failing 😞
Please Help me where exactly am doing wrong .
Regards,
Vijender
Hi Vijender!
Try this:
/ZHRMD_XX01[count(IDOC/E1PLOGI/E1PITYP/Z1P0045) = 0] EX
/ZHRMD_XX01[count(IDOC/E1PLOGI/E1PITYP/Z1P0045) > 0] EX
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot Evgeniy !
It is Working 🙂
Regards,
Vijender
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see, you have lots of occurences. Try:
//ZHRMD_XX01/IDOC/E1PLOGI/E1PITYP[not(Z1P0045)]
//ZHRMD_XX01/IDOC/E1PLOGI/E1PITYP/Z1P0045
Could you please specify which output you expect and which one you get?
EDIT: Maybe "//Z1P0045" would be enough? This way you would get true if the element exists somewhere in the document. I am not sure though about the performance if messages are really big or there are lots of them.
Hi Vijender,
try using the not() operator, together with EX operator:
/ZHRMD_XX01/IDOC/E1PLOGI/E1PITYP[not(Z1P0045)]
/ZHRMD_XX01/IDOC/E1PLOGI/E1PITYP/Z1P0045
Also, please provide an example, so we can analyse it further.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
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.