Skip to content

ABAP Keyword Documentation →  ABAP Overview →  ABAP and Unicode →  Differences between Unicode and Non-Unicode Programs 

Structure Typing in Unicode Programs

For downward compatibility reasons, a structure can still be cast for field symbols and parameters of function modules and subroutines using the obsolete addition STRUCTURE.

When assigning a data object to such a field symbol or passing an actual parameter to such a formal parameter, in non-Unicode programs, the system only checks whether the length of the data object or actual parameter has at least the length of the structure and whether the alignment is identical at runtime. Unicode programs make a difference between structured and elementary data objects or actual parameters. For a structured data object or actual parameter, its Unicode fragment view must match the cast structure including all alignment gaps (including the closing ones). In addition, an elementary data object or actual parameter must be character-like and flat.

When a formal parameter of a function module is typed with a flat structure using LIKE instead of TYPE, LIKE has the same effect as STRUCTURE. However, the system checks the exact length when passing the parameters in non-Unicode programs.

Other versions: 7.31 | 7.40 | 7.54


Note

The check of the Unicode fragment view can avoid problems that occur in non-Unicode systems due to closing alignment gaps. This can include the non-type-compliant filling of actual parameters with the content of an alignment gap.