Skip to Content
avatar image
Former Member

conditional checking in message mapping does not work

Hi Experts,

I've been troubled with the message mapping for sometime. Hopefully someone here can help me out.

Scenario:
Payext IDOC > MQ
The requirement is to check if the there's any PARVW = Z exist in each idoc, if yes then Address info should come from the particular node.
Otherwise pick the 1 where PARVW = B.

Sample:

The requirement sounds simple, but i'm not getting my expected value no matter how i tried.
With 1 idoc segment the value is populated correctly. But if there's a 2nd idoc segment, it will throw error with some mandatory field under address node does not have value in queue context.


Please help.

Regards,
Koh

souce2target.jpg (144.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 09, 2017 at 08:30 AM

    Hi Koh!

    Parameter "Keep SUPPRESS Values" for IfWithoutElse function must be set to "off" (unchecked) for both cases:

    Elements PARVW and STRAS should be moved to IDOC context:

    Mapping result:

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Evgeniy,

      Thanks!!!.
      I've tried your solution and it works perfectly.
      Could you please advice why the ordinary way of checking does not fit in this case? Eg: ns0:Ctry=ifWithoutElse(stringEquals(/ZPAYEXT/IDOC/E1EDKA1/PARVW, const(value=BE)), /ZPAYEXT/IDOC/E1EDKA1/LAND1, keepss=false)

      Thanks
      Best regards, Koh.