SAP CONVERSION FLAT ELEMENTARY



Get Example source ABAP code based on a different SAP table
  



Conversion Between Flat Structures and Single Fields
The following rules apply when converting a flat structure to a single field and vice versa:
If a structure is purely character-like, it is handled like a data object of the type c (casting) during conversion. The single field can have any elementary data type, except for an enumerated type.
If the structure is not completely 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) during assignment. If the structure is the target field, the remaining character-like fragments are filled with blanks and all other components with the type-dependent initial value.
No conversion rule is defined for any other cases, and assignments are not possible.



Latest notes:

NON_V5_HINTS
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 by choosing the pushbutton with the information icon when the syntax error is shown in the ABAP Editor.
ABAP_HINT_END

ABAP_EXAMPLE_VX5
Conversion of the character-like abcde to a flat structure of character-like components. After this, each component contains a letter.
ABEXA 00913
ABAP_EXAMPLE_END