Interactive reports in abap pdf6/14/2023 ![]() The instance constructor is executed each time you create an object (instance) with the CREATE OBJECT statement, while the class constructor is executed exactly once before you first access a class. Implicitly, each class has an instance constructor method with the reserved name constructor and a static constructor method with the reserved name class_constructor. They are placed in the PRIVATE section of the class. ![]() METHODS: set_attributes IMPORTING p_name(25) TYPE c,Ĭan only be called from inside the class. Static attributes are defined with the keyword CLASS-DATA. The data are the same for all instances of the class, and can be used e.g. Static attributes exist only once for each class. Instance attributes are declared with the DATA keyword. There exist one instance attribute for each instance of the class, thus they exist seperately for each object. There is no direct access from outside the class. The can only be viewes and changed from within the class. Private attributes are defined in the PRIVATE section. ![]() As a general rule, as few public attributes should be defined as possible. There is direct access to public attributes. Public attributes are defined in the PUBLIC section and can be viewed and changed from outside the class.
0 Comments
Leave a Reply. |