TOP문
TABLES : VBAK, VBAP.
*GRID 관련 변수
DATA : G_DOCKING TYPE REF TO CL_GUI_DOCKING_CONTAINER.
DATA : G_SPLITTER TYPE REF TO CL_GUI_SPLITTER_CONTAINER.
DATA : G_CONTAINER TYPE REF TO CL_GUI_CONTAINER.
DATA : G_GRID TYPE REF TO CL_GUI_ALV_GRID.
*OK_CODE 선언
DATA : OK_CODE TYPE SY-UCOMM.
*필드 카탈로그 관련 변수 선언
DATA : GT_FIELDCAT TYPE LVC_T_FCAT.
DATA : GS_FIELDCAT TYPE LVC_S_FCAT.
*LAYOUT 관련 변수 선언
DATA : GS_LAYOUT TYPE LVC_S_LAYO.
*ALVSORT 관련 변수 선언
DATA: GS_SORT TYPE LVC_S_SORT,
GT_SORT TYPE LVC_T_SORT.
*다중 ROW 선택 관련 변수
DATA : GT_EXCLUDE TYPE UI_FUNCTIONS,
GS_TOOLBAR TYPE STB_BUTTON.
*--------------------------------------------------------------------*
*GRID 변수
TYPES : BEGIN OF TY_DISP,
VBELN TYPE VBAK-VBELN,
POSNR TYPE VBAP-POSNR,
MATNR TYPE VBAP-MATNR,
NETWR TYPE VBAP-NETWR,
WAERK TYPE VBAP-WAERK,
ZMENG TYPE VBAP-ZMENG,
ZIEME TYPE VBAP-ZIEME,
ERDAT TYPE VBAK-ERDAT,
ERNAM TYPE VBAK-ERNAM,
END OF TY_DISP.
DATA : GS_DISP TYPE TY_DISP,
GT_DISP TYPE TABLE OF TY_DISP.
CLASS 문
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
*----------------------------------------------------------------------*
METHODS : handle_data_changed
FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING sender
er_data_changed.
METHODS : handle_double_click
FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING sender
e_row
e_column.
ENDCLASS. "LCL_EVENT_RECEIVER DEFINITION
*----------------------------------------------------------------------*
* CLASS lcl_event_receiver IMPLEMENTATION
*----------------------------------------------------------------------*
CLASS lcl_event_receiver IMPLEMENTATION.
*----------------------------------------------------------------------*
METHOD handle_data_changed.
PERFORM data_changed USING sender
er_data_changed.
ENDMETHOD. "HANDLE_DATA_CHANGED
METHOD handle_double_click.
PERFORM handle_double_click USING
sender
e_row
e_column.
ENDMETHOD. "HANDLE_HOTSPOT_CLICK
ENDCLASS. "LCL_EVENT_RECEIVER IMPL
SEL 문
**GROUP1 : 기본선택
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS :
S_VBELN FOR VBAK-VBELN,
S_ERDAT FOR VBAK-ERDAT,
S_ERNAM FOR VBAK-ERNAM.
SELECTION-SCREEN: END OF BLOCK b1.
반응형
'SAP ABAP 개발 및 설명 > ABAP 템플릿 및 기능' 카테고리의 다른 글
GRID TEMPLETE 2022/01/09 #4. FORM 문 (0) | 2022.01.09 |
---|---|
GRID TEMPLETE 2022/01/09 #3. PBO / PAI (0) | 2022.01.09 |
GRID TEMPLETE 2022/01/09 #1. MAIN 프로그램 (1) | 2022.01.09 |