SAP CALL TRAFO UPPER LOWER ABEXA

Get Example source ABAP code based on a different SAP table
  


ARTICLE

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

ABAP_SOURCE_CODE
ABAP_EXEC

ABAP_DESCRIPTION
In deserializations of XML data to ABAP data, the XML elements in question 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 various 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 pass by parameter 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 correct pass by parameter is used. To do this, an ABAP method is called from the transformation and this method itself calls the predefined 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 transformations is not, however, symmetrical in all cases.
Instead of transformations, parsers and renderers can be used, as demonstrated in the example for JSON. The serial processing used here can be useful when dealing with large volumes of data.