Writing Variables to XML 
The command tt:write enables you to write the value of a variable or a parameter to the target XML document:
Syntax
<tt:write var="variable" [map="mapping_list"] [length|minLength=″length″] [validation] />
You use variable to specify the variable to be written or a parameter. The same applies to the attributes map, length, and minLength and to validation as to the statement tt:value. The variable must represent an elementary value.
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). The corresponding mapping rules apply, depending on the type of the variable (of the parameter).
The tt:write command is ignored in deserializations.
Serializing the start value of a variable.
Syntax
<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>