cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping multiple to single node

Former Member
0 Kudos

I have a proxy to file scenario where I can not have the proxy changed, The input from the proxy is as follows (note: the field IntID is never mapped).

I need the output to be a single node as it has to go through content conversion. My output structure looks like this:

I have tried "use one as many" with the VKORG and SORT2 fields, but what I get in the output is just one set of Rawitem records (just for that combination of VKORG/SORT2), not all the Rawitem records. I then tried to map to one structure of the format:

<Records>

      <Rawitems>

And then map that to just <Records> in a separate mapping, but I run in to the issue where I lose context. And I need to just have one context at the end, since this needs to go through content conversion. One final note: XSL mapping is not a skill I possess.

Thanks,

Dave

Accepted Solutions (1)

Accepted Solutions (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi ,

I dont think you need XSL mappinmg for this,

map RaqItem--->Records

Then use below logic,

  Vkorg-->useOneAsMany--->SplitByValue-->TargetFiled -VKORG

STOR2-->useOneAsMany--->SplitByValue-->TargetFiled-stor2

useOneAsMany 2 and 3 argument should be from RawItem,better map RawItem to sencond/third argument.

Regards,

Raj

Former Member
0 Kudos

First, thank you for the response. I think I needed to explain the data better than I did.

The data looks like this

VKORG = 1

SORT2 = A

     RawItems....

VKORG = 1

SORT2 = B

     RawItems....

VKORG = 1

SORT2 = C

     RawItems....

VKORG = 2

SORT2 = D

     RawItems....

VKORG = 2

SORT2 = E

     RawItems....

VKORG = 2

SORT2 = F

     RawItems....

(etc)

So when I use One As Many (Split by Value) I get the error:the first queue must have one, and only one value in each context. But both VKORG and SORT2 have multiple values in each context. If I could get the proxy changed, this would be simple.

rajasekhar_reddy14
Active Contributor
0 Kudos

check below link and use same logic

http://scn.sap.com/thread/3265417

Former Member
0 Kudos

Raja,

Thank you very much for you help. Works perfectly!!! Funny someone had the same exact issue as I did on the same day!!!...

Dave

Answers (0)