首先定义可输入的字段可编辑,然后在输入检查通过后将该行或一起输入多行置灰。对于刷新刚找到稳定基于行的刷新,就是下拉框拉了几页,刷新手仍然在上次行的位置,同理也可根据列刷新。
LOOP I_alv into lwa_alv.(复杂内表,标准表嵌套排序表celltab)
if ls_celltab-fieldname eq 'XXXX'.
if ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
else.
ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
endif.
modify ls_outtab-celltab from ls_celltab.
endif.
endloop.
modify gt_outtab from ls_outtab index es_row_no-row_id.
is_stable-row = 'x'.根据行刷新,其他都不要变量,直接赋值X过去,X它,X刷新。
call method sender->refresh_table_display
exporting
is_stable = is_stable-row. (is_stable = ‘X’.)
endloOP。
调用data_change 事件后,根据输入列作为关键,判断是否置灰。
LOOP I_alv into lwa_alv.(复杂内表,标准表嵌套排序表celltab)
if ls_celltab-fieldname eq 'XXXX'.
if ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
else.
ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
endif.
modify ls_outtab-celltab from ls_celltab.
endif.
endloop.
modify gt_outtab from ls_outtab index es_row_no-row_id.
is_stable-row = 'x'.根据行刷新,其他都不要变量,直接赋值X过去,X它,X刷新。
call method sender->refresh_table_display
exporting
is_stable = is_stable-row. (is_stable = ‘X’.)
endloOP。
调用data_change 事件后,根据输入列作为关键,判断是否置灰。

