ST – Overview of Commands
ST programs are XML documents consisting of literal elements and ST commands. ST commands can be distinguished from literal elements (XML elements, attributes, and text) by their namespace “http://www.sap.com/transformation-templates“, for which the prefix tt is used by convention.
During serialization and deserialization, literal elements are copied unchanged into a target document or consumed from a source document and compared. ST commands are executed according to their semantics.
Data is addressed using tree structures whose root nodes (data roots) are bound to ABAP data objects. The root nodes can always be addressed directly using their names. In addition, you can define a current node, which you can address using $ref.
Command |
Meaning |
<tt:apply ...> |
Calls a subtemplate |
<tt:assign ...> |
Assigns a value to data |
<tt:attribute ...> |
Defines a non-literal attribute |
<tt:call ...> |
Calls an ST program |
<tt:call-method ...> |
Calls an ABAP Objects static method or instance method |
<tt:cast ...> |
|
<tt:clear ...> |
Initializes data |
<tt:cond ...> |
Defines a conditioned transformation |
<tt:cond-var ...> |
Defines a condition for variables |
<tt:context ...> |
Defines a context for local data roots in subtemplates |
<tt:copy ...> |
Transforms any data objects (except reference variables) to asXML |
<tt:create-object ...> |
|
<tt:d-cond ...> |
Defines a conditioned transformation for deserialization |
<tt:deserialize ...> |
Defines the direction of the transformation |
<tt:empty ...> |
Defines an empty pattern |
<... tt:extensible=″...″ ...> |
Controls the extensibility of literal XML elements |
<tt:front ...> |
Determines the leading part of a structured type |
<tt:group ...> |
Defines a group of conditioned transformations |
<tt:include ...> |
Includes an ST program |
<... tt:lax=″...″ ...> |
Controls the name comparison of literal XML elements |
<tt:loop ...> |
Transforms internal tables |
<tt:namespace ...> |
Declares a namespace |
<tt:node ...> |
Declares a component of a type |
<tt:parameter ...> |
Declares a parameter |
<tt:read ...> |
|
<tt:ref ...> |
Sets the current node in its own context |
<... tt:ref=″...″ ...> |
Sets the current node for a literal XML element |
<tt:root ...> |
Declares a data root |
<tt:serialize ...> |
Defines the direction of the transformation |
<tt:s-cond ...> |
Defines a conditioned transformation for the serialization |
<tt:skip ...> |
Skips XML elements during deserialization |
<tt:switch ...> |
Defines a case distinction between conditioned transformations |
<tt:switch-var ...> |
Defines a case distinction for variables |
<tt:template ...> |
Defines a main template or subtemplates |
<tt:text ...> |
Explicitly flags a literal text |
<tt:transform ...> |
Root element of an ST program |
<tt:type ...> |
Defines a type |
<tt:value ...> |
Transforms elementary data objects |
<... tt:value-ref =″...″ ...> |
Short form for transformation of elementary data objects in literal XML elements |
<tt:variable ...> |
Declares a variable |
<tt:with-parameter ...> |
Passes values to called ST programs, subtemplates, and ABAP methods |
<tt:with-root ...> |
Passes data nodes to called ST programs and subtemplates |
<tt:write ...> |
Writes the value of a variable to XML |