Simple call for a fullscreen SALV with basic modifications on columns
data lo_alv type ref to cl_salv_table.
" lt_timepos is a sorted table, that doesn't work for salv, lt_tp is a standard table
lt_tp = lt_timepos.
" call factory to get an salv instance for a fullscreen grid (like FM REUSE_ALV_GRID_DISPLAY)
cl_salv_table=>factory(
importing r_salv_table = lo_alv
changing t_table = lt_tp
).
lo_cols->set_optimize( 'X' ).
importing r_salv_table = lo_alv
changing t_table = lt_tp
).
" get collection of a columns
data(lo_cols) = lo_alv->get_columns( ). lo_cols->set_optimize( 'X' ).
" hide column 'resid'
lo_cols->get_column( 'RESID' )->set_visible( '' ).
" show actual salv
lo_alv->display( ).
No comments:
Post a Comment