ALV列字段的自动更新data_changed
实现效果,【主管部门ID】列通过搜索帮助输入数据后,【描述】列自动显示对应的描述
定义部分
DATA: gt_event TYPE slis_t_event. "动作事件
DATA: ls_event TYPE LINE OF slis_t_event.
ls_event-name = slis_ev_data_changed.
ls_event-form = 'FRM_REFRESH_DATA'.
APPEND ls_event TO gt_event.
展示函数中加入event事件
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'FRM_SET_STATUS'
i_callback_user_command = 'FRM_COMMAND'
it_events = gt_event[]
i_grid_settings = l_grid_settings
is_layout_lvc = gi_layout_lvc
it_fieldcat_lvc = gi_fie