Ansicht
Dokumentation

ABENST_TT_EXTENSIBLE - ST TT EXTENSIBLE

ABENST_TT_EXTENSIBLE - ST TT EXTENSIBLE

ROGBILLS - Synchronize billing plans   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

- tt:extensible, Extensibility of Literal XML Elements

... tt:extensible="on"$|"deep-static"$|"deep-dynamic"$|"off"$|"deep-off"  ...

Effect

In deserializations, XML elements in the input stream that are not specified in the ST program normally produce an error. If the processed XML format is to be extensible, elements that are not specified explicitly can be skipped without further processing through specification of the optional attribute tt:extensible. The attribute can have the following values:

  • The value ″on" states that the current element may have direct subelements that are not explicitly specified. This is the standard setting.
  • Values ″deep-static" and ″deep-dynamic" state that the current element and its subelements can be enhanced. The value "off" deactivates extensibility for the current element but not its subelements. In other words, direct subelements cannot be added to the element but its (specified) subelements can be.
  • The value "deep-off" deactivates extensibility for the current element and its subelements. These settings can be overwritten locally in individual subelements.

The values "deep-static" and "deep-dynamic" have different areas of validity:

  • "deep-static" only has an effect within the part of the program in which it is set.

The deep extensibility that is configured using ″deep-static" and ″deep-dynamic" also takes effect in case distinctions with tt:switch and groupings with tt:group by skipping unexpected elements that are not covered by a case.

Example

This example shows that extensibility together with optional elements (such as elements that are only deserialized when a condition occurs) causes problems, since extensibility generally means that such optional elements are not found. For example, the following section of program

r tt:extensible="on">
  tt:cond> a tt:value-ref="A"/> /tt:cond>
  b tt:value-ref="B"/>
/r>

with the input stream

rx/>a1/a>b2/b></r>

would not produce the deserialization A=1 since the unexpected element x determines the condition negatively using a. Both x and a are skipped as "extension elements" and only the mandatory element b is deserialized as B=2. The problem can be solved by using tt:group, although this also resolves the order of a and b:

r tt:extensible="on">
  tt:group>
    tt:cond frq="?"> a tt:value-ref="A"/> /tt:cond>
    tt:cond>         b tt:value-ref="B"/> /tt:cond>
  /tt:group>
/r>






Vendor Master (General Section)   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 5393 Date: 20240424 Time: 005741     sap01-206 ( 68 ms )