SAP INHERITANCE VISIBILITY
Get Example source ABAP code based on a different SAP table
ARTICLE
Inheritance and Visibility
You cannot change the
Public components
The public visibility area of a subclass consists of all its own public components plus the public components of all its superclasses. From outside the class, public components are visible without restrictions.
Protected components
The protected visibility area of a subclass consists of all its own protected components plus the protected components of all its su perclasses. The protected section is visible only in the class itself and in all its subclasses. Viewed from outside, protected is the same as private.
Private components
The private visibility area of a subclass includes only the private components of this class. They are visible only in this class. The private components of superclasses cannot be used in subclasses. Only methods inherited from superclasses use (provided they have not been redefined) the private attributes of the superclass (even if the subclass has private attributes with the same name).
Example of protected components
Within a subnode in the inheritance tree, you can always access the protected components of superclasses. The classes involved, such as the static types of reference variables, must however be part of the inheritance tree.
In the following example, the reference variables