Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Graphical mapping: if-then-else problem

Hello,

I'm having a problem with the conditional graphical mapping.

Here's a part of my source schema:

...

E1EDP01 (1..n)

    E1EDC01 (0..n)

...

Here's a part of the target schema:

...

POLINEX (1..n)

...

Goal of the mapping:

If the E1EDP01 element has no E1EDC01 subelements, target element POLINEX is created once.

If the E1EDP01 element has 1 or more E1EDC01 subelements, the target element POLINEX is created as many times as there are E1EDC01 subelements for that E1EDP01 element.

So for example:

source:

...

...

would have to result in 4 POLINEX elements in the target message.

I tried the following mapping:

                                                     E1EDC01

E1EDP01 -- exists --\u00A0                        then

                                ___ AND __ if           >----

-

-

-

-

-

-


POLINEX

                                /                       else

E1EDC01 -- exists --/                            

                                                    E1EDP01

If this is not readable, you can find a screenshot of the mapping

<a href="http://www.ict-cs.com/xi/xi-graph-mapping.JPG">here</a>

.

When I map my source example, I only get 3

POLINEX elements in the target.

Any idea what I do wrong or if there's a better graphical mapping that can be used for this ?

Thanks in advance !

Former Member replied

The Context of E1EDC01 must not be changes, it is sufficient to change the context of the target with the node function removeContexts.

I see that you have applied valeus to the node E1EDP01. The mapWithDefault cannot take the values from there.

Could you provide a more detailed example, with values?

Regards

Stefan

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question