cancel
Showing results for 
Search instead for 
Did you mean: 

Context Change

Former Member
0 Kudos

Hi

Have a scenerio in which source and target structure is same

Following is the structure:

<Main>

<Header>

<HeaderField1>headerdata</HeaderField1>

</Header>

<Details>

<DetailsField1></DetailsField1>

</Details>

</Main>

Occurance of Header field is 1..1

Occurance of Details field is 1..n

i want to map <DetailsField1> of target structure to <HeaderField1> of source structure

ie for n details the <DetailsField1> (of target structure) should contain headerdata

Currently after mapping is exectuted and only first detail tag contains the <DetailsField1>

(Since occurance of <HeaderField1> is only once)

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

Hi,

Use built-in functions for the same (useOnetoMany ) in the mapping.

Also check out this blog:

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

Also check out with making Context of HeaderField1 as in Root level.

Hope this helps,

Rgds,

Moorthy

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks ppl ...This problem is solved...UseOneAsMany required solution

Former Member
0 Kudos

hi

use " use one as many " node conversion...

1st input -


header field

2nd input -


detail field(with context change as main)

3rd input -


detail field

have a look at the link also

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

Message was edited by:

sasitharan arunachalam

Former Member
0 Kudos

hi amit,

Do u want struct like

source ::

<Main>

<Header>

<HeaderField1>headerdata</HeaderField1>

</Header>

<Details>

<DetailsField1></DetailsField1>

<DetailsField1></DetailsField1>

</Details>

</Main>

Target ::

<Main>

<Header>

<HeaderField1>headerdata</HeaderField1>

</Header>

<Details>

<DetailsField1></DetailsField1>

</Details>

<Header>

<HeaderField1>headerdata</HeaderField1>

</Header>

<Details>

<DetailsField1></DetailsField1>

</Details>

</Main>

Regards

Former Member
0 Kudos

Hi;

do you have multiple occurances of Header node??

Mudit

justin_santhanam
Active Contributor
0 Kudos

Amit,

Can u show some example of input and output u needed. Coz the statement is lil bit confusing.

Best regards,

raj.