SAP ABAP ASXML REFERENCES



Get Example source ABAP code based on a different SAP table
  



ABAP_ASJSON - Mapping of Reference Variables and Objects
As in asXML, a reference mechanism is used for the asJSON representation of anonymous data objects and class instances (objects), which are addressed using references in reference variables. Since JSON does not suggest any syntax for references, an SAP-specific reference mechanism based on asXML is used.
Named reference variables are represented as object components, whose content is by default a key for the referenced objects.
The referenced objects are stored as object components in the object %heap. This name corresponds to the key.
In addition to the value, the dynamic type of the reference variables is specified in the object components of %heap when serialization takes place to ensure unique deserialization.
SUBNODES



Latest notes:

The asJSON representation of reference variables and referenced objects is only relevant for XSL transformations and the identity transformation ID. Simple Transformations cannot currently be used to transform reference variables.
For data references, the value embedded can be specified for the transformation option data_refs to define embedded storage in serializations instead of storage in the %heap object component.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
For information about the differences between serializing to %heap and embedded storage, see the executable example Serializations to Heap or Embedded.
ABAP_EXAMPLE_END