Skip to Content
0
Aug 20, 2014 at 02:16 PM

Simple Transformation XML to ABAP Content of tag with subtrees to string field

1322 Views

Hi,

I have an requirement in which I have to do a transformation from an XML file to an structure.

I need get the value of a tag that have subtrees and move that to a field in my structure.

Example:

<TAG1>value1</TAG1>

<TAG2>value2</TAG2>

<TAG3>

<TAG4>value4</TAG4>

<TAG5>value5</TAG5>

</TAG3>

Result expected in ABAP Structure:

field1 -> tag1

field2 -> tag2

field3 -> <TAG4>value4</TAG4><TAG5>value5</TAG5>

The contents of the tag TAG3 is variable, so I want to store it as a string.

Can I make this with Simple Transformation?

In my tests I can move only the value of each child tag for the given field structure.

This syntax dont work:

<TAG3 tt:value-ref="STRUCTURE.FIELD3"/>

Thanks and Regards,

Miguel Motta