Get Example source ABAP code based on a different SAP table
ABAP_ASXML - Mapping of UUIDs The example demonstrates the mapping of UUIDs to XML schema data types.
ABAP_SOURCE_CODE DEMO CL_DEMO_ABAP_XML_SCHEMA_MAP
ABAP_DESCRIPTION In this example, a UUID> is created and passed to the predefined identity transformation> ID> with the data types XSDUUID_CHAR> and SYSUUID_C32 >. The UUID of the type XSDUUID_CHAR> is recognized as such and converted to the associated XML schema data type>. However, the UUID of the type SYSUUID_C32> is interpreted as a regular text field and passed unconverted in accordance with the associated rules for the mapping of elementary ABAP types>. When the new XML data is deserialized using the Simple Transformation DEMO_UUID>, an attempt is made to convert both nodes to ABAP UUIDs of type XSDUUID_CHAR>. This only works for the first node, which exists in the correct XML schema data type. In the case of the second node, which exists as unformatted text, an exception is raised. The example shows that it is possible to work with XML schema data types without having to use self-programmed conversions. However, it also shows that when using XML schema data types it is important to pay attention to the correct mapping of data types.