ARTIClE
asXML , Mapping of UUIDs
The example demonstrates the mapping of UUIDs to XML schema
data types .
ABAP_SOURCE_CODE
ABAP_EXEC
ABAP_DESCRIPTION
In this example a UUID is created and
passed with the data types XSDUUID_CHAR and SYSUUID_C32 to
the predefined identity transformation
ID . The UUID of the type XSDUUID_CHAR is recognized as
such and converted into the corresponding
XML schema data type . However,
the UUID of the type SYSUUID_C32 is understood as a
regular text field and passed unconverted in accordance with the
corresponding 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-defined conversions. However, it
also shows that when using XML schema data types it is important
to pay attention to the correct assignment of data types.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved