cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping question

Former Member
0 Kudos

Hi there,

Any ideas on how to do the following with graphical mapping?

I have a file to idoc scenario (standard idoc) where each entry in the file needs to generate 2 of the same segments on the idoc.

No problem is mapping the first one, all is working but I can't seem to trigger the creation of the second same segment.

Input

Line 1, aaa

Line 2, bbb

Line 3, ccc

Output should be something like:

<idoc>

<Line>

<Number>1</Number

<Data>aaa</Data>

<Data>some hard coded values</Data>

</Line>

<Line>

<Number>2</Number

<Data>bbb</Data>

<Data>some hard coded values</Data>

</Line>

<Line>

<Number>3</Number

<Data>ccc</Data>

<Data>some hard coded values</Data>

</Line>

</idoc>

Creating the second data element is the problem. Any ideas will be appreciated ...

Regards,

Liesel

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You have to duplicate the node for which you want 2 entries....

each of those nodes has to be mapped to the lines in the source so that for every line in source there will be 2 nodes...

Thanks.

Former Member
0 Kudos

How and where do I duplicate the node? Don't have a data type since I am using a standard idoc as my target message.

Former Member
0 Kudos

You would do that in your mapping....In the graphical mapping...right click on the node in question and select the entry "Duplicate Subtree" and this would create a new instance of the same node....at runtime for the same node we are having 2 evaluations....and each of these 2 nodes would be mapped to the lines in the source...

Thanks.

Former Member
0 Kudos

Thanks a million, it worked.

Former Member
0 Kudos

...

No problem...

Regards.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Liesel,

Try using UseOneasMany standard function...i guess u hv to use it with removeContext and splitbyvalue.......

Regards,

Akshay