ABAPCALL_TRANSFORMATION_OPTIONS - CALL TRANSFORMATION OPTIONS

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

CALL TRANSFORMATION - transformation_options

Short Reference



Syntax

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


Additions

1. ... clear

2. ... data_refs

3. ... initial_components

4. ... technical_types

5. ... value_handling

6. ... xml_header

Effect

The addition OPTIONS permits you to specify predefined transformation options to which you canassign 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

...clear

Effect

The transformation option clear controls how the ABAP target fields are initialized when deserializing XML to ABAP.

Possible ValuesMeaning
allAll target fields specified after RESULT are initialized before calling the transformation. This is the recommended setting.
suppliedFor ST, the target fields which have a root node assigned to them in the ST programare initialized before calling the transformation. For XSLT, target fields for which there is a root node in the XML document are initialized before importing the nodes. Other target fields keep their value.
noneDefault, the target fields specified after RESULT are not initialized, except for internal tables

Note

The use of none can lead to some fields keeping their old value whilst others are assigned a new value. If a target field is structured, this can affect the individual components especially.

Addition 2

... data_refs

Effect

The transformation option data_refs controls the output ofdata references if the transformation is from ABAP to XML.

Possible ValuesMeaning
noDefault for ST, no data references are output.
heapDefault for XSLT and only allowed there; data referenced usingindependent data references is output as subelements of theasXML elements <asx:heap>. Data referenced usingdependent data references is not serialized.
heap-or-errorOnly possible for XSLT. As heap, whereby the exception CX_XSLT_DESERIALIZATION_ERROR is raised if the data to be serialized containsdependent data references.
heap-or-createOnly possible for XSLT. As heap, whereby data referenced usingdependent data references is handled like data referenced usingindependent data references.
embeddedReferenced data is output with the reference.

Addition 3

... initial_components

Effect

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

Possible ValuesMeaning
includeInitial components of structures are output.
suppress_boxedDefault setting, initial boxed components are not output, initial components of all other structures are output.
suppressInitial components of structures are not output.

Addition 4

... technical_types

Effect

The transformation option technical_types controls the behavior if no type description can be serialized whenserializing data references. This is the case when thetechnical type properties of thedynamic type of the data reference variable are known, but the type does not have a name.

Possible ValuesMeaning
errorDefault for XSLT and only allowed there. The serialization of a data reference variable with bound dynamic type raises the exception CX_XSLT_DESERIALIZATION_ERROR.
ignoreOnly possible for XSLT. A data reference variable with bound dynamic type is ignored during serialization.

Addition 5

... value_handling

Effect

The transformation option value_handling controls the tolerance of conversions whenmapping elementary ABAP types.

Possible ValuesMeaning
defaultDefault setting; during serialization, if there is an invalid value in a field oftype n, the exception CX_SY_CONVERSION_NO_NUMBER is raised. When deserializing, the exceptionCX_SY_CONVERSION_DATA_LOSS is raised if target fields of the types c, n, or x aretoo short or the exception CX_SY_CONVERSION_LOST_DECIMALS is raised if target fields of the type p have too few decimal places.
moveOnly possible in serializations. Invalid values in a field of type n are copied to XML without being changed.
accept_data_lossOnly possible in deserializations. If target fields of types c, n,or x are too short, surplus data for c and x is truncated to the right and surplus data for n is truncated to the left.
accept_decimals_lossOnly possible in deserializations. If target fields of the type p have too few decimal places, they are rounded up to the available decimal places.
reject_illegal_charactersOnly possible in deserializations. If a value to be deserialized contains charactersthat are not valid for the encoding of the XML document or for the current code page of AS ABAP, anexception of the type CX_SY_CONVERSION_CODEPAGE is raised. If the XML document is passed as an iXML input stream, the setting of the iXML parser overrides the encoding of the XML document.

Notes

  • The exceptions mentioned cannot be handled directly by CALL TRANSFORMATION and are packed into CX_TRANSFORMATION_ERROR or its subclasses.
  • If a value is specified that is not supported in the specified direction however, the directly handleable exception CX_SY_TRANS_OPTION_ERROR is raised.

Example

If value_handling = 'reject_illegal_characters' is specified, for example, an exception is raisedif, 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 6

... xml_header

Effect

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

Possible ValuesMeaning
noNo XML header is output.
without_encodingAn XML header is output without specifying the encoding.
fullDefault setting; an XML header is output, specifying the encoding.



CPI1466 during Backup   ABAP Short Reference  
This documentation is copyright by SAP AG.


Length: 12002 Date: 20120518 Time: 202709     triton ( 254 ms )