Execution of class_constructors in subclass
hi all, i'm new to abap objects but the testing the code below puzzles me. can anyone explain why if i execute WRITE b=>d, the sub class_constructor is not executed? i would expect that after executing the super c-c, the sub c-c is next. as expected, only the super c-c is executed for WRITE a=>d.
i had read, once a subclass is addressed, the c-c is executed if it hasn't been yet, after all unperformed super c-c's are executed. but why when addressing b=>d not perform it?
CLASS a DEFINITION.
CLASS-DATA d TYPE c VALUE 'D'.
CLASS b DEFINITION INHERITING FROM a.
CLASS a IMPLEMENTATION.
WRITE:/ 'Superclass constructor'.
CLASS b IMPLEMENTATION.
WRITE:/ 'Subclass constructor'.