Ansicht
Dokumentation

ABENASXML_FRAGMENTS_ABEXA - ASXML FRAGMENTS ABEXA

ABENASXML_FRAGMENTS_ABEXA - ASXML FRAGMENTS ABEXA

rdisp/max_wprun_time - Maximum work process run time   PERFORM Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

- Mapping of XML Fragments

This example demonstrates the mapping of XML fragments.

Source Code

Execute

Description

This example demonstrates the serialization and deserialization of XML fragments and their representation in asXML using the identity transformation ID.

  • First, an XML fragment with the root element X is created in a variable xstr with the type xstring and the result is displayed.
  • The fragment is serialized from the variable xstr of type xstring to an element ROOT as the XML schema type xsd:base64Binary in accordance with the rules for the mapping of elementary data types.
  • On the other hand, a serialization of the fragment from the variable xsdstr of type XSDANY adds the attribute asx:root with the content "X", that is, the name of the root element of the XML fragment) to the element ROOT and represents the remaining content of the fragment in an unchanged way.
  • A further serialization of the fragment from the variable xsdstr produces the element X. This has the same name as the root element of the XML fragment and so the attribute is not added.
  • Any attempt to deserialize the fragment content to an ABAP variable of type xstring fails for both serialization results, since the attribute specified for NODE when mapping elementary data types is not supported or because no valid asXML format exists for the target variable.
  • Deserializations to variables of type XSDANY are possible in both cases, however, and create the original XML fragment again in the variable.
  • If a nonexistent element is addressed in deserializations, no deserialization is performed as usual.

For information about serializations and deserializations of XML fragments using Simple Transformations, see the executable example ST, Mapping of XML Fragments.






Fill RESBD Structure from EBP Component Structure   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 3010 Date: 20240425 Time: 162904     sap01-206 ( 53 ms )