Wednesday, October 14, 2015

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
  ).
  get collection of a columns
  data(lo_colslo_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

SAP ABAP: Determine Timezone for Plant

    DATA:       lt_tzone TYPE STANDARD TABLE OF tznzone WITH DEFAULT KEY,       l_tzone  TYPE tznzone.     " get time zone for plant   ...