cancel
Showing results for 
Search instead for 
Did you mean: 

Context problem

Former Member
0 Kudos

Hi.

I have a small context problem that i can't solve.

The source structure looks as follow:

<headersource>
   <sourcesegment1>   1...1
      <sourcefield1>       1...1
   </sourcesegment1>
   <sourcesegment2>   1...unbounded
      <sourcefield2>       1...1
   </sourcesegment2>
</headersource>

target structure

<headertarget>
   <targetsegment>        1...unbounded
      <targetfield1>          1...1
      <targetfield2>          1...1
   </targetsegment>
<headertarget>

I want to map

sourcefield2 -> targetfield1

sourcefield1 -> targetfield2

In my mapping the targetfield1 gets populated for every segment but my targetfield2 only get populated in my first targetsegment.

How can I solve it so targetfield2 get populated for every targetsegment created?

BR

Kalle

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

While using the USEONEASMANY , you have to change the context of the 3rd parameter to the top or to the header .

You can check this is your display queue..

Regards,

Jude

Former Member
0 Kudos

So I'm mapping the following.

<sourcefield1>      -
<sourcesegment1>    -        uesOneAsMany      -       SplitByValue[each Value]        - <targetfield2>
<sourcesegment2>    -
contextswitch to top

This is not working.

what should I change in the mapping?

BR

Kalle

Answers (3)

Answers (3)

Former Member
0 Kudos

I see a small error in my structure.

Source structure should be the following

<headersource>
   <sourcesegment1>   1...1
      <sourcefield1>       1...1
   </sourcesegment1>
   <sourcesegment2>              1...1
      <sourcesubsegnmment>  1...unbounded
         <sourcefield2>               1...1
      </sourcesubsegnmment> 
   </sourcesegment2>
</headersource>

Former Member
0 Kudos

Solved

Thanks for pinpointing the function for me.

BR

Kalle

Former Member
0 Kudos

Hi,

For your targetfield2 you need to use useoneasmany function. Check help.sap for the exact description of how to use this function.

Hope this helps.

Regards,

Siddhesh S.Tawate

Former Member
0 Kudos

Trying to configure this but are not getting any good results.

can anybody describe how to setup this funkction correctly according to the given problem above?

BR

Kalle

Former Member
0 Kudos

Hi ,

you can achieve this by using USE ONE AS MANY ...

Try , use remove context and collapse context if necessary

Regards,

Jude