C) Visibility Components of the Class:
Each Component of a class must have a Visibility. In ABAP Classes, the whole class
definition is divided into three visibility sections.
1. Public Section
2. Protected Section
3. Private Section
CLASS <class_name> DEFINITION.
PUBLIC SECTION.
……..
PROTECTED SECTION.
……………
PRIVATE SECTION.
………..
END CLASS.
Public section: Data declared in public section can be accessed by the class itself, by
its subclasses as well as by other users outside the class.
Protected section: Data declared in the protected section can be accessed by the
class itself, and also by its subclasses but not by external users outside the class.
Private Section: Data declared in the private section can be accessed by the class
only, but not by its subclasses and by external users outside the class.
Please note: They (Public/Protected/Private) have to be defined in the order shown
above.