Skip to content

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

asXML, Mapping of Structures

The example demonstrates the mapping of structures.

Other versions: 7.31 | 7.40 | 7.54

Source Code

    DATA: BEGIN OF struct,
            num  TYPE i VALUE 20,
            dat  TYPE d VALUE '20060627',
          END OF struct,
          xmlstr TYPE xstring.

                        SOURCE structure = struct
                        RESULT XML xmlstr.

    cl_abap_browser=>show_xml( xml_xstring = xmlstr ).


The struct structure is displayed as a superordinate XML element for its components.