您的位置:首页 > 其它

ALV双击跳转事件

2011-11-24 09:27 218 查看
*&---------------------------------------------------------------------*

*& Form set_pf_status

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* -->RT_EXTAB text

*----------------------------------------------------------------------*

form set_pf_status using rt_extab typeslis_t_extab.

set pf-status 'ZSTANDARD'.

endform. "Set_pf_status

form user_command using ucomm likesy-ucomm

selfield type slis_selfield.

read table it_data indexselfield-tabindex.

check sy-subrc = 0.

case ucomm.

when'&IC1'.

set parameter id 'VF' field it_data-faph.

call transaction 'VF03' and skip first screen.

endcase.

endform. "USER_COMMAND

orm display_data.

call function 'REUSE_ALV_GRID_DISPLAY'

exporting

i_callback_program = w_repid "当前程序

i_callback_pf_status_set = 'SET_PF_STATUS'

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. "假设数据都在head1内表中

endform. "display_data

蓝色部分程序中必须加入,pf-status 自行添加设置即可.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: