Start of Content Area

Syntax documentation ST Program Structure  Locate the document in its SAP Library structure

An ST program must be a valid XML document with the following structure:

 

<?sap.transform simple?>

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

  [<tt:type name="..." [...]>
     ...
  
</tt:type>
   ...]

  [<tt:root name="root1" [...] />
   <tt:root name="
root2" [...] />
   ...]

  [<tt:parameter name="para1" [...] />
   <tt:parameter name="
para2" [...] />
   ...]

  [<tt:variable name="vari1" [...] />
   <tt:variable name="
vari2" [...] />
   ...]

  <tt:template [name=="tmpl"]>
    ...
</tt:template>

  [<tt:template [name=="..."]>
     ...
   </tt:template>
   ...]

</tt:transform>

 

The first line <? … ?> is used to detect the program type (ST). You need not enter it, because the syntax check automatically inserts it.

The elements of namespace “http://www.sap.com/transformation-templates“ are ST commands. Namespace prefix tt is used in this documentation as a convention for this namespace. ST commands can be XML elements or attributes. All other elements are called literal elements, which means that they have no semantics within the ST language.

Possible elements of an ST program are:

     Type definitions with tt:type.

     A root element tt:transform

     Various data declarations with tt:root, tt:parameter and tt:variable

     A main template defined with tt:template and any number of subtemplates. A template is a pattern for the XML document into which ABAP data is serialized or from which data is deserialized, respectively.

These elements can be in any order.

Note

In this documentation and in the example programs, double quotes (”) are used as outer quotes and single quotes (‘) as inner quotes. However, as usual in XML, this is not mandatory. For example, you can also write 'not-initial(ref("X.Y"))' instead of "not-initial(ref('X.Y'))".

 

Example.

 

End of Content Area