cancel
Showing results for 
Search instead for 
Did you mean: 

Message Split and CopyValue issue

Former Member
0 Kudos

Hello,

I am having a problem with a message mapping.

I am trying to split an idoc into multiple idocs based on the content of the idoc. My idoc is CREMAS and I need to create a separate idoc for each company code which is in the segment E1LFB1M-BUKRS. I am able to split the idoc based on the company code successfully.

However, my issue is with copying the other segments underneath the segment E1LFB1M that have 0..9999 occurrences in each idoc.

For example, I use copyvalue for segments EDI_DC40 and E1FLA1M which worked great for all the idocs created since they have a single occurrence, however the copyvalue does not work for segment E1FLM1M (purchase orgs) which has 0..9999 occurrences. The copyvalue for E1FLM1M only copies 1 segment per idoc message instead of the 6 E1FLM1M segments for each idoc that I have in my example.

Any suggestions on how this can be solved?

Thank you.

Rhonda

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Can you provide a sample input and output value (just include the relevant nodes)?

Regards,

Mark

Answers (2)

Answers (2)

venkatagiri_gongadi
Participant
0 Kudos

Hi,

can you please try with UseOneAsMany function.

BestRegards

Giri

Edited by: Giriii on Sep 15, 2011 8:03 AM

Former Member
0 Kudos

Thanks everyone, but I figured this out using a UDF with reference to the following topic.

Former Member
0 Kudos

Rhonda

You can use CopyValue() to copy the value of a position in the source structure and assign it to a target field for a frequently occurring source structure element. The value is copied each time the target field occurs in the target structure.

It will work for the segments which are occuring once in seource, Not for the multiple segments.

Regards

Raj