Entering content frameFunction documentation Structure Enhancements Locate the document in its SAP Library structure

 

  1. Possibilities offered by structure enhancements
  2. Problems with structure enhancements
  3. Classifying enhancements in the ABAP Dictionary
  4. Handling the enhancement in the program check

 

1. Possibilities offered by structure enhancements

Customers can subsequently enhance structures and tables, defined by SAP in the ABAP Dictionary, as follows: Customizing Includes

Enhancements of this kind affect not only the structures and tables themselves but also all dependent structures that take 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.

 

2. Problems with structure enhancements

In programs without an 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 an 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.

 

3. Classifying enhancements in the ABAP Dictionary

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-type)

The structure and its enhancement cannot contain deep data types

5

Can be enhanced in any way

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.


NoteFor structures and tables with includes or substructures, the enhancement categories of these includes and substructures cannot be lower than those of the initial structure. For example, if the initial structure contains a level 4 include, that initial structure cannot be a more restrictive level 2 or 3 structure.

NoteStructure enhancements in the Dictionary can also affect internal structures in ABAP programs if Dictionary structures are used as an include or substructure in the source code. These dependencies are implicitly taken into account in the ABAP program check. This also includes non-classified structures containing includes or substructures that can be enhanced.

 

4. Enhancement handling in the program check

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 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 because program behavior has changed

 

NoteAll 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.

 

 

 

 

Leaving content frame