Ansicht
Dokumentation

ABENABAP_DESERL_EMPT_ELEM_ABEXA - ABAP DESERL EMPT ELEM ABEXA

ABENABAP_DESERL_EMPT_ELEM_ABEXA - ABAP DESERL EMPT ELEM ABEXA

CL_GUI_FRONTEND_SERVICES - Frontend Services   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

Deserializing Empty Elements

This example demonstrates the deserialization of empty elements.

Source Code

Execute

Description

An elementary data object, a structure and an internal table are transformed using the identity transformation ID to their asXML and asJSON representations. In the asXML representation, the values of all elements are removed. In the asJSON representation, only the components from objects and arrays can be removed.

After deserialization to 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 shown here is only for the sake of clarity in the example. In production programs, the APIs of class libraries for XML should be used for this.






PERFORM Short Reference   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 1684 Date: 20240419 Time: 111939     sap01-206 ( 23 ms )