cancel
Showing results for 
Search instead for 
Did you mean: 

UseOneAsMany not working if I input it to If Condition

Former Member
0 Kudos

Hello,

I have gone through the following for usage of UseOneAsMany

http://help.sap.com/saphelp_nw04/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/content.htm

I used it in my MM in such a way that the one field on the source structure repeats everytime there is a node repeats. It was working perfectly.

Now, I was asked to place a condition like :

If abcd = 'we' then send the value else its not required to send to target.

Thus, I placed If condition and sending this useoneasmany output to then (of if)

now its repeating only the first time

the later occurance, useoneasmany isnot getting repeated.

I tried around 100 times with different things and its working everytime except it I send the value to If condition

1. What is the problem? ( There s no prob with UseOneAsMany 's working coz it generated thousands of files without any problem)

2. Pease provide me a simple example of UseOneAsMany usage

Other than

http://help.sap.com/saphelp_nw04/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/content.htm

http://help.sap.com/search/highlightContent.jsp

and sravyas blog

( Please provide me any other eg other than the above)

Thanks

Nikhil.

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

Maybe you assign a screen shot of your mapping to make it clearer.

Regards

Stefan

Former Member
0 Kudos

Stefan, How do I post screenshot here?

anyways, I m trying to explain the MM in the foll way :

abcd == we -


> if

useOneasMany (output) -


> Then--


(o/p of If cond)---> Mapwithdefault -> split by value-> targetnode

============================

If (abcd == we)

then

{

pass the outout of Useoneas many input -


> Mapwithdefault -> split by value-> targetnode

}

Former Member
0 Kudos

In the above MM ,

If I input the UseOneAsMany input to either mapwithdefault, or splitbyvalue or direct target node, its working.

but if it input to then (of if condition ) its not working

Nikhil.

stefan_grube
Active Contributor
0 Kudos

Is the condition abcd == we true for just one entry? Then is is correct that the taregt node is produced only once.

The UseOneAsMany comes before the if-staement, so it is retricted to the results of it.

If you want to have all target depended from the if clause, you have to set this before the UseOneAsMany like this:

condition 
                ifWithoutElse - UseOneAsMany
value       /

Regards

Stefan

prasanthi_chavala
Active Contributor
0 Kudos

Hi Nikhil,

Map as given below:

condition >ifWithoutElse>Removecontext>UseOneAsMany->Splitbyvalue>targetelement.

Thanks!