<(><<)>tt:transform
xmlns:tt="http://www.sap.com/transformation-templates">
tt:root name="ROOT"/
<(><<)>tt:template>
<(><<)>tt:apply name="SUB">
tt:with-parameter name="PARA" ref="ROOT"/
<(><<)>/tt:apply>
<(><<)>/tt:template>
<(><<)>tt:template name="SUB">
<(><<)>tt:context>
tt:parameter name="PARA"/
<(><<)>/tt:context>
<(><<)>tt:cond-var check="PARA<(><<)>100">
<(><<)>X val="small">...<(><<)>/X>
<(><<)>/tt:cond-var>
<(><<)>tt:cond-var check="PARA>=100">
<(><<)>X val="big">...<(><<)>/X>
<(><<)>/tt:cond-var>
<(><<)>/tt:template>
/tt:transform
In tt:apply , the value of the data root ROOT is passed to
the parameter PARA of the subtemplate
SUB and checked there. Depending on whether the ABAP data
object bound to ROOT is smaller, greater than, or equal to 100,
the serialization generates either of the following:
X val="small" ... /X
or
X val="big" ... /X
is created. In the check conditions, you could also write
var(PARA) instead of PARA .
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved