CALL TRANSFORMATION - transformation_options

Short Reference

Syntax

... OPTIONS [data_refs          = val]
            [initial_components = val]
            [technical_types    = val]
            [value_handling     = val]
            [xml_header         = val] ... .


Extras:

1. ... data_refs

2. ... initial_components

3. ... technical_types

4. ... value_handling

5. ... xml_header

Effect

The addition OPTIONS permits you to specify predefined transformation options to which you can assign certain values in order to control the transformation. The values must be defined as data objects val of type c or string. Each transformation option may only be specified once.

Addition 1

... data_refs

Effect

Transformation option data_refs controls the output of data references if the transformation is from ABAP to XML.

Possible values Meaning
no Default for ST, no data references are output.
heap Default for XSLT and only allowed there; data referenced with independent data references is output as subelements of the asXML elements <asx:heap>. Data referenced with dependent data references is not serialized.
heap-or-error Only allowed for XSLT. As heap, whereby the exception CX_XSLT_DESERIALIZATION_ERROR occurs if the data to be serialized contains dependent data references.
heap-or-create Only allowed for XSLT. As heap, whereby data referenced with dependent data references is treated like data referenced with independent data references.
embedded Referenced data is output with the reference.

Addition 2

... initial_components

Effect

Transformation option initial_components controls the output of initial structure components when transforming from ABAP to XML.

Possible values Meaning
include Default setting, initial components of structures are output.
suppress Initial components of structures are not output.

Addition 3

... technical_types

Effect

Transformation option technical_types controls the behavior if no type description can be serialized when transforming serializing data references. This is the case when the technical type properties of the dynamic type of the data reference variables are known, but the type does not have a name.

Possible values Meaning
error Default for XSLT and only allowed there. The serialization of a data reference variable with bound dynamic type leads to the exception CX_XSLT_DESERIALIZATION_ERROR.
ignore Only allowed for XSLT. A data reference variable with bound dynamic type is ignored during serialization.

Addition 4

... value_handling

Effect

Transformation option value_handling controls the tolerance of conversions when mapping elementary ABAP types.

Possible values Meaning
default Default setting; during serialization, if there is an invalid value in a field of type n, an exception is raised. During deserialization, exception CX_SY_CONVERSION_DATA_LOSS is raised if target fields of types c, n or x are too short.
move Only effective during serialization. Invalid values in a field of type n are copied to XML without change.
accept_data_loss Only effective during deserialization. If target fields of types c, n, or x are too short, extra data for c and x is truncated to the right and extra data for n is truncated to the left.

Note

The mentioned exceptions cannot be directly handled with CALL TRANSFORMATION and are packed into CX_TRANSFORMATION_ERROR or its subclasses.

Example

If value_handling = 'reject_illegal_characters' is specified, for example, an exception occurs if, in the XML header of an XML document in the Latin-1 character set, encoding="utf-8" is specified and the XML document contains characters other than those of the 7-bit ASCII character set.

Addition 5

... xml_header

Effect

Transformation option xml_header controls output of the XML header when transforming to XML and writing in a data object of type c, string, or an internal table.

Possible values Meaning
no No XML header is output.
without_encoding An XML header is output without specifying the encoding.
full Default setting; an XML header is output, specifying the encoding.