Ansicht
Dokumentation

ABENCALL_TRAFO_UPPER_LOWER_ABEXA - CALL TRAFO UPPER LOWER ABEXA

ABENCALL_TRAFO_UPPER_LOWER_ABEXA - CALL TRAFO UPPER LOWER ABEXA

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

Transformation of XML Element Names

This example demonstrates the transformation of letters in XML element names.

Source Code

Execute

Description

In deserializations of XML data to ABAP data, the XML elements to be deserialized must generally be written in uppercase letters to be identified. This example shows ways of transforming elements written in other ways using self-written XSL transformations.

  • A structure, simple_struc, is serialized using different XSL transformations.

  • The self-written XSL transformation DEMO_ID_UPPER_LOWER transforms the XML element names created by the serialization to lowercase letters, if the correct parameter passing is used.

  • The self-written XSL transformation DEMO_ID_FROM_TO_MIXED transforms the XML element names created by the serialization to Mixed Case Style (also known as Camel Case Style), if the appropriate parameter passing is used. To do this, an ABAP method is called from the transformation and this method itself calls the built-in function to_mixed.

  • Deserializations of the transformed asXML data with the identity transformation ID do not find the structure or the components.
  • Deserializations of the transformed asXML data with the self-written XSL transformations, on the other hand, are successful.

Instead of transformations, parsers and renderers can be used, as demonstrated in the executable example for JSON. The serial processing used here can be useful when dealing with large volumes of data.

The transformations used are as follows:

DEMO_ID_UPPER_LOWER

DEMO_ID_FROM_TO_MIXED






CL_GUI_FRONTEND_SERVICES - Frontend Services   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 3232 Date: 20240328 Time: 151624     sap01-206 ( 51 ms )