ABAP: cl_salv_table = simple AVL

A really simple snippet that will get you an alv grid on the screen without using the CL_GUI_ALV_GRID class.

  DATA: gt_itab       TYPE SOME_TABLE.
  DATA: go_salv       TYPE REF TO cl_salv_table.
  ...
  TRY .
      cl_salv_table=>factory(
        EXPORTING
          list_display    = if_salv_c_bool_sap=>false
        IMPORTING
          r_salv_table    = go_salv
        CHANGING
          t_table         = gt_itab ).
    CATCH cx_salv_msg.

  ENDTRY.

  go_salv->display( ).

Leave a Reply

*

captcha *