3个回答
展开全部
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT_LVC = WS_LAYOUT
IT_FIELDCAT_LVC = WS_FIELDCAT
I_CALLBACK_USER_COMMAND = 'SUB_MYCOMMAND'
I_DEFAULT = 'X'
I_SAVE = 'A'
TABLES
T_OUTTAB = GT_TAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
FORM SUB_MYCOMMAND USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE SLIS_SELFIELD.
RS_SELFIELD-REFRESH = 'X'.
CASE R_UCOMM.
WHEN '&IC1'. "鼠标双击
READ TABLE GT_TAB INDEX RS_SELFIELD-TABINDEX. “行信息
"你的代码,要用ALV现实的话,再调用函数REUSE_ALV_GRID_DISPLAY_LVC就可以了
ENDCASE.
ENDFORM.
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT_LVC = WS_LAYOUT
IT_FIELDCAT_LVC = WS_FIELDCAT
I_CALLBACK_USER_COMMAND = 'SUB_MYCOMMAND'
I_DEFAULT = 'X'
I_SAVE = 'A'
TABLES
T_OUTTAB = GT_TAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
FORM SUB_MYCOMMAND USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE SLIS_SELFIELD.
RS_SELFIELD-REFRESH = 'X'.
CASE R_UCOMM.
WHEN '&IC1'. "鼠标双击
READ TABLE GT_TAB INDEX RS_SELFIELD-TABINDEX. “行信息
"你的代码,要用ALV现实的话,再调用函数REUSE_ALV_GRID_DISPLAY_LVC就可以了
ENDCASE.
ENDFORM.
展开全部
1. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_BACKGROUND_ID = 'ALV_BACKGROUND' "-----------首先这个加上
i_callback_program = myrepid
i_callback_user_command = 'MYCOMMAND'
* I_STRUCTURE_NAME = ''
i_grid_title = 'ALV示例'
i_save = 'X'
it_fieldcat = allfields
TABLES
t_outtab = itab
2.FORM mycommand USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
IF r_ucomm = '&IC1'. "-----------这个是双击事件
PERFORM get_item_information
perform outputitem. ----------里面调用明细的'REUSE_ALV_GRID_DISPLAY'
ENDIF.
ENDFORM.
要看不懂给我个邮箱 给你整个代码
EXPORTING
* I_BACKGROUND_ID = 'ALV_BACKGROUND' "-----------首先这个加上
i_callback_program = myrepid
i_callback_user_command = 'MYCOMMAND'
* I_STRUCTURE_NAME = ''
i_grid_title = 'ALV示例'
i_save = 'X'
it_fieldcat = allfields
TABLES
t_outtab = itab
2.FORM mycommand USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
IF r_ucomm = '&IC1'. "-----------这个是双击事件
PERFORM get_item_information
perform outputitem. ----------里面调用明细的'REUSE_ALV_GRID_DISPLAY'
ENDIF.
ENDFORM.
要看不懂给我个邮箱 给你整个代码
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2011-09-26
展开全部
牛人都回答了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询