sapdev logo background
sapdev logo sapdev logo
Comments

SAP ST USING documentation, setup help and example usage



Return to SAP documentation index


ARTICLE

ST - using , Preconditions

Syntax
... using="..." ...

Effect
The following preconditions can be specified for the content of the attribute using of an element tt:cond
:
Precondition Meaning
exist(node) Met if an ABAP data object is bound to the node
type-...(node) Met if an ABAP data object of type ... is bound to the node
Each predefined ABAP type has a precondition type-... where the data type is specified in uppercase letters (see examples). The operand node can be a data node, which must be specified in a
special form .
A single precondition can be specified as a list of several of the above preconditions, separated by commas. Such a precondition is met if all preconditions 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 of type c .
<(><<)>tt:transform
xmlns:tt="http://www.sap.com/transformation-templates">
tt:root name="ROOT"/
<(><<)>tt:template>
<(><<)>tt:s-cond using="type-C(ref('ROOT'))">
<(><<)>X>
...
<(><<)>/X>
<(><<)>/tt:s-cond>
<(><<)>/tt:template>
/tt:transform
Instead of "type-C(ref('ROOT'))" , "type-C(ROOT)" is of course also possible here.

Example
The element X is respected by serializations only if the ABAP data object bound to ROOT1 is of type
int8 i and the ABAP data object bound to ROOT2 is of type d
.
<(><<)>tt:transform
xmlns:tt="http://www.sap.com/transformation-templates">
tt:root name="ROOT1"/
tt:root name="ROOT2"/
<(><<)>tt:template>
<(><<)>tt:s-cond using="type-I(ROOT1), type-D(ROOT2)">
<(> <)>
<(><<)>X>
...
<(><<)>/X>
<(><<)>/tt:s-cond>
<(><<)>/tt:template>
/tt:transform
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




ST_TT_WRITE
ST_VALUE_ABEXA




comments powered by Disqus