cancel
Showing results for 
Search instead for 
Did you mean: 

UseOneAsMany - Repeat One Node as many times as another node

former_member210091
Participant
0 Kudos

Hey All,

I am having some trouble in one of my mapping and would appreciate some help with you guys,

I am using IDOC INVOICE01 as source and target for my mapping (this is one part of a multiple steps mappings).

In the mapping, i need to repeat E1EDP02 node (and all it's children) as many times as E1EDP05. I tried below mapping but it does not help.

Can someone please help me

Thanks,

Accepted Solutions (1)

Accepted Solutions (1)

former_member210091
Participant
0 Kudos

Thanks All for your response.

useoneasmany did not works so i wrote a small UDF to get it done.

Thanks

Harish
Active Contributor
0 Kudos

Hi Saif,

Good to hear that your problem is resolved. Can you please close the thread? Please refer the below blog for how and why we need to close the discussion.

regards,

Harish

former_member210091
Participant
0 Kudos

Yes Harish,

I have set the thread to "Assumed Answered".

Thanks,

Answers (2)

Answers (2)

former_member190293
Active Contributor
0 Kudos

Hi, Saif!

Mapping:

Result:

Regards, Evgeniy.

P.S. I've just mentioned that I swapped EDP05 and EDP02 nodes . But idea stays the same.

Harish
Active Contributor
0 Kudos

Hi Saif,

The purpose of use one as many is to repeat header information as many times as item. your current requirement is to have the occurrence of one line item node same as other line item node.

you can achieve this as

E1EDP02 --> Collaps context --> Split by value -->

E1EDP05 -->

E2EDP05--> split by value -->

These are the input to use one as many.

regards,

Harish

former_member210091
Participant
0 Kudos

Thanks Harish,

However this is suppressing all the values of context except the first one.

I don't need to suppress the values but repeat them.

Thanks