Show TOC Entering content frame

Procedure documentation Creating the Transformation Program Locate the document in its SAP Library structure

Use

In a transformation program, you implement the rules for the transformation using the XSLT (and its additional statements) and Structure linkSimple Transformation languages.

Transformation programs, like ABAP programs, are Repository objects and are assigned to other packages. All changes and transports are managed through the Transport Organizer.

Procedure

To create a transformation program:

1.       Start the Object Navigator (SE80) and select the package in the Repository Browser.

2.       Choose Create ® Other ® Transformation in the context menu (right click with the mouse).

The system displays the Create Transformation Program dialog box.

3.       Enter a name and short description for the new transformation program.

4.       Decide whether you want to create XSLT transformation or Simple Transformation.

5.       Choose This graphic is explained in the accompanying text to confirm your entries.

Result

The transformation program was created as a Repository object and included in the tree display of the object list under Transformations.

<xsl:transform version="1.0"

  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

  xmlns:sap="http://www.sap.com/sapxsl"

>

<xsl:strip-space elements="*"/>

 

<xsl:template match="/">

</xsl:template>

 

</xsl:transform>

 

 

Standard Source Text and Program Structure: XSLT Transformation

Generated line

Meaning

<xsl:transform version="1.0"

Specifies the XSL version.
Each XSLT program has to support Version 1.0.

xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

Declares the namespace for the XSL standard.
Each valid XSLT program has to support this standard.

xmlns:sap="http://www.sap.com/sapxsl"

Declares the SAP namespace extension needed for ABAP calls. 

<xsl:strip-space elements="*"/>

Ensures that "whitespaces" (spaces, tabulator, return, and so on) are not considered in any of the elements of the document tree at runtime for the purpose of improving performance.
This line is a proposal especially for representing data structures.

Insert your source text with global elements (such as parameters) here.

 

<xsl:template match="/">

Defines the beginning of the XSL templates and associates the template with the root of the XML document.

Define one or more templates with the relevant transformation rules here.

 

</xsl:template>

Defines the end of the XSL template.

</xsl:transform>

Defines the end of the XSLT program.

 

 

<?sap.transform simple?>

<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">

 

<tt:root name="ROOT"/>

 

<tt:template>

</tt:template>

 

</tt:transform>

 

 

Standard Source Text and Program Structure: Simple Transformation

Generated line

Meaning

<?sap.transform simple?>

Generated during checking/activating, used for recognizing the source text type.

<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">

Top-level element for a Simple Transformation, with namespace declaration.

<tt:root name="ROOT"/>

Declaration of an ABAP root node. The name “ROOT” is only an example. Any number of root nodes (but at least one) can be declared here.

<tt:template>

 

Definition of the transformation

</tt:template>

 

Any number of additional (named) templates can be defined here for modularization purposes.

</tt:transform>

 

In either case, this standard source text is the starting point for your own implementation of the transformation rules.

 

See also:

Structure linkSAP XSLT Processor Reference

Testing Transformation

 

 

Leaving content frame