General asXML Format

The following lines show the general format of the canonical XML representation without the XML header; line breaks and indents are included for clarification purposes only.

The asXML format is a general format that cannot be completely defined with an XML pattern. The reason for this is that various ABAP types are referred to.

<asx:abap version = "1.0"
          xmlns:asx = "http://www.sap.com/abapxml">
  <asx:values>
    <bn1>...</bn1>
    <bn2>...</bn2>
    ...
  </asx:values>
  <asx:heap>
    ...
  </asx:heap>
</asx:abap>

The root element of an asXML documents is abap in the namespace (XML Namespace) http://www.sap.com/abapxml. The optional attribute version currently always has the value "1.0" and is intended for future enhancements of asXML. The root element abap must contains the subelement values of the same namespace. The subelements bn1, bn2, ... of value represent the ABAP data objects that are specified as e1, e2, ... in the source addition to the CALL TRANSFORMATION statement or as f1, f2, ... in the result addition. The names of the elements bn1, bn2, ... are the names specified there in uppercase. The text contents of the elements <bn1>...</bn1>, <bn2>...</bn2> ... (or <bn1 ... />, <bn2 ... /> ... ) represent the contents of all named data objects with the exception of reference variables. The latter are represented by elements without text contents but with a special attribute. The optional element heap contains the contents of referenced anonymous data objects and objects.

With the exception of the special cases in the table below, the names of the element bn1, bn2, ... only contain capital letters. The names bn1, bn2, ... specified in the source and result additions to the CALL TRANSFORMATION statement (or components of structures or objects) can only be used as (uppercase) names for XML elements if they consist solely of the characters "a" to "z", "A" to "Z", "0" to "9", or "_"; the first character must be a letter or "_". Other characters are replaced according to the following table.

Character in ABAP name Replacement character in XML name
ASCII character other than "a" to "z", "A" to "Z", "0" to "9", or "_" and character "0" to "9" as first character. "_--hex(c)", where hex(c) is the two-digit hexadecimal representation of the ASCII code of the character c.
"/" "_-"
"XML" as the first three characters in any combination of uppercase and lowercase "x-ml" in a corresponding combination of uppercase and lowercase