Você está na página 1de 2

*&---------------------------------------------------------------------*

*& Report Z_PROG_CLASS


*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT Z_PROG_CLASS.
*step-1 defination of class
class class1 definition.
public section.
data : w_text(30) type c value 'prangya bikash'.
methods : display.
endclass.

step-2 implementation of class

class class1 implementation.


method display.
write :/ w_text.
endmethod.
endclass.
class childclass1 definition inheriting from class1.
public section.
methods display1.
endclass.

class childclass1 implementation.


method display1.
write :/ w_text.
endmethod.
endclass.
start-of-selection.

data : class1 type ref to class1,


childclass1 type ref to childclass1.

create object : class1,childclass1.


call method : class1->display,
childclass1->display1.

Você também pode gostar