CLASS class1 DEFINITION.
PUBLIC SECTION.
data: pernr type pernr-pernr.
methods: method1 final.
endclass.
class class1 implementation.
method method1.
pernr = '00010001'.
write:/ 'Pernr is :', pernr , '(Final Method)'.
endmethod.
endclass.
class class2 definition INHERITING FROM class1.
PUBLIC SECTION.
methods method1 REDEFINITION.
endclass.
class class2 implementation.
endclass.
start-of-selection.
data: obj1 type ref to class1,
obj2 type ref to class2.
create object : obj1, obj2.
call method: obj1->method1,
obj2->method1.
Serkan AKKAVAK
Computer Engineer BSc
SAP Department Deputy Manager
Contact : serkurumsal@yandex.com
0 Comments