Named Data Objects, with the Exception of Reference Variables

Named data objects, except for reference variables, are represented as the text contents of the elements <bn1>...</bn1>, <bn2>...</bn2>, and so on. The representation of named data objects in <bn1>...</bn1>, <bn2>...</bn2>, ... depends on the relevant ABAP data type.

Elementary Data Types

The asXML representation of elementary data objects with predefined ABAP types corresponds to the canonical representation of XMLschema data types ( see table below), where date and time are represented according to ISO-8601 and binary data is represented using Base64 encoding.

ABAP type ABAP example XML pattern type XML example
c " Hi" string " Hi"
d "20020204" date "2002-02-04"
f -3.140...0E+02 double "-3.14E2"
i, b, s -123 int, unsignedByte, short "-123"
n "001234" string (pattern [0-9]+) "001234"
p -1.23 decimal "-1.23"
string " Hello " string " Hello "
t "201501" time "20:15:01"
x "ABCDEF" base64Binary "q83v"
xstring "456789AB" base64Binary "RweJqw=="

Structures

In asXML, the components of an ABAP structure are represented as a sequence of subelements of the structure element. The content of each subelement corresponds to the canonical representation of the component value. The name of each subelement is the name of the corresponding component. In the case of serialization, the subelements are represented in the order of the components in the structure. When the asXML representation of a structure is deserialized, the order of the subelements is irrelevant and excess XML elements are ignored. Components of the structure for which there is no subelement remain initial.

Internal Tables

In asXML, the rows of an internal table are represented as a sequence of subelements of the table element. The content of each subelement corresponds to the canonical representation of the row value. The name of a sub element is irrelevant. If the canonical XML representation is created by serialization and the row type refers to the ABAP Dictionary, the name there is used; otherwise, the name item is used. Any table kind is allowed. During serialization, no information about the table kind is transferred to the XML document. If the target field of an XSL transformation is a sorted table, the rows are sorted accordingly during deserialization.