ARTICLE
Deserializing Empty Elements
This example demonstrates the deserialization of empty elements.
ABAP_SOURCE_CODE
ABAP_EXEC
ABAP_DESCRIPTION
An elementary data object, a structure and an internal table are
transformed using the identity transformation
ID into asXML and
asJSON display formats. With asXML
display format, the values of all elements are removed. With
asJSON display format, only the components from objects and arrays
can be removed.
After deserialization into the original ABAP data objects, the
elementary data object and the internal table are initial. However, the
empty element in the structure is interpreted as a missing component and
the structure component retains its previous value. If the
transformation option clear
is used with the value "all" , all ABAP data objects are
initialized.
Note
The modification of XML and JSON data using string
processing is only shown here to make the example clearer. In productive
programs, the API s of class libraries for
XML should be used.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved