在OO ALV中在触发某些event之后,原先layout和fieldcat的设定可能不起作用。
这时候需要重新刷新以下。
FORM set_layout_cwidth_opt .
go_grid_h->get_frontend_layout(
IMPORTING
es_layout = gs_layout ).
gs_layout-cwidth_opt = 'X'.
go_grid_h->set_frontend_layout( is_layout = gs_layout ).
go_grid_i->get_frontend_layout(
IMPORTING
es_layout = gs_layout_i ).
gs_layout_i-cwidth_opt = 'X'.
go_grid_i->set_frontend_layout( is_layout = gs_layout_i ).
ENDFORM. " SET_LAYOUT_CWIDTH_OPT
GET_FRONTEND_FIELDCATALOG
GET_FRONTEND_LAYOUT