Start of Content Area

Syntax documentation Writing Variables to XML  Locate the document in its SAP Library structure

The command tt:write enables you to write the value of a variable or a parameter into the target XML document:

 

<tt:write var=“variable“ [map=“mapping_list“] />

 

Use variable to specify the variable to be written or a parameter. For the attribute map the same applies as with the tt:value statement.

 

Serialization

The value of the variable (the parameter) is inserted into the XML document at the position of the command (if applicable, after the mapping_list).

 

Deserialization

During deserialization, the tt:writecommand has no effect.

 

Example

Serializing the start value of a variable.

 

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

  <tt:variable name="VARI" val="333" />

  <tt:template>
    <X>
      <tt:write var="VARI"/>
    </X>
  </tt:template>
</tt:transform>

 

The result of the serialization is:

 

<X>333</X>

 

 

End of Content Area