ABAP Keyword Documentation → ABAP - Reference → Assignments → Assignment Rules
Conversion Rules for Structures
When performing assignments between structures, you need to note the difference between flat and deep structures:
- Deep structures can only be assigned to each other if they are compatible. Full compatibility is not required for the following deep components, for which the specified requirements apply:
- For components that have a reference type, up casts but not down casts are permitted.
- For table-like components, it is sufficient if the row type is compatible. This means that the full compatibility needed for table categories and table keys is not required here.
- For flat structures, there are conversion rules for the following assignments between incompatible data objects:
Other versions: 7.31 | 7.40 | 7.54
Notes
- If subfield access to a structure is created and
the subfield is shorter than the structure, the subfield is treated like an operand of type
c
and the corresponding conversion rules apply. If the subfield is exactly the same length as the structure, the subfield is treated like the structure itself.
- You can use the
EXACT
addition of theMOVE
statement to make sure that the same assignment rules apply to both flat and deep structures.
- The conversion rules for structures are designed to prevent handleable exceptions from being raised. If a conversion is allowed, then it takes place.
Continue
Conversion Between Flat Structures