*&---------------------------------------------------------------------*
*& Report Z17_021 *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*
REPORT Z17_021 .
* INTERFACE status
INTERFACE status.
METHODS write.
DATA cnt TYPE i.
ENDINTERFACE. "status
* CLASS c_counter1 DEFINITION
CLASS c_counter1 DEFINITION.
PUBLIC SECTION.
INTERFACES status.
METHODS increment.
ENDCLASS. "c_counter1 DEFINITION
* CLASS c_counter1 IMPLEMENTATION
CLASS c_counter1 IMPLEMENTATION.
METHOD status~write.
WRITE: / '숫자는', status~cnt.
ENDMETHOD. "status~write
METHOD increment.
ADD 2 TO status~cnt.
ENDMETHOD.
ENDCLASS. "c_counter1 IMPLEMENTATION
* CLASS c_counter2 DEFINITION
CLASS c_counter2 DEFINITION.
PUBLIC SECTION.
INTERFACES status.
ENDCLASS. "c_counter2 DEFINITION
* CLASS c_counter2 IMPLEMENTATION
CLASS c_counter2 IMPLEMENTATION.
METHOD status~write.
WRITE: / '속도는', status~cnt.
ENDMETHOD. "status~write
ENDCLASS. "c_counter2 IMPLEMENTATION
DATA : cref1 TYPE REF TO c_counter1,
cref2 TYPE REF TO c_counter2,
iref TYPE REF TO status.
START-OF-SELECTION.
CREATE OBJECT : cref1, cref2.
CALL METHOD CREF1->INCREMENT.
CALL METHOD cref1->status~write.
iref = cref1.
cref1->status~cnt = 3.
CALL METHOD iref->write.
cref2->status~cnt = 10.
CALL METHOD cref2->status~write.
iref = cref2.
cref2->status~cnt = 20.
CALL METHOD iref->write.
*& Report Z17_021 *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*
REPORT Z17_021 .
* INTERFACE status
INTERFACE status.
METHODS write.
DATA cnt TYPE i.
ENDINTERFACE. "status
* CLASS c_counter1 DEFINITION
CLASS c_counter1 DEFINITION.
PUBLIC SECTION.
INTERFACES status.
METHODS increment.
ENDCLASS. "c_counter1 DEFINITION
* CLASS c_counter1 IMPLEMENTATION
CLASS c_counter1 IMPLEMENTATION.
METHOD status~write.
WRITE: / '숫자는', status~cnt.
ENDMETHOD. "status~write
METHOD increment.
ADD 2 TO status~cnt.
ENDMETHOD.
ENDCLASS. "c_counter1 IMPLEMENTATION
* CLASS c_counter2 DEFINITION
CLASS c_counter2 DEFINITION.
PUBLIC SECTION.
INTERFACES status.
ENDCLASS. "c_counter2 DEFINITION
* CLASS c_counter2 IMPLEMENTATION
CLASS c_counter2 IMPLEMENTATION.
METHOD status~write.
WRITE: / '속도는', status~cnt.
ENDMETHOD. "status~write
ENDCLASS. "c_counter2 IMPLEMENTATION
DATA : cref1 TYPE REF TO c_counter1,
cref2 TYPE REF TO c_counter2,
iref TYPE REF TO status.
START-OF-SELECTION.
CREATE OBJECT : cref1, cref2.
CALL METHOD CREF1->INCREMENT.
CALL METHOD cref1->status~write.
iref = cref1.
cref1->status~cnt = 3.
CALL METHOD iref->write.
cref2->status~cnt = 10.
CALL METHOD cref2->status~write.
iref = cref2.
cref2->status~cnt = 20.
CALL METHOD iref->write.
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
450 | REPORT Z15_006 [2] | sapjoy | 2007.01.23 | 2408 |
449 | REPORT Z05_003 | sapjoy | 2007.05.21 | 2406 |
448 | REPORT z18_012 [1] | sapjoy | 2007.03.09 | 2404 |
447 | REPORT ZBADI_003. | sapjoy | 2009.01.14 | 2403 |
446 | zunicode_001 | sapjoy | 2008.11.21 | 2397 |
445 | MODULE create_dropdown_box | sapjoy | 2007.12.12 | 2397 |
444 | Z07_001 | sapjoy | 2006.12.06 | 2396 |
443 | REPORT z15_016 | sapjoy | 2007.01.29 | 2396 |
442 | REPORT ZSMARTFORMS_07. | sapjoy | 2009.01.22 | 2389 |
441 | REPORT Z03_013 [4] | sapjoy | 2007.05.14 | 2388 |
440 | REPORT Z15_045 | sapjoy | 2007.03.08 | 2388 |
» | REPORT Z17_021 . | sapjoy | 2007.02.21 | 2386 |
438 | REPORT Z15_004 | sapjoy | 2007.01.23 | 2385 |
437 | report zsalv_020 . | sapjoy | 2010.08.20 | 2381 |
436 | REPORT Z07_027 [3] | sapjoy | 2006.12.08 | 2376 |
435 | REPORT Z02_005 . | sapjoy | 2006.12.02 | 2375 |
434 | REPORT Z04_001 | sapjoy | 2007.05.16 | 2375 |
433 | MODULE f4_drum_s101 INPUT. 2 | sapjoy | 2006.12.26 | 2375 |
432 | REPORT Z13_015 [2] | sapjoy | 2007.09.13 | 2373 |
431 | module f4_CARRID input | sapjoy | 2007.07.21 | 2369 |