SAP ST TT SWITCH-VAR
Get Example source ABAP code based on a different SAP table
ARTICLE
Syntax
<(><<)>tt:[s-|d-]cond-var ...
<(><<)>tt:[s-|d-]cond-var ...
...
<(><<)>/tt:switch-var>
Effect
The statement
You can specify no more than one case that does not contain a
Serialization and Deserialization
Serialization and deserialization follow these rules: The first case
Note
Unlike the general case distinction with
Example
The following transformation extends the example from
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:switch-var>
<(><<)>tt:cond-var check='PARA<(><<)>50'>
<(><<)>X val='small'>...<(><<)>/X>
<(><<)>/tt:cond-var>
<(><<)>tt:cond-var check='PARA<(><<)>100'>
<(><<)>X val='medium'>...<(><<)>/X>
<(><<)>/tt:cond-var>
<(><<)>tt:cond-var>
<(><<)>X val='big'>...<(><<)>/X>
<(><<)>/tt:cond-var>
<(><<)>/tt:switch-var>
<(><<)>/tt:template>
<(><<)>/tt:transform>
Depending on the value of the ABAP data object bound to
or
or
is created. The position of the element