ALV双击单元格跳转事件(非OO)
FORM user_command USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield. CASE ucomm. WHEN '&IC1'. "ALV中双击事件代码 IF selfield-sel_tab_field = '1-vbeln'. "表示单击某一单元格 ,这里的1表示那个被输出的内表 READ TABLE it_data INDEX selfield-tabindex. if sy-subrc = 0. SET PARAMETER ID 'AGN' FIELD selfield-value. . CALL TRANSACTION 'VA22' AND SKIP FIRST SCREEN. ENDIF. ENDIF. ENDCASE. ENDFORM. "USER_COMMAND *&---------------------------------------------------------------------* *& Form display_data *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM display_data. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING i_callback_program = w_repid "当前程序 i_callback_user_command = 'USER_COMMAND' i_save = '' is_layout = i_layout "子函数layout_build填充的格式定义 it_fieldcat = i_fieldcat_alv[] "子函数fields填充的各列 i_grid_title = tmp_title TABLES t_outtab = it_data. "假设数据都在 it_data 内表中 ENDFORM. "display_data