Skip to Content
avatar image
Former Member

Mapping exception

Hi Experts,

I have two receivers and my source xml needs route to receivers based on the condition.

If it goes to wrong receiver, I get mapping exception because of different logic.

Below are the conditions that i am using for routing, not sure i am getting errors. Please help me on this.

For ReceiverA:

(((/Source1/Data/Node/SubNode/Value = A) and (/Source1/Data/Node/DiffNode/SecondValue = "ABC" or /Source1/Data/Node/DiffNode/SecondValue = "DEF")) or ((/Source1/Data/Node/SubNode/Value = B) and (/Source1/Data/Node/DiffNode/SecondValue = "ABC" or /Source1/Data/Node/DiffNode/SecondValue = "DEF")) EX )

For ReceiverB:

(((/Source1/Data/Node/SubNode/Value = A) and (/Source1/Data/Node/DiffNode/SecondValue != "ABC" or /Source1/Data/Node/DiffNode/SecondValue != "DEF")) or ((/Source1/Data/Node/SubNode/Value = B) and (/Source1/Data/Node/DiffNode/SecondValue != "ABC" or /Source1/Data/Node/DiffNode/SecondValue != "DEF")) EX )

Logic is:

((If Value is equals to 'A') and (If SecondValue is equals to "ABC" or "DEF")) or ((If Value is equals to 'B') and (If SecondValue is equals to "ABC" or "DEF")) ---> route to receiverA

((If Value is equals to 'A') and (If SecondValue is not equals to "ABC" or "DEF")) or ((If Value is equals to 'B') and (If SecondValue is not equals to "ABC" or "DEF")) ---> route to receiverB

Appreciate your inputs on this. Thank you.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Apr 06, 2016 at 01:52 PM

    Hi Mohan,

    Use below XPATH expressions.

    /Source1/Data/Node[(SubNode/Value = "A" or SubNode/Value = "B") and (DiffNode/SecondValue = "ABC" or DiffNode/SecondValue = "DEF")] EX ---->REC1

    /Source1/Data/Node[(SubNode/Value = "A" or SubNode/Value = "B") and (DiffNode/SecondValue != "ABC" or DiffNode/SecondValue != "DEF")] EX ---->REC2

    Regards,

    Praveen.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 06, 2016 at 12:54 PM

    Hi Mohan,

    Can you specify, what error you are receiving?

    --

    Sendhil

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Sendhil,

      Basically this is IDoc to File... so getting tRFC error in ECC SM58 because of Invalid receiver determination conditions.

  • Apr 06, 2016 at 01:43 PM

    Mohan,

    Please correct xPath expressions

    ((If Value is equals to 'A' or 'B') and (If SecondValue is equals to "ABC" or "DEF")) ---> route to receiverA

    ((If Value is equals to 'A' or 'B') and (If SecondValue is not equals to "ABC" or "DEF")) ---> route to receiverB

    Customise your 'XPATH' Expressions in Receiver Determination

    Add comment
    10|10000 characters needed characters exceeded