ABAP Keyword Documentation → ABAP - Release-Specific Changes → Changes in Release 4.6A
ABAP Objects - Inheritance and Compound Interfaces in Release 4.6A
In Release 4.6A the following components are added to the core functionality of ABAP Objects:
Other versions: 7.31 | 7.40 | 7.54
Modification 1
Inheritance
ABAP Objects enables inheritance
.
The addition INHERITING FROM
for the statement
CLASS class DEFINITION can be used to derive a class from a superclass. Each subclass inherits
all components from all superclasses and provides for specialization by adding its own components and
by using the REDEFINITION
previous
methods. This makes it possible to define inheritance trees that become more and more specific from subclass to subclass, starting from the root node OBJECT
.
The additions ABSTRACT
and FINAL
for the statements
CLASS
and
METHODS
make it possible to define abstract and final classes and methods.
Abstract classes cannot be instantiated. Abstract methods are not implemented in their class and can
occur only in abstract classes. Abstract methods can be implemented in a subclass of the abstract class.
Final classes cannot have any subclasses. Final methods cannot be redefined. All methods of final classes are automatically final.
Modification 2
Compound Interfaces
Interfaces can be nested
by specifying other interfaces as components in the definition of an interface:
INTERFACE i.
...
INTERFACES: i1, i2 ...
...
ENDINTERFACE.