ABAP Keyword Documentation → ABAP - Reference → Data Interfaces and Communication Interfaces → ABAP and XML → Transformations for XML → asXML - Canonical XML Representation → asXML - Mapping of ABAP Data Types
asXML - Mapping of Internal Tables
The asXML representation of internal tables is mainly relevant for XSL transformations. In simple transformations, this representation is important only when using the statement tt:copy.
The rows of an internal table are represented in asXML as a sequence of subelements of the table element. The content of each subelement matches the canonical representation of the row value. The name of a subelement is not relevant. If the canonical XML representation is created by a serialization, the name from ABAP Dictionary is used, if applicable; otherwise the name is item. All table categories are allowed. Serializations do not copy any information about the table category to the XML data. If the target field of an XSL transformation is a sorted table, the rows are sorted accordingly in the deserialization.
If the required XML element does not exist in deserializations to an internal table, the internal table
retains its previous value. If an empty element is assigned to an internal table, it is set to its type-specific
initial value (i.e. emptied). To initialize the internal table in either case, the transformation option
clear with the value "all" can be used.