SAP ENUM DESERIALIZATION ABEXA



Get Example source ABAP code based on a different SAP table
  



ABAP_ENUM , Deserialization
This example demonstrates how a dynamically created XML file is deserialized to an enumerated object .

ABAP_SOURCE_CODE
DEMO CL_DEMO_DESERIALIZE_ENUMS
DEMO_V5 CL_DEMO_DESERIALIZE_ENUMS_V5

ABAP_DESCRIPTION
A byte string is composed in such a way that it represents an XML file in asXML format for an enumerated object of the enumerated type size and is deserialized as such. Any invalid entries raise an exception.
BEGIN_SECTION VERSION 5 OUT
The dynamic assignment of the name to a field symbol shown in the following also produces the required result, but requires that the enumeration type size is known in the current context. The XML file, on the other hand, can be deserialized into an enumeration object without static knowledge of the enumeration type.
END_SECTION VERSION 5 OUT