Skip to Content
0
Oct 29, 2019 at 03:11 PM

Simple Transformation: Variable XML node names

761 Views

Can I serialize ABAP tables containing nodes with variable names into XML using simple transformations?

The Output XML should look as follows:

<?XML Version="1.0" Encoding=UTF-16"?><Root>
  <Table>
    <abc> 1 </abc>
    <def> 2 </def>
  </Table>
</Root>

The ABAP content:

TYPES: BEGIN OF ly_table,
         param TYPE string,
         value TYPE string,
       END OF ly_table.

DATA lt_table TYPE TABLE OF ly_table.
lt_table = VALUE #( ( param = 'abc' value = '1' )
                    ( param = 'def' value = '2' ) ).
I.e. the identifiers and number of nodes in <Table> are not known at design time.

How would I realize that in ST? Is it even possible?