REUSE_ALV_GRID_DISPLAY ALV 回车事件
定义:
DATA: GT_EVENT TYPE SLIS_T_EVENT WITH HEADER LINE,
REF_GRID TYPE REF TO CL_GUI_ALV_GRID
调用ALV的时候,加上GT_EVENT:
-
event事件
"slis_ev_caller_exit_at_start事件 调用来获取ALV对象并注册回车事件
GT_EVENT-NAME = ‘CALLER_EXIT’.
GT_EVENT-FORM = ‘FM_BUTTON’.
APPEND GT_EVENT .CALL FUNCTION ‘REUSE_ALV_GRID_DISPLAY’
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_USER_COMMAND = ‘FRM_USER_COMMAND’
IS_LAYOUT = GS_LAYOUT
I_CALLBACK_PF_STATUS_SET = ‘FRM_SET_PF_STATUS’
IT_FIELDCAT = GT_FIELDCAT[]
I_CALLBACK_TOP_OF_PAGE = ‘FRM_TOP_OF_PAGE’
IT_EVENTS = GT_EVENT[]
I_SAVE = ‘A’
I_GRID_SETTINGS = LS_GRID_SETTINGS
TABLES
T_OUTTAB = GT_ALV
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
定义类和方法:
CLASS LCL_EVENT_RECEI