make alv report with abap

DATA: table_data      TYPE TABLE OF kna1.
DATA: alv_table       TYPE REF TO   cl_salv_table.
DATA: alv_functions   TYPE REF TO   cl_salv_functions_list.

* Get data from database
SELECT * UP TO 10 ROWS FROM kna1 INTO TABLE table_data.

* Generate an instance of the ALV table object
CALL METHOD cl_salv_table=>factory
  IMPORTING
    r_salv_table = alv_table
  CHANGING
    t_table      = table_data.

* Get the reference to the ALV toolbar functions
alv_functions = alv_table->get_functions( ).

* Set all toolbar functions
alv_functions->set_all( abap_true ).

* Display the ALV table.
alv_table->display( ).