"定義事件的類spa
CLASS LCL_EVENT_RECEIVER DEFINITION.事件
PUBLIC SECTION:程序
"事件的方法方法
METHODS: HANDLE_DOUBLE_CLICK OF CL_GUI_ALV_GRIDco
IMPORTING E_ROW實例化
E_COLUMN .實例
ENDCALSS.
"類的實例化
CLASS LCL_EVENT_RECEIVER IMPLEMNTATION.
METHOD HANDLE_DOUBLE_CLICK.
LEAVE TO SCREEN 0.
ENDMETHOD.
ENDCLASS.
DATA EVENT_RECEIVER TYPE REF TO LCL_EVENT_RECEIVER.
CREATE OBJECT EVENT_RECEIVER.
"進行綁定
SET EVENT_RECEIVER->HANDLE_DOUBLE_CLICK FOR GO_ALV_GRID.
雙擊ALV GRID 的任意單元格,都會執行LEAVE TO SCREEN 0 語句並結束程序。