Ansicht
Dokumentation
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 ReferenceThis documentation is copyright by SAP AG.
Transformation of XML Element Names
This example demonstrates the transformation of letters in XML element names.
Source Code
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 identity transformation ID creates asXML with XML element names in uppercase letters.
- 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.
- DEMO_ID_UPPER_LOWER also transforms lowercase letters to uppercase letters.
- DEMO_ID_FROM_TO_MIXED also calls a method for to_mixed. This simple example transformation is not, however, symmetrical in all cases.
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 )