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 Elementary Data Types

The example demonstrates the mapping of elementary data types.

Other versions: 7.31 | 7.40 | 7.54

Source Code

    DATA: num    TYPE i VALUE 20,
          dat    TYPE d VALUE '20060627',
          xmlstr TYPE xstring.

                        SOURCE number = num
                               date   = dat
                        RESULT XML xmlstr.

    cl_demo_output=>display_xml( xmlstr ).


In the statement CALL TRANSFORMATION, the data objects num and dat are bound to the XML elements number and date. The values subelement contains these elements. The content of these elements is determined by mapping the bound elementary ABAP data objects.