‎2016 Apr 29 5:09 PM
Is there any way to serialize an ABAP type not defined in the ABAP dictionary dictionary (local type) and restore it later? I need to save it in the XML along with the data to be able to restore them later. Thank you.
‎2016 Apr 30 9:46 AM
Following should work on version 702 and above:
METHOD from_xml.
CALL TRANSFORMATION id
SOURCE XML iv_xml
RESULT 'DATA' = rs_something.
ENDMETHOD.
METHOD to_xml.
CALL TRANSFORMATION id
SOURCE 'DATA' = is_something
RESULT XML rv_xml.
ENDMETHOD.
‎2016 Apr 30 12:26 PM
The main problem that I do not know the xml data structure, that is why I am going to serialize also a type. In your example 'rs_something' should have specific type.
‎2016 Apr 30 2:32 PM
yes, it depends on your overall setup. If rs_something is a CHANGING parameter it can have a generic type, so the caller can decide the type. Guess you know a bit about the type either from the code calling the serialization routines, or via filename or something else?