Tuesday, 10 April 2012

OOPS-1

REPORT  ZO_CLASS1.

*----------------------------------------------------------------------*
*       CLASS CLASS1 DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS CLASS1 DEFINITION.

  PUBLIC SECTION.
    DATA: VAR1(10) TYPE C VALUE 'Demo Class'.

  PROTECTED SECTION.
    DATA: VAR2(10) TYPE C.

  PRIVATE SECTION.
    DATA: VAR3(10) TYPE C.

ENDCLASS.                    "CLASS1 DEFINITION

START-OF-SELECTION.

  DATA: OREF TYPE REF TO CLASS1.

  CREATE OBJECT OREF.

  WRITE:/ OREF->VAR1.