REPORT z17_025 .
TABLES:sflight.
SELECT-OPTIONS: s_carrid FOR sflight-carrid.
CLASS c1 DEFINITION.
PUBLIC SECTION.
TYPES:BEGIN OF t_sflight,
carrid TYPE sflight-carrid,
connid TYPE sflight-connid,
END OF t_sflight.
DATA:itab TYPE STANDARD TABLE OF t_sflight,
wa_itab TYPE t_sflight.
EVENTS: e1 .
METHODS:get_data,display_data,no_data FOR EVENT e1 OF c1..
ENDCLASS. "C1 DEFINITION
CLASS c1 IMPLEMENTATION.
METHOD: get_data.
SELECT carrid connid FROM sflight INTO TABLE itab
WHERE carrid IN s_carrid.
IF sy-subrc <> 0.
RAISE EVENT e1.
ELSE .
CALL METHOD display_data.
ENDIF.
ENDMETHOD. "GET_DATA
METHOD:display_data.
LOOP AT itab INTO wa_itab.
WRITE:/10 wa_itab-carrid.
WRITE:40 wa_itab-connid.
ENDLOOP.
ENDMETHOD. "DISPLAY_DATA
METHOD no_data.
WRITE:/10 'C1: NO DATA FOR SELECTION CRITERIA'.
ENDMETHOD. "NO_DATA
ENDCLASS. "C1 IMPLEMENTATION
***********************
CLASS c2 DEFINITION .
PUBLIC SECTION.
METHODS:no_data FOR EVENT e1 OF c1.
ENDCLASS. "C2 DEFINITION
CLASS c2 IMPLEMENTATION.
METHOD no_data.
WRITE:/10 ' C2:NO DATA FOR SELECTION CRITERIA'.
ENDMETHOD. "NO_DATA
ENDCLASS. "C2 IMPLEMENTATION
DATA:obj1 TYPE REF TO c1,
obj3 TYPE REF TO c1.
DATA:obj2 TYPE REF TO c2.
START-OF-SELECTION.
CREATE OBJECT: obj1,obj3 ,obj2.
SET HANDLER obj1->no_data FOR: obj1.
CALL METHOD obj1->get_data.
SET HANDLER obj1->no_data FOR: obj1 ACTIVATION space.
SET HANDLER obj2->no_data FOR obj1.
CALL METHOD obj1->get_data.
TABLES:sflight.
SELECT-OPTIONS: s_carrid FOR sflight-carrid.
CLASS c1 DEFINITION.
PUBLIC SECTION.
TYPES:BEGIN OF t_sflight,
carrid TYPE sflight-carrid,
connid TYPE sflight-connid,
END OF t_sflight.
DATA:itab TYPE STANDARD TABLE OF t_sflight,
wa_itab TYPE t_sflight.
EVENTS: e1 .
METHODS:get_data,display_data,no_data FOR EVENT e1 OF c1..
ENDCLASS. "C1 DEFINITION
CLASS c1 IMPLEMENTATION.
METHOD: get_data.
SELECT carrid connid FROM sflight INTO TABLE itab
WHERE carrid IN s_carrid.
IF sy-subrc <> 0.
RAISE EVENT e1.
ELSE .
CALL METHOD display_data.
ENDIF.
ENDMETHOD. "GET_DATA
METHOD:display_data.
LOOP AT itab INTO wa_itab.
WRITE:/10 wa_itab-carrid.
WRITE:40 wa_itab-connid.
ENDLOOP.
ENDMETHOD. "DISPLAY_DATA
METHOD no_data.
WRITE:/10 'C1: NO DATA FOR SELECTION CRITERIA'.
ENDMETHOD. "NO_DATA
ENDCLASS. "C1 IMPLEMENTATION
***********************
CLASS c2 DEFINITION .
PUBLIC SECTION.
METHODS:no_data FOR EVENT e1 OF c1.
ENDCLASS. "C2 DEFINITION
CLASS c2 IMPLEMENTATION.
METHOD no_data.
WRITE:/10 ' C2:NO DATA FOR SELECTION CRITERIA'.
ENDMETHOD. "NO_DATA
ENDCLASS. "C2 IMPLEMENTATION
DATA:obj1 TYPE REF TO c1,
obj3 TYPE REF TO c1.
DATA:obj2 TYPE REF TO c2.
START-OF-SELECTION.
CREATE OBJECT: obj1,obj3 ,obj2.
SET HANDLER obj1->no_data FOR: obj1.
CALL METHOD obj1->get_data.
SET HANDLER obj1->no_data FOR: obj1 ACTIVATION space.
SET HANDLER obj2->no_data FOR obj1.
CALL METHOD obj1->get_data.
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
71 | Z17_ZSFLIGHT | sapjoy | 2007.02.27 | 2413 |
70 | REPORT Z17_028 | sapjoy | 2007.02.26 | 2940 |
69 | REPORT Z09_013 | sapjoy | 2007.02.24 | 2243 |
68 | REPORT Z17_020. [2] | sapjoy | 2007.02.23 | 2187 |
» | REPORT z17_025 | sapjoy | 2007.02.23 | 2204 |
66 | REPORT Z17_020 | sapjoy | 2007.02.23 | 2172 |
65 | REPORT Z17_000. | sapjoy | 2007.02.22 | 2419 |
64 | REPORT Z17_022 | sapjoy | 2007.02.22 | 2315 |
63 | REPORT Z17_017 . | sapjoy | 2007.02.15 | 2181 |
62 | REPORT Z17_016 . | sapjoy | 2007.02.14 | 2162 |
61 | REPORT Z17_015 | sapjoy | 2007.02.13 | 2282 |
60 | REPORT Z17_012 | sapjoy | 2007.02.13 | 2305 |
59 | INCLUDE Z17_011_CLASS | sapjoy | 2007.02.12 | 2489 |
58 | REPORT Z17_011 | sapjoy | 2007.02.12 | 2287 |
57 | REPORT Z017_007 [3] | sapjoy | 2007.02.12 | 2353 |
56 | REPORT Z17_006 | sapjoy | 2007.02.12 | 2209 |
55 | REPORT Z17_005 | sapjoy | 2007.02.12 | 2174 |
54 | REPORT Z17_003 | sapjoy | 2007.02.09 | 2347 |
53 | REPORT Z17_002 | sapjoy | 2007.02.08 | 2138 |
52 | REPORT Z17_001. | sapjoy | 2007.02.07 | 2147 |