1. Structure Enhancement Possibilities
2. Problems Caused by Structure Enhancements
3. Enhancement Classification in the Dictionary
4. Enhancement Handling in Program Check
Customers can enhance structures and tables, defined by SAP in the ABAP Dictionary, in the following ways:
These types of enhancements affect not only the enhanced structures and tables themselves, but also
all dependent structures that adopt the enhancement as an include or substructure. For example, if an
enhancement using an Append takes effect only at the end of the initial structure, it will affect all the dependent structures.
In programs without active Unicode check, structure enhancements can cause significant problems with
type checks or if used in connection with deep structures, leading both to syntax and runtime errors.
In programs with active Unicode check, assignments, operand checks, and
accesses using offset and length are also affected and problems can arise. For example, if a purely
character-type structure is enhanced by inserting numeric or deep components, it can lose its character-type
nature. Enhancements cause further problems because they can change the Fragment
View and hence affect the checks (based on the fragment view) for assignments and comparisons.
So that the effects of structure enhancements are visible, you can classify structures and tables in the Dictionary under Extras → Enhancement Category as follows:
Level | Category | Description |
1 | Not classified | The structure has no enhancement category |
2 | Cannot be enhanced | The structure cannot be enhanced |
3 | Can be enhanced (character-type) | All structure components and their enhancements must be character-type |
4 | Can be enhanced (character-type or numeric) | The structure and its enhancement cannot contain deep data types |
5 | Can be enhanced any way you wish | The structure and its enhancement can contain components with any data type |
Character-type includes elementary
types C, D, N, and T; numeric includes the elementary
types F, I, P, and X. The deep types STRING and XSTRING are not supported.
Notes
The ABAP program check uses the structure enhancement classification in the Dictionary to indicate all points in the source code that can lead to problems in connection with structure enhancements. The warnings are separated into three classes, depending on the effects of the permissible structure enhancements:
Class | Type of check | Description |
A | Syntax check | Every enhancement using the enhancement categories causes a syntax error |
B | Extended check | Permissible enhancements can cause a syntax error, but not in every case |
C | Extended check | No syntax errors, but semantic problems due to changed program behavior |
Notes
All structure enhancement checks are only effective in programs with an active Unicode check. Only static checks are carried out and no checks at runtime. The check also includes non-classified structures and tables, as long as the initial structure contains includes or substructures that can be enhanced.