#ALV in container (container can be defined from screen painter as a custom control)
#
DATA: alv TYPE REF TO cl_salv_table,
lo_functions TYPE REF TO cl_salv_functions_list.
DATA: wgr_container TYPE REF TO cl_gui_custom_container.
IF wgr_container IS NOT BOUND.
IF cl_salv_table=>is_offline( ) EQ if_salv_c_bool_sap=>false.
CREATE OBJECT wgr_container
EXPORTING
container_name = 'WGC_CONTAINER_PLOP'.
ENDIF.
TRY.
cl_salv_table=>factory(
EXPORTING r_container = wgr_container
container_name = 'WGC_CONTAINER_PLOP'
IMPORTING r_salv_table = alv
CHANGING t_table = wgt_plop ).
lo_functions = alv->get_functions( ).
lo_functions->set_all( abap_true ).
alv->display( ).
CATCH cx_salv_msg.
MESSAGE 'ALV display not possible' TYPE 'I'
DISPLAY LIKE 'E'.
ENDTRY.
ENDIF.