Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Data Interfaces and Communication Interfaces →  ABAP and XML →  Transformations for XML →  ST - Simple Transformations 

ST - Overview of Commands

ST programs are XML data 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 in accordance with 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,a current node can be defined, which can be addressed using $ref.

ST Command Meaning
<tt:apply ...> Callss a subtemplate
<tt:assign ...> Assigns a value to data
<tt:attribute ...> Non-literal attribute
<tt:call ...> Call an ST program
<tt:call-method ...> Calls a static method or an instance method in ABAP Objects
<tt:cast ...> Down casts reference variables
<tt:clear ...> Initializes data
<tt:cond ...> Conditional transformation
<tt:cond-var ...> Condition for variables
<tt:context ...> Context for local data roots in subtemplates
<tt:copy ...> Transformation to and from asXML
<tt:create-object ...> Creates objects in ABAP Objects
<tt:d-cond ...> Conditional transformation for deserializations
<tt:deserialize ...> Defines the transformation direction
<tt:empty ...> Empty pattern
<... tt:extensible="..."...> Extensibility of literal XML elements
<tt:front ...> Initial part of a structured type
<tt:group ...> Groups conditional transformations
<tt:include ...> Includes an ST program
<... tt:lax="..." ...> Compares names of literal XML elements
<tt:loop ...> Loops across internal tables
<tt:namespace ...> Defines a namespace
<tt:node ...> Component of a type
<tt:parameter ...> Declares parameters
<tt:read ...> Reads a variable from XML
<tt:read-write ...> Short form of <tt:read ...> and <tt:write ...>
<tt:ref ...> Sets the current node
<... tt:ref="..."...> Sets the current node for a literal XML element
<tt:root ...> Declares a data root
<tt:serialize ...> Defines the transformation direction
<tt:s-cond ...> Conditional transformation for serializations
<tt:skip ...> SkipsXML elements in deserializations
<tt:switch ...> Defines a case distinction between conditional transformations.
<tt:switch-var ...> Case distinctions for variables
<tt:template ...> Main template or subtemplates
<tt:text ...> Literal text
<tt:transform ...> Root element of an ST program
<tt:type ...> Type definition
<tt:value ...> Transforms elementary data objects and structures
<... tt:value-ref ="..." ...> Short form of the transformation of elementary data objects
<tt:variable ...> Declares a variable
<tt:with-parameter ...> Passes a value to ST programs,subtemplates, and ABAP methods
<tt:with-root ...> Passes data to ST programs and subtemplates
<tt:write ...> Writes a variable to XML

Other versions: 7.31 | 7.40 | 7.54