Skip to Content

Containt based conditional Interface determination using xpath expression

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


Xpath Condition:

E1EDKA1[PARVW=LF]/PARTN =3020400000105
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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Dec 06, 2016 at 07:11 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 06, 2016 at 03:04 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded