cancel
Showing results for 
Search instead for 
Did you mean: 

useOneAsMany - Detail Explanation

Former Member
0 Kudos

Dear Friends,

I am confused in using this node function useOneAsMany.I checked the forums and SAP Help.I am not getting good undestanding on this function.

Kindly guide me.

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos

I learnt about this function from this blog: /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii

Help has an entire page dedicated for UseOneAsMany with proper example:

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

The explanation on which field should correspond to which parameter is given in the above help section.....UseOneAsMany has three parameters

Regards,

Abhishek.

Former Member
0 Kudos

Hi..

abishek salvi...

THIS LINK IS NOT WORKING, SHOWING ERROR LIKE BELOW.

PLZ HELP WITH THIS....

Answers (3)

Answers (3)

sunilchandra007
Active Contributor
0 Kudos

Hi Renu,

Have you checked this link http://help.sap.com/saphelp_nw04/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/content.htm .

It clearly explains all the things about useOneAsMany function. It is basicly used when a field which occurs once needs to be replicated according to the occurence of some other field.

If you see the example in the above link, there is a field "type" in source structure ant its occurence is 1. In target structure, we need a field "Ordertype" for each occuence of item group, that can't be generated directly. So here comes the useOneAsMany function into picture.

Regards,

Sunil Chandra

Former Member
Former Member
0 Kudos

Hi sunil chandra....

Have you checked this link http://help.sap.com/saphelp_nw04/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/content.htm

THIS IS NOT WORKING, IT SHOWING ERROR WINDOW LIKE BELOW:

how to over come this error.

Former Member
0 Kudos

Renu,

I will try to explain this with a simple example -

Source structure -

<MT_Source>

<Header> (1..1)

<Category> (0..Un)

<LineItem> (1..Un)

<Field1>

.

.

</LineItem>

</Header>

</MT_Source>

Target Structure -

<MT_Target>

<Items> (1..Un)

<Field1>

<Category>

.

.

</Items>

Now, in every <Items> segment in target structure, you should have <Category> field. In source structure, <Category> field is not in the <LineItem> segment which has multiple occurrences. So, in order to generate <Category> field in every occurrence of <Items> in target, this standard function of "UseOneAsMany" comes handy.

Hope this helps.

Regards,

Neetesh

Former Member
0 Kudos

HI Neetesh,

can u pls tell mapping for your structure .

Former Member
0 Kudos

hi,

briefly i will try to explain...

if you have one element at parent level and child item occuring 0..unbounded...

e.g PO

PONumber...

item 0..unbounded

item id..

in order to make the element at parent level PONumber as many times as occurence of child item id then need to use one as many

then in this case we will PONumber as first input and item id as second element and same item id as third element with context set to parent...

HTH

Rajesh

Former Member
0 Kudos

Here are some key points taken from this [BLOG.|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414900)ID0299937850DB11493842830684154346End?blog=/pub/wlg/3537] which explains well to use it..

1. The first input parameter expects the list of values that we want to propagate to the target message.

2. The second input parameter expects the number of iterations or how many times we want to replicate the value given in the first parameter.

3. The third input parameter is the list of context changes. Depending on this parameter the source values will be propagated to the target after every context change.

Note: For this function to work as expected, the first two parameters must contain the same number of contexts while the last two parameters must contain the same number of values.

Regards,

Sarvesh