cancel
Showing results for 
Search instead for 
Did you mean: 

RFC->XML header item mapping

Former Member
0 Kudos

Hello All,

I have the folowing scenario:

I have an RFC table that contains header and line details in the same line. for instance:

Header Num, header text, line num, line text

1 abc 10 d

1 abc 20 g

2 def 10 h

I want to output this to an XML file with hierarchy e.g.

<Header>

<Num>1</Num>

<Text>abc</Text>

<Item>

<num>10</num>

<text>d</text>

</Item>

<Item>

<num>20</num>

<text>g</text>

</Item>

</Header>

<Header>

<Num>2</Num>

<Text>def</Text>

<Item>

<num>10</num>

<text>h</text>

</Item>

</Header>

I tries using splitbyvalue on valuechange but this doesn't work. How exactly is the mapping for this?

Thanks,

Yoni

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Yoni.

I don't think you are able to do the mapping using the graphical tool. It only operates on XML structures in both source message and target message.

I think you only option is to create a Java or ABAP mapping.

Best regards,

Jacob

Answers (1)

Answers (1)

udo_martens
Active Contributor
0 Kudos

Hi Yoni,

this is as well possible by a <a href="/people/udo.martens/blog/2006/04/26/xslt-recursive-templates XSL Stylesheet</a>.

Regards,

Udo

Former Member
0 Kudos

Hi,

Just try this:

<RFCLine>---splitbyvalue<Num>

<RFCLine>---splitbyvalue<Text>

detail

<RFCLine)-splitbyValue-removecontext---<num>

<RFCLine)-splitbyValue-removecontext---<text>

Regards

vijaya