ARTICLE
ST - data , Assertions
Syntax
... data="..." ...
Effect
You can specify the following assertions for the content of the
attribute data of an element tt:cond
:
Assertion Meaning
initial(node) Met if the bound ABAP data object is initial
initial(var(variable)) Met if the variable is initial.
dnode|var(variable) = value , value = dnode|var(variable)
Met if the value of the connected ABAP data object or the variables
corresponds to the value specified in value .
The operands of the assertions can be data nodes, variables, or values.
Data nodes node are specified in a
special form .
You specify variables in the form var(variable) , where
variable is a variable or a
parameter .
Values value are ABAP values in the associated
display format .
You can specify an assertion as a list of more than one of the above
assertions, separated by commas. An assertion of this type is met if all
assertions in the list are met. Within the list, every data node may
appear only once.
Example
The element X is considered during serialization only if the ABAP
data object bound to ROOT is 11.
<(><<)>tt:transform
xmlns:tt="http://www.sap.com/transformation-templates">
tt:root name="ROOT"/
<(><<)>tt:template>
<(><<)>tt:s-cond data="ROOT=11">
<(><<)>X>
tt:value ref="ROOT" /
<(><<)>/X>
<(><<)>/tt:s-cond>
<(><<)>/tt:template>
/tt:transform
The element X is considered during serialization only if the
value of the ABAP data object bound to ROOT1 is initial and the
value of the ABAP data object bound to ROOT2 is 22.
<(><<)>tt:transform
xmlns:tt="http://www.sap.com/transformation-templates">
tt:root name="ROOT1"/
tt:root name="ROOT2"/
<(><<)>tt:template>
<(><<)>tt:s-cond data="initial(ROOT1),ROOT2=22">
<(><<)>X>
...
<(><<)>/X>
<(><<)>/tt:s-cond>
<(><<)>/tt:template>
/tt:transform
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved