REPORT ZO_CLASS5.
*----------------------------------------------------------------------*
* CLASS CLASS1 DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS CLASS1 DEFINITION.
PUBLIC SECTION.
DATA: INSTDATA(25) TYPE C VALUE 'Instance Variable'.
METHODS: INSTMET.
CLASS-DATA: STATDATA(25) TYPE C VALUE 'Static Variable'.
CLASS-METHODS: STATMET.
ENDCLASS. "CLASS1 DEFINITION
*----------------------------------------------------------------------*
* CLASS CLASS1 IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS CLASS1 IMPLEMENTATION.
METHOD INSTMET.
WRITE:/ STATDATA, INSTDATA.
ENDMETHOD. "INSTMET
METHOD STATMET.
WRITE:/ STATDATA.
ENDMETHOD. "STATMET
ENDCLASS. "CLASS1 IMPLEMENTATION
START-OF-SELECTION.
DATA: OREF TYPE REF TO CLASS1.
CREATE OBJECT OREF.
CALL METHOD CLASS1=>STATMET.
CALL METHOD OREF->INSTMET.
*----------------------------------------------------------------------*
* CLASS CLASS1 DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS CLASS1 DEFINITION.
PUBLIC SECTION.
DATA: INSTDATA(25) TYPE C VALUE 'Instance Variable'.
METHODS: INSTMET.
CLASS-DATA: STATDATA(25) TYPE C VALUE 'Static Variable'.
CLASS-METHODS: STATMET.
ENDCLASS. "CLASS1 DEFINITION
*----------------------------------------------------------------------*
* CLASS CLASS1 IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS CLASS1 IMPLEMENTATION.
METHOD INSTMET.
WRITE:/ STATDATA, INSTDATA.
ENDMETHOD. "INSTMET
METHOD STATMET.
WRITE:/ STATDATA.
ENDMETHOD. "STATMET
ENDCLASS. "CLASS1 IMPLEMENTATION
START-OF-SELECTION.
DATA: OREF TYPE REF TO CLASS1.
CREATE OBJECT OREF.
CALL METHOD CLASS1=>STATMET.
CALL METHOD OREF->INSTMET.