Using SALV (object oriented model) has many advantages:

  • Simplified design: This Model uses a highly integrated object oriented design which provides the simplicity to programmers to develop the ALV.
  • Unified Object models: This model has only one main class which will get and set the parameters of entire layout.

All Classes has static method FACTORY which will get back the instance of the ALV. Like for the simple table dispaly we must call the method CL_SALV_TABLE=>FACTORY to get the instance of the ALV.

SALV class

SALV class


Simple case to display table:

DATA lo_salv TYPE REF TO cl_salv_table.
r_salv_table = lo_salv
t_table = lt_sflight ).
CATCH cx_salv_msg INTO lx_msg.

lo_salv->display( ).

Add standard PF Status

DATA: lo_functions TYPE REF TO cl_salv_functions_list.
lo_functions = co_salv->get_functions( ).
lo_functions->set_default( abap_true ).