sapdev logo background
sapdev logo sapdev logo
Comments

SAP CONVERSION FLAT-ELEMENTARY documentation, setup help and example usage



Return to SAP documentation index


ARTICLE

Conversions Between Flat Structures and Single Fields

Conversion Outside of Unicode Programs
Outside of Unicode programs , the structure involved is regarded as a single field of type c (
casting ), whose length is determined by the length of its components and possible
alignment gaps . In this case, the assignment between the structure and the single field is done in accordance with the conversion rules between the data type c and the data type of the single field (see Conversion Rules for Elementary Data Types ).

Note
Assignments of this type are only advisable if the structure in question only contains character-like components. If a single field is assigned to a structure that does not only contain character-like components, the content of these components usually then no longer matches the data type, which means that it is no longer possible to evaluate them individually.

Conversion in Unicode Programs
The following rules apply in Unicode programs when converting a flat structure to a single field and back:
  • If a structure is purely character-like, it is handled in the conversion like a data object of the type c (casting). The single field can have any elementary data type.

  • If the structure is not purely character-like, the single field must have the type c and the structure must begin with a character-like fragment that is at least as long as the single field. The assignment takes place only between this fragment and the single field. The character-like fragment of the structure is handled like a data object of the type c (casting) in the assignment. If the structure is the target field, the remaining character-like fragments are filled with blanks and all other components with the initial value that corresponds to their type.

  • No conversion rule is defined for any other cases, and assignments are not possible.

    Note
    If a syntax error occurs due to an invalid assignment between flat structures and single fields, the fragment view of the corresponding structure can be displayed when displaying the syntax error in ABAP Editor by choosing the pushbutton with the information icon.
    Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




    CONVERSION_EXIT_GLOSRY
    CONVERSION_FLAT-FLAT




    comments powered by Disqus