abap cl_salv_table=>factory code example
Example: abap cl_salv_table=>factory
DATA:
mt_data TYPE STANDARD TABLE OF ts_data.
DATA:
lo_alv TYPE REF TO cl_salv_table,
lo_error TYPE REF TO cx_salv_msg.
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = lo_alv
CHANGING
t_table = mt_data ).
columns = alv->get_columns( ).
CATCH cx_salv_msg INTO lo_error.
" error handling
ENDTRY.