메뉴 건너뛰기

SAP 한국 커뮤니티

REPORT Z17_021 .

sapjoy 2007.02.21 14:24 조회 수 : 2386

*&---------------------------------------------------------------------*
*& 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.
번호 제목 글쓴이 날짜 조회 수
110 REPORT Z17_022 sapjoy 2007.02.21 2315
» REPORT Z17_021 . sapjoy 2007.02.21 2386
108 REPORT Z17_019 [1] sapjoy 2007.02.14 2748
107 REPORT Z17_017 . sapjoy 2007.02.14 2181
106 REPORT Z17_016 . sapjoy 2007.02.13 2162
105 REPORT Z17_015 sapjoy 2007.02.13 2280
104 REPORT Z17_014. [1] sapjoy 2007.02.13 2503
103 REPORT Z17_012 sapjoy 2007.02.12 2304
102 INCLUDE Z17_011_CLASS sapjoy 2007.02.12 2489
101 REPORT Z17_011 sapjoy 2007.02.12 2287
100 REPORT Z017_007 [3] sapjoy 2007.02.11 2353
99 REPORT Z17_006 sapjoy 2007.02.11 2208
98 REPORT Z17_005 sapjoy 2007.02.11 2174
97 REPORT Z17_004. sapjoy 2007.02.11 2508
96 REPORT Z17_003 sapjoy 2007.02.08 2347
95 REPORT Z17_002 sapjoy 2007.02.07 2138
94 REPORT Z17_001. sapjoy 2007.02.06 2147
93 REPORT Z15_039 sapjoy 2007.02.05 2315
92 REPORT Z15_038 sapjoy 2007.02.05 2175
91 REPORT Z15_037. sapjoy 2007.02.05 2472