cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help for useOneAsmany function

Former Member
0 Kudos

My input structure is <Record> 1- unbounded

<header> 1-1

<Data1> 1-unbounded

<data2> 1-unbounded

<footer> 1-1

i want to create the IDOC for data1 and data2 and using the header field while creating the IDOC.So i'm using useOneAsMany for achieving this and its working fine.

But when i duplicate the <record> node I get the following error:

"Too many values in first queue in function useOneAsMany. It must have the same number of contexts as second queue."

Is it possible to use useOneAsMany when the file contains more than 1 record?or is it possible for only one record. Please help me in this

Thanks in advance

Sreedivia

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

Same problem i faced, are you using E1EDP01 node?

If yes it happens only once, don't duplicate that node.

One as Many : we have one value in the source side, but we can use that many times in the target sede in this

conditions we can use this node function.

Here it takes 3 inputs, first value represents the value to populate in the target side

second value represents howmany times the first value occur in the target side and the

third value represents where the context should change.

watch this blog for one as many node function. /people/riyaz.sayyad/blog/2006/04/23/introduction-to-context-handling-in-message-mapping

GabrielSagaya
Active Contributor
0 Kudos

The function useOneAsMany() is used when a field that only occurs once needs to be replicated as often as another field occurs in the outbound message

in order to avoid the error make the occurence of data1 as 1-1.

/people/william.li/blog/2006/03/21/minimize-memory-usage-during-message-mapping-when-replicating-an-element

former_member537867
Active Contributor
0 Kudos

Hi,

Please go through this blog.

It has got good explanation of the function UseOneAsMany.

/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii

/people/riyaz.sayyad/blog/2006/04/23/introduction-to-context-handling-in-message-mapping

Regards,

Vinod.

Former Member
0 Kudos

Hi,

Check this.

Exactly the same problem.

Thanks,

Vijaya.

Former Member
0 Kudos

set your context for the repeating group up one level.... then first parm is the field you want repeated and then the other 2 parms are the repeating group segment at the context (up one level to get all of em)... and then the output of the useoneasmany to be fed into a contextsplit