Skipping XML Elements During Deserialization 
The following command allows you to skip XML elements during deserialization.
<tt:skip [name=""] [count="name"]/>cnt
The tt:skip command can be positioned anywhere within a template.
During serialization, tt:skip has no effect.
During deserialization, tt:skip has the following effect:
Without additions, the following XML content of the inbound stream is consumed up to the end of the current element or non-literal attribute, but no other ST commands are executed.
With the name attribute and the count attribute, as many consecutive elements of the name name are not deserialized as specified by a number cnt.
With the name attribute and without the count attribute, or with the count="*" attribute, any number of consecutive elements of the name name are not deserialized.
Without the name attribute and with the count attribute, as many consecutive elements after the current element are not deserialized as specified in cnt. For cnt, you can specify a number or *, where * stands for any number of elements.
During deserialization, when comparing the template, the tt:skip command is compared to the structure of the inbound stream as if the skipped elements were specified in its place. This means that a tt:skip command with the name attribute is correct only if this position of the XML inbound stream also has the corresponding number of elements of the specified name, and the element of a template executed after a tt:skip command must correspond to the element in the XML document that follows after the skipped elements.
In the Simple Transformation below, the template is divided into a part for serialization and a part for deserialization. During deserialization, the first two X1 elements, all X2 elements after the first X2 element, and the Y element including all its subelements are skipped.
Syntax
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
<tt:root name="ROOT"/>
<tt:template>
<struc tt:ref="ROOT">
<tt:serialize>
<X1><tt:value ref="COL0" /></X1>
<X1><tt:value ref="COL1" /></X1>
<X1><tt:value ref="COL2" /></X1>
<X2><tt:value ref="COL3" /></X2>
<X2><tt:value ref="COL4" /></X2>
<X2><tt:value ref="COL5" /></X2>
<Y>
<X3><tt:value ref="COL6" /></X3>
<X3><tt:value ref="COL7" /></X3>
<X3><tt:value ref="COL8" /></X3>
</Y>
<X4><tt:value ref="COL9" /></X4>
</tt:serialize>
<tt:deserialize>
<tt:skip name="X1" count="2" />
<X1><tt:value ref="COMPA" /></X1>
<X2><tt:value ref="COMPB" /></X2>
<tt:skip name="X2" count="*" />
<tt:skip name="Y" count="1" />
<X4><tt:value ref="COMPC" /></X4>
<tt:skip />
</tt:deserialize>
</struc>
</tt:template>
</tt:transform>
The following ABAP program can call the transformation:
Syntax
DATA xml_string TYPE string.
DATA: BEGIN OF struc,
col0 TYPE i VALUE 0,
col1 TYPE i VALUE 1,
col2 TYPE i VALUE 2,
col3 TYPE i VALUE 3,
col4 TYPE i VALUE 4,
col5 TYPE i VALUE 5,
col6 TYPE i VALUE 6,
col7 TYPE i VALUE 7,
col8 TYPE i VALUE 8,
col9 TYPE i VALUE 9,
END OF struc.
DATA: BEGIN OF result,
compa TYPE i,
compb TYPE i,
compc TYPE i,
END OF result.
CALL TRANSFORMATION ...
SOURCE root = struc
RESULT XML xml_string.
CALL TRANSFORMATION ...
SOURCE XML xml_string
RESULT root = result.
After the deserialization, the components of result receive the values of the third, fourth, and tenth component of struc.