Skip to Content
0

Containt based conditional Interface determination using xpath expression

Dec 05, 2016 at 06:30 PM

57

avatar image

Hello experts,

I am facing issue while checking content based condition in interface determination.

I have scenario where if particular LF and AG is present in IDOC then separate mapping will be executed and for rest of the customers (LF & AG ) another mapping will be executed.

IDOC structure

Condition

Xpath Condition:

E1EDKA1[PARVW=LF]/PARTN =3020400000105
AND
E1EDKA1[PARVW=AG]/PARTN =3020400000100 OR
E1EDKA1[PARVW=AG]/PARTN = 95750460800515 then New Mapping

Else existing mapping

I tried few things but they didnt work for my entire condition it work only if i provide LF part or only AG part ie only one condition.

Below is sample Solutions which I tried but didn't work at all

Sol 1

Sol 2

idoc-structure.png (23.3 kB)
solution2.png (17.4 kB)
sol1.png (2.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Evgeniy Kolmakov Dec 06, 2016 at 07:11 AM
0

Hi Chetan!

As for your IDoc data, it could look like this:

//IDOC[E1EDKA1[PARVW="LF"]/PARTN="3013599000105" and (E1EDKA1[PARVW="AG"]/LIFNR="3020400000100" or E1EDKA1[PARVW="AG"]/LIFNR="95750460800515")] EX

//IDOC[E1EDKA1[not(PARVW="LF"]/PARTN="3013599000105" and (E1EDKA1[PARVW="AG"]/LIFNR="3020400000100" or E1EDKA1[PARVW="AG"]/LIFNR="95750460800515"))] EX

Not sure about E1EDKA1[PARVW="LF"]/PARTN value as the value from given IDoc differs from example above. Change it accordingly, if needed.

Regards, Evgeniy.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Ok, than change value from 3013599000105 to 3020400000105 for E1EDKA1[PARVW="LF"]/PARTN.

Regards, Evgeniy.

0
Evgeniy Kolmakov Dec 06, 2016 at 03:04 AM
0

Hi Chetan!

If I understand your requirement right:

E1EDKA1[PARVW=LF]/PARTN =3020400000105 AND (E1EDKA1[PARVW=AG]/PARTN =3020400000100 OR
E1EDKA1[PARVW=AG]/PARTN = 95750460800515)

and assuming that E1EDKA1 segment is under IDOC segment, your condition could look like this:

New mapping: //IDOC[E1EDKA1[PARVW="LF"]/LIFNR="3020400000105" and (E1EDKA1[PARVW="AG"]/LIFNR="3020400000100" or E1EDKA1[PARVW="AG"]/LIFNR="95750460800515")] EX

Existing mapping: //IDOC[not(E1EDKA1[PARVW="LF"]/LIFNR="3020400000105" and (E1EDKA1[PARVW="AG"]/LIFNR="3020400000100" or E1EDKA1[PARVW="AG"]/LIFNR="95750460800515"))] EX

Regards, Evgeniy.

Show 5 Share
10 |10000 characters needed characters left characters exceeded

Thanks for inputs but its not working irrespective of any LF and AG it is picking old mapping

Logic for New mapping

Logic for old (existing mapping )

not-working.png (8.4 kB)
not-working1.png (7.9 kB)
0

Wouldn't you please attach XML with your IDOC data?

Regards, Evgeniy.

0

Sure please find attached IDOC xml in txt format as XML is not supported

francetest.txt

francetest.txt (2.8 kB)
0

Is it IDoc, that should be processed with new mapping? Or with the old one?

Regards, Evgeniy.

0

old mapping should be executed as LF is not equal to 3020400000105

0