alv 刷新_ALV自动刷新的问题

class lcl_event_receiver definition.

public section.

methods:

Handle_data_changed

FOR EVENT data_changed OF cl_gui_alv_grid

IMPORTING er_data_changed,

Handle_data_changed_finished

for event data_changed_finished of cl_gui_alv_grid

importing e_modified,

handle_double_click

for event double_click of cl_gui_alv_grid

importing e_row e_column es_row_no.

endclass.

class LCL_EVENT_RECEIVER implementation.

method handle_data_changed.

perform handle_data_changed using er_data_changed.

endmethod.

method handle_data_changed_finished.

perform handle_data_changed_finished using e_modified.

endmethod.

METHOD handle_double_click.

PERFORM double_click USING e_row e_column es_row_no.

endmethod.

endclass.

form handle_data_changed using er_data_changed

type ref to cl_alv_changed_data_protocol.

data: ls_mod_cell type lvc_s_modi,

lv_value type lvc_value.

clear ls_mod_cell_t.

clear ls_mod_cell_t[].

loop at er_data_changed->mt_mod_cells

into ls_mod_cell

where fieldname = 'XX'.

append ls_mod_cell to ls_mod_cell_t.

endloop.

endform.

form handle_data_changed_finished using e_modified type char01.

data ls_mod_cell type lvc_s_modi.

data is_stable type lvc_s_stbl.

is_stable-row = 'X'.

is_stable-col = 'X'.

if e_modified = 'X'.

loop at ls_mod_cell_t into ls_mod_cell.

.....

endloop.

call method grid_chg->refresh_table_display

exporting

is_stable = is_stable

.

endif.

endform.

之前写的代码。FYI

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值