Show TOC

Background documentationSorting Class and Interface Enhancements Locate this document in the navigation structure

 

When sorting class and interface enhancements, the system uses information about the installed software components. Each software component has a software layer level assigned to it. Knowing the package to which an enhancement implementation belongs, you can determine the corresponding software layer level of the enhancement implementation.

Note Note

The function module OCS_GET_INSTALLED_COMPS provides information about the components installed on the system and their software layers.

End of the note.

There is a new relationship between the enhancement object and the software layer level: when you save a class or an interface enhancement implementation, information about the corresponding software layer level is also stored in the database. The consecutive number of the layer level is evaluated by the ABAP compiler at execution time and, in most cases, the enhancement implementations are executed in ascending order according to the existing software layer levels. Within one and the same software layer level, the enhancement implementations are sorted alphabetically.

The following rule applies to the execution order of method exits:

  • the pre-methods are sorted in descending order according to the software layer levels

  • the post-methods and the overwrite-methods are sorted in ascending order according to the software layer levels.

Note Note

Usually, the SAP_BASIS component belongs to the lowest software layer level in the system (01). This means the SAP_BASIS pre- and post-methods are executed in the closest proximity to the method which is enhanced. In case the system does not support a hierarchy of installed application components, or the class or the interface is not enhanced by enhancements belonging to different software components, the enhancement implementations are sorted alphabetically.

End of the note.