cancel
Showing results for 
Search instead for 
Did you mean: 

Too many values in first queue in function useOneAsMany. It must have the s

Former Member
0 Kudos

Hi All,

Any mapping help for the following requirement:

Source Structure:

Messages

--Message1

-


mt_first

-


row-1 (1..unbounded)

-


field-1 (1..1)

--Message2

-


mt_second

-


BAPIRET2

-


row-2 (0..unbounded)

As of now we are mapping field1, row-2 and row-2 to useOneAsMany --> SplitByValue --> Target Field

But the problem is if you have more than one row1 (even if you have multiple row-1s, field-1 value is same in all the row-1s), we are getting mapping error: Too many values in first queue in function useOneAsMany. It must have the same number of contexts as second queue.

How do we just take the one value of field-1 if you have mutiple row-1s?

Thx

N@v!n

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

How do we just take the one value of field-1 if you have mutiple row-1s?

>>>

use a UDF after the field1 before mapping it to useOneAsMany

sample code;

say in my UDF field1 is represented as A

then use a single line of code;

result.addValue(A[0]);

Answers (1)

Answers (1)

VijayKonam
Active Contributor
0 Kudos

Instead of using UseOneasMany, first try to find the number of times you want the target node(parent) to be generated.. then map the value. Think that would solve the issue.

VJ