cancel
Showing results for 
Search instead for 
Did you mean: 

Error with UseOneasMany

harish_babu5
Participant
0 Kudos

Hi

Mine is an Idoc to File scenario.

I have a field under a node which has to occur many times. I used UseOneasMany function.

The fieldthat I need to create many times at target end is Material which comes under MATHEAD. I mapped that as the first argument, then another node as MEANRT as second argument and a field in that node EAN_UPC which is at the same contect as Material as the third argument.

However the Idoc triggered didn't have MEANRT node and also the EAN_UPC in it. Material was not dreated at target file.

What is the reason ? Are the arguments mandatory ?

Regards

Harish

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Harish,

The Three argument for USEONEASMANY function are mandatory.

1.First argument u201Cwhat should be repeatedu201D.

2.Second argument u201Chow many times, first argument should repeatu201D.

3.Third argument u201CShould have same context of Item (Second argument)u201D.It maintains the context.

For a good picture of USEONEASMANY function, check the below link:

http://saptechnical .com/Tutorials/XI/NodeFunctions/Page5.htm

Thanks,

harish_babu5
Participant
0 Kudos

Hi Hareen

Thanks for your help.

The reason it's failing is because my second and third arguments are not in the node. Is there any way that I can use this. I mean I want to get at least one output using this even if the second argument is not there.

It should come atleast one even if the second argument is not there and if the second argument is there, it should come as many times as the second argument

Regards

Harish

Former Member
0 Kudos

I think it is not possible....

former_member200962
Active Contributor
0 Kudos
It should come atleast one even if the second argument is not there and if the second argument is there, it should come as 
many times as the second argument

Duplicate your Target node (right-click --> duplicate)

on the second occurence of you node use the below condition:

SourceNode --> Exists --> Not --> IfWithoutElse (Blank_Constant --> Then) --> TargetNode

Check if this helps you to get the target node when source is absent.

Answers (1)

Answers (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,

The useOneAsMany node function is failing because the number of contexts are not equal anymore. If the number of contexts are the same, the mapping should push through. eg.


Test (01,CC,02,CC,0,3,CC) --> (1) useOneAsMany
Field1 (02,02,CC,null,03,CC) --> (2) useOneAsMany --> (01,01,CC,null,03) Target
Field1 (02,02,CC,null,03,CC) --> (3) useOneAsMany

Hope this helps,