AS ABAP Release 758, ©Copyright 2024 SAP SE. All rights reserved.
ABAP - Keyword Documentation → ABAP - Programming Language → Processing Internal Data → Assignments → Assignment and Conversion Rules → Conversion Rules for Structures →Conversion Between Flat Structures and Single Fields
The following rules apply when converting a flat structure to a single field and vice versa:
No conversion rule is defined for any other cases, and assignments are not possible.
Hint
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.
Example
Conversion of the character-like abcde to a flat structure of character-like components. After this, each component contains a letter.
TYPES:
BEGIN OF characters,
a TYPE c LENGTH 1,
b TYPE c LENGTH 1,
c TYPE c LENGTH 1,
d TYPE c LENGTH 1,
e TYPE c LENGTH 1,
f TYPE c LENGTH 1,
g TYPE c LENGTH 1,
h TYPE c LENGTH 1,
i TYPE c LENGTH 1,
j TYPE c LENGTH 1,
k TYPE c LENGTH 1,
l TYPE c LENGTH 1,
m TYPE c LENGTH 1,
n TYPE c LENGTH 1,
o TYPE c LENGTH 1,
p TYPE c LENGTH 1,
q TYPE c LENGTH 1,
r TYPE c LENGTH 1,
s TYPE c LENGTH 1,
t TYPE c LENGTH 1,
u TYPE c LENGTH 1,
v TYPE c LENGTH 1,
w TYPE c LENGTH 1,
x TYPE c LENGTH 1,
y TYPE c LENGTH 1,
z TYPE c LENGTH 1,
END OF characters.
FINAL(abcde) = 'abcdefghijklmnopqrstuvwxyz'.
cl_demo_output=>display( CONV characters( abcde ) ).