Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Data Interfaces and Communication Interfaces →  ABAP and XML →  Transformations for XML →  asXML - Canonical XML Representation →  asXML, Examples of Mappings 

asXML, Mapping of Tables

The example demonstrates the mapping of internal tables.

Other versions: 7.31 | 7.40 | 7.54

Source Code

    DATA itab TYPE TABLE OF i.

    itab = VALUE #( FOR j = 1 UNTIL j > 3 ( j ) ).

    CALL TRANSFORMATION id
                        SOURCE table = itab
                        RESULT XML DATA(xmlstr).

    cl_demo_output=>display_xml( xmlstr ).

Description

Every row of the internal table itab is displayed in a subelement item of the table.