Skip to Content

Mapping logic required

Jul 11, 2017 at 11:23 AM


avatar image

Hello Friends,

The scenario is IDOC to JDBC.

In IDOC I have a segment,

ZE1KNA1 cardinality 0:9999

I have field - ZTYPE under this. If ZTYPE has atleast 1 occurance of value 'Z1' then I have to supress all IDOC. Target message should not be generated.

Kindly suggest what kind of mapping logic need to be applied.

Thanks in advance.


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Evgeniy Kolmakov Jul 11, 2017 at 11:34 AM

Hi Hari!

Try this:

ZTYPE->RemoveContexts->FixValues("Z1" - 1; Default 0)->Sum->equalsS(0)->createIf->Target_Message_Root_Node.

Regards, Evgeniy.

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

Thanks it worked out well. Have a good day. Cheers

avatar image
Former Member Jul 11, 2017 at 11:32 AM

Hi Hari,

If I get the requirement not to generate a target message under certain circumstances, my first thought usually is to sort out the unwanted messages during receiver determination already and not even let them go to the mapping. You can send those filtered out IDocs to a dummy receiver, so you can later on easily see that they were filtered.


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

Hi Patrick!

Unless we have several IDOCs within one message :-).

Regards, Evgeniy.

Former Member
Evgeniy Kolmakov

Yes, of course :-)


Thanks Patrick for the response. Can I apply this logic in receiver determination, since the segment ZE1KNA1 has multiple occurrences in the IDOC. ZTYPE can take values Z1, A1, A2. If I come across Z1 then I have to supress the IDOC.

Former Member
Hari Joshyam

Yes, you can use the EX operator and reference the field as /path/to/ZE1KNA1[ZTYPE="Z1"].
As Evgeny commented, sorting IDocs out during receiver determination is only viable if you're processing them one by one.


Yes, I agree with Patrick, but don't forget about "not" condition.