REPORT zsr_test.
*----------------------------------------------------------------------*
* INTERFACE it
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
INTERFACE it.
DATA v_txt TYPE char50.
METHODS: meth1, meth2.
ENDINTERFACE. "it
*----------------------------------------------------------------------*
* CLASS cls DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS cls DEFINITION.
PUBLIC SECTION.
INTERFACES it.
ENDCLASS. "cls DEFINITION
*----------------------------------------------------------------------*
* CLASS cls IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS cls IMPLEMENTATION.
METHOD it~meth1.
it~v_txt = 'First Interface Method'.
WRITE / it~v_txt.
ENDMETHOD. "it~meth1
METHOD it~meth2.
it~v_txt = 'Second Interface Method'.
WRITE / it~v_txt.
ENDMETHOD. "it~meth2
ENDCLASS. "cls IMPLEMENTATION
START-OF-SELECTION.
DATA obj TYPE REF TO cls.
CREATE OBJECT obj.
CALL METHOD: obj->it~meth1,
obj->it~meth2.
Serkan AKKAVAK
Bilgisayar Mühendisi
serkurumsal@yandex.com
Social Plugin