ABAP Keyword Documentation → ABAP - Reference → Data Interfaces and Communication Interfaces → ABAP and XML → Transformations for XML
XSL Transformations
An XSL transformation is a program in the repository that is written in
XSLT (XSLT program) and used for
the transformation of XML data. Existing ST programs in the repository can be called using the statement
CALL TRANSFORMATION
. XSLT programs are edited in the
Transformation Editor, which can be accessed directly using transaction STRANS or called up in Object Navigator in
ABAP Workbench by choosing
Edit Object → More → Transformation and selecting XSLT Program.
The source and result of a general XSL transformation are
XML data. When an XSL transformation
is called using the statement CALL TRANSFORMATION
, however, ABAP data can also be transformed directly to XML and back. For this purpose, a
serialization or
deserialization is performed implicitly, with
asXML as an intermediate format.
- In the case of transformations that use ABAP data as a source, the ABAP data is first serialized to a
canonical XML representation (asXML) with the predefined
identity transformation ID. This intermediate result
is then used as the actual source for the XSL transformation. If the transformation ID itself is called in
CALL TRANSFORMATION
, the intermediate result is in the direct output.
- In the case of transformations that have ABAP data as a result, the result of the XSL transformation is deserialized directly to the ABAP data. A prerequisite for the deserialization is that the result represents a canonical XML format. For transformations from XML to ABAP, the XML is first also transformed (conceptually) to an asXML structure, which is then deserialized, even if, technically, only one transformation step takes place.
The ABAP runtime environment contains an SAP XSLT processor for executing the transformations. It supports almost all XSLT statements and provides enhancements (extension instructions) such as the option of calling ABAP methods from XSLT programs. Documentation about the SAP XSLT processor can be found in the
SAP NetWeaver documentation in SAP Help Portal.
Other versions: 7.31 | 7.40 | 7.54