REUSE_ALV_GRID_DISPLAY 的 i_callback_user_command 参数定义
form user_command using ucomm like sy-ucomm selfield type slis_selfield. selfield-refresh = 'X'. selfield-col_stable = 'X'. selfield-row_stable = 'X'. data: lo_guid type ref to cl_gui_alv_grid. case ucomm. when 'ZEXEC'. * 取得当前alv的grid call function 'GET_GLOBALS_FROM_SLVC_FULLSCR' importing e_grid = lo_guid. call method lo_guid->check_changed_data. selfield-refresh = 'X'. perform frm_update. "可以写更新代码 when 'SELECT'."全选 * 取得当前alv的grid call function 'GET_GLOBALS_FROM_SLVC_FULLSCR' importing e_grid = lo_guid. call method lo_guid->check_changed_data. selfield-refresh = 'X'. loop at r3_data. "BOX 用作复选框列 r3_data-box = 'X'. modify r3_data. endloop. when 'UNSELECT'."全不选 * 取得当前alv的grid call function 'GET_GLOBALS_FROM_SLVC_FULLSCR' importing e_grid = lo_guid. call method lo_guid->check_changed_data. loop at r3_data. r3_data-box = ''. modify r3_data. endloop. selfield-refresh = 'X'. when others. endcase. endform. "user_command