In the program e1 is class event and c1 a class method. I tried calling class event using invocation for class methods c1=>t1 and invocation for object methods c1->t1 and both are successful. why? As we know class methods are always called by c1=>t1.
REPORT my_event7.
CLASS c1 DEFINITION.
PUBLIC SECTION.
CLASS-EVENTS: e1.
METHODS: m1 FOR EVENT e1 OF c1.
CLASS-METHODS : t1.
ENDCLASS. "c1 DEFINITION
CLASS c1 IMPLEMENTATION.
METHOD : t1.
WRITE:/5 'C1->T1'.
RAISE EVENT e1.
ENDMETHOD.
METHOD : m1.
WRITE:/5 ' C1->M1'.
ENDMETHOD. ":
ENDCLASS. "c1 IMPLEMENTATION
CLASS c2 DEFINITION.
PUBLIC SECTION.
METHODS: m2 FOR EVENT e1 OF c1.
ENDCLASS. "c2 DEFINITION
CLASS c2 IMPLEMENTATION.
METHOD : m2.
WRITE:/5 ' C2->M2'.
ENDMETHOD.
ENDCLASS. "c2 IMPLEMENTATION
START-OF-SELECTION.
DATA: oref1 TYPE REF TO c1.
DATA: oref2 TYPE REF TO c2.
CREATE OBJECT: oref1 .
CREATE OBJECT: oref2 .
SET HANDLER oref1->m1 oref2->m2.
CALL METHOD c1=>t1.
CALL METHOD oref1->t1.