使用FALV 显示数据,需要根据用户操作显示不同内表,核心实现代码如下:
“刷新ALV下方显示数据
if go_grid_para_data is not bound.
go_grid_para_data ?= lcl_alv=>create(
exporting
i_parent = go_container_bottom
changing
ct_table = <fs_para_table> ).
go_grid_para_data->layout->set_cwidth_opt( abap_true ).
go_grid_para_data->display( ).
else.
data(lt_fieldcat) = lcl_alv=>lvc_fcat_from_itab( <fs_para_table> ).
go_grid_para_data->set_frontend_fieldcatalog( lt_fieldcat ).
go_grid_para_data->set_output_table( changing ct_table = <fs_para_table> ).
go_grid_para_data->display( ).
endif.