cancel
Showing results for 
Search instead for 
Did you mean: 

Copy by value

Former Member
0 Kudos

what is diff between Copy by value and Use one as many

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI

Copy Value: We can use this to copy the value of a position in the source structure and assign it to a target field for frequently occurring source structure element. The value is copied each time the target field occurs in the target structure.

Copy Value: - u can interpret it as "How many ever times I occur I am copied just once".

It is used very frequently in real-time. Let us take an instance of material group, which can occur as many times as the item node. But since we are mapping it to the header in the target node I just want to copy the first occurrence of material group and map it to the header node. CopyValue exactly does that.

Use one as many

You require the function useOneAsMany() if a field that only occurs once needs to be replicated as often as another field occurs in the outbound message so that the fields can be written to the target structure in pairs as a record.http://help.sap.com/saphelp_nw04/helpdata/en/2c/2d8c4024d26e1de10000000a1550b0/frameset.htm

Refer the below links for further assistance:

http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm

Please take a look at these links,

http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm

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

This will help you

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/190eb190-0201-0010-0ab3-e69...

http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/a8/bfc6373c8fea43bdb3541535bcbd43/frameset.htm

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/8a57d190-0201-0010-9e87-d8f...

This will give you a detailed Idea about Context

http://help.sap.com/saphelp_nw04/helpdata/en/9f/db95f835c111d1829f0000e829fbfe/frameset.htm

This will give more explanation on Queue

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/51a39490-0201-0010-5b9f-ae2...

For understanding node functions this blog will help you

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

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

cheers

Edited by: vemuganti naga phalguna on Jul 4, 2008 7:37 AM

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

Please browse the following blog.It is a good blog .

[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2171] [original link is broken] [original link is broken] [original link is broken];

[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2792] [original link is broken] [original link is broken] [original link is broken];

Thanks,

Kiran

Former Member
0 Kudos

Hi,

CopyValue() is used to copy a repeating valueu2019s position in the source structure and assign it

to a target field.

useOneAsMany() is used to repeat a source value multiple times on the target side.

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

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

  • 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.

For more details on useOneAsMany() see [Introduction to Context Handling |http://www.riyaz.net/blog/index.php/2007/12/08/xipi-introduction-to-context-handling-in-message-mapping/]

Regards,

Riyaz

Former Member
0 Kudos
sunil_singh13
Active Contributor
0 Kudos

Hi parvath ,

UseOneAsMany :

It is Nothing but like using for loop. You can Iterate the First input to this function as many time as third input.

CopyValue:

You can access any value present in the queue

e.g. Assume you wish to access the value present at the 3rd position in the queue . so just enter the value 3 in the property of CopyValue(Double click on this function u will get the option to enter the value).

then every time this will give you the value present at position 3 in the queue.

Reward points if helpful

Thanks

Sunil Singh

Former Member
0 Kudos

hi parvath

check this for use one as many:(good example)

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

regards

kummari

Former Member
0 Kudos

copyValue-u201CHow many ever times I occur I am copied just onceu201D. This is not a node function but I am explaining it as it is used very frequently in real-time.

Let us take an instance of material group, which can occur as many times as the item node. But since we are mapping it to the header in the target node I just want to copy the first occurrence of material group and map it to the header node. copyValue exactly does that.

useOneAsMany- u201DI occur only once but have to be replicated as many times as my siblings or nephews occuru201D.

This is really a nice function, which will be used very often. As shown in the figure above the maximum occurrence of the header node in the source is 1 and the target is unbounded. So we have only one occurrence of material description, which has to be replicated for every line item. Bingo! useOneAsMany exactly does that! Check it out.

check blog

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

regards

kummari