Creating multiple Objects in ABAP Objects

Go down

Creating multiple Objects in ABAP Objects

Post  Admin on Sun Apr 08, 2012 9:36 pm

REPORT ZKRISH_OOPS_01.

CLASS C1 DEFINITION.
PUBLIC SECTION.
DATA A TYPE I.
METHODS M1.
ENDCLASS.

CLASS C1 IMPLEMENTATION.
METHOD M1.
WRITE : A.
ENDMETHOD.
ENDCLASS.

DATA: OBJ1 TYPE REF TO C1.
DATA: OBJ2 TYPE REF TO C1.

START-OF-SELECTION.
CREATE OBJECT OBJ1.
CREATE OBJECT OBJ2.


OBJ1->A = 4.
OBJ2->A = 100.

CALL METHOD OBJ1->M1.
CALL METHOD OBJ2->M1.

Admin
Admin

Posts : 92
Join date : 2012-01-26

http://mysaplab.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum