안녕하세요!!
교재 1056페이지 18-6-1 의 REPORT Z18_017 을 실행해서보구
바로 다음 실습하려구 해서 이어서 했는데요
소스보니깐 거의같아서 틀린부분 -> FIELDCAT 부분만지우고
다음실습소스를 코딩후 실행을했는데요 왜 자꾸덤프가 뜨는지 모르겠어요
덤프 이름은 GETWA_NOT_ASSIGNED 이구요
디버깅걸어서 들어가보니~시스템내부 소스만 맴돌다 멈추네요~
조언부탁드립니다!!^^
댓글 6
-
CoolGuy
2008.04.25 03:09
-
e-abap
2008.04.25 19:39
z18_018 프로그램이죠? 제가 몇번 실행해봤는데 괜찮은데..
전체 소스를 복사해도 에러나나요? 시스템이 달라서 그런거 같은데...
REPORT z18_018 .
DATA : con1_ref TYPE REF TO cl_gui_custom_container.
DATA : grid1 TYPE REF TO cl_gui_alv_grid,
gs_variant LIKE disvariant,
gs_cs_variant LIKE disvariant,
gs_layout TYPE lvc_s_layo,
gs_toolbar TYPE ui_functions,
gt_sort TYPE lvc_t_sort,
gt_fieldcat TYPE lvc_t_fcat,
gt_sflight TYPE TABLE OF sflight.
TYPE-POOLS: icon.
*---------------------------------------------------------------------*
* CLASS lcl_event_receiver DEFINITION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_double_click
FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING e_row e_column.
METHODS : handle_toolbar
FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object e_interactive.
METHODS : handle_command
FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING e_ucomm.
PRIVATE SECTION.
ENDCLASS. "lcl_event_receiver DEFINITION
*---------------------------------------------------------------------*
* CLASS lcl_event_receiver IMPLEMENTATION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_double_click.
LEAVE TO SCREEN 0.
ENDMETHOD. "handle_double_click
*-- Add ToolBar
METHOD handle_toolbar.
DATA: ls_toolbar TYPE stb_button.
CLEAR ls_toolbar.
ls_toolbar-butn_type = 3.
APPEND ls_toolbar TO e_object->mt_toolbar.
CLEAR ls_toolbar.
ls_toolbar-function = 'RESH'.
ls_toolbar-icon = icon_refresh.
ls_toolbar-quickinfo = 'Refresh'.
ls_toolbar-text = ' '.
ls_toolbar-disabled = ' '.
APPEND ls_toolbar TO e_object->mt_toolbar.
ENDMETHOD. "handle_toolbar
METHOD handle_command.
DATA : l_scroll TYPE lvc_s_stbl.
CASE e_ucomm.
*- REFRESH
WHEN 'RESH'.
SELECT * FROM sflight INTO TABLE gt_sflight.
l_scroll-row = 'X'.
l_scroll-col = 'X'.
CALL METHOD grid1->refresh_table_display
EXPORTING
i_soft_refresh = ''
is_stable = l_scroll.
ENDCASE.
ENDMETHOD. "handle_user_command
ENDCLASS. "lcl_event_receiver IMPLEMENTATION
*
DATA : event_receiver TYPE REF TO lcl_event_receiver.
START-OF-SELECTION.
SELECT * FROM sflight INTO TABLE gt_sflight.
CALL SCREEN 100.
*---------------------------------------------------------------------*
* MODULE init_con OUTPUT
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
MODULE init_con OUTPUT.
IF con1_ref IS INITIAL.
CREATE OBJECT con1_ref
EXPORTING container_name = 'CON1'.
CREATE OBJECT grid1
EXPORTING
i_parent = con1_ref.
PERFORM setting_layout.
PERFORM setting_catalog.
PERFORM setting_toolbar.
PERFORM setting_sort.
PERFORM setting_event.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT'
i_save = 'A'
is_variant = gs_variant " variant display
i_default = ' '
is_layout = gs_layout
it_toolbar_excluding = gs_toolbar
CHANGING
it_outtab = gt_sflight
IT_FIELDCATALOG = gt_fieldcat
it_sort = gt_sort.
ENDIF.
ENDMODULE. " init_con OUTPUT
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
SET PF-STATUS 'G100'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'BACK' OR 'EXIT' OR 'CANC'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
*& Form setting_layout
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_GS_LAYOCAT text
*----------------------------------------------------------------------*
FORM setting_layout .
*- General display options
gs_layout-cwidth_opt = 'X'.
* TITLE BAR
gs_layout-grid_title = 'Structure + Field Cataglog TEST'.
* Selection modes for SEL_MODE
gs_layout-sel_mode = 'D'.
* Grid pattern
gs_layout-zebra = 'X'.
ENDFORM. " setting_layout
*&---------------------------------------------------------------------*
*& Form setting_toolbar
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_GS_TOOLBAR text
*----------------------------------------------------------------------*
FORM setting_toolbar.
DATA: l_exclude TYPE ui_func.
l_exclude = cl_gui_alv_grid=>mc_fc_save_variant.
APPEND l_exclude TO gs_toolbar.
l_exclude = cl_gui_alv_grid=>mc_fc_maintain_variant.
APPEND l_exclude TO gs_toolbar.
ENDFORM. " setting_toolbar
*&---------------------------------------------------------------------*
*& Form setting_sort
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM setting_sort .
DATA : ls_sort TYPE lvc_s_sort.
ls_sort-spos = '1'.
ls_sort-fieldname = 'CARRID'.
ls_sort-up = 'X'.
ls_sort-subtot = 'X'.
APPEND ls_sort TO gt_sort.
ENDFORM. " setting_sort
*&---------------------------------------------------------------------*
*& Form setting_event
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM setting_event .
CREATE OBJECT event_receiver.
SET HANDLER event_receiver->handle_double_click FOR grid1.
SET HANDLER event_receiver->handle_toolbar FOR grid1.
SET HANDLER event_receiver->handle_command FOR grid1.
ENDFORM. " setting_event
*&---------------------------------------------------------------------*
*& Form setting_catalog
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form setting_catalog .
data ls_fieldcat TYPE lvc_s_fcat.
ls_fieldcat-fieldname = 'COMPANY'.
ls_fieldcat-COLTEXT = 'COMPANY INFO'.
ls_fieldcat-JUST = 'C'.
ls_fieldcat-KEY = 'X'.
ls_fieldcat-OUTPUTLEN = '6'.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
endform. " setting_catalog -
CoolGuy
2008.04.25 20:40
<P>혹시 제가 SFLIGHT 를 카피떠서 데이터를30건정도 넣어놓은 테이블이 있는데요~ZSFLIGHT!!</P>
<P>DATA : GT_SFLIGHT TYPE TABLE OF ZSFLIGHT. 이렇게 선언해서 </P>
<P>SELECT * FROM ZSFLIGHT INTO TABLE GT_SFLIGHT. 이렇게 셀렉트를 해서 그럴까요?</P>
<P>디버깅걸어보면 셀렉트까진 잘해오는데요!!</P>
<P>E-ABAP님 소스복사해서 테이블만 재가 SFLGITH카피떠서 데이터 넣어놓은걸로 바꾸었는데 </P>
<P>이게 문제가 될까요?</P> -
e-abap
2008.04.25 20:53
문제 없을거 같은데요..
ZSFLIGHT 등에서 오타가 없는지 확인 해보세요~
-
대박
2008.04.29 20:01
오타체크하세용 -
법장
2008.11.27 01:48
<P>SFLIGHT 에 'COMPANY' 필드가 존재해야 하는 거 아닌가요??!?!?</P>
<P>아님...FORM문 'SETTING_CATALOG' 부분을 막아야 할 듯...</P>
<P> </P>
<P>왜 덤프가 ㅜ.ㅜ </P>