DATA: BEGIN OF ls_madein,
fsh_season TYPE fsh_saiso,
satnr TYPE zesd_satnr,
zzmadein TYPE zemade_in,
END OF ls_madein.
DATA: lo_alv TYPE REF TO cl_salv_table,
lo_cols TYPE REF TO cl_salv_columns_table,
lo_col TYPE REF TO cl_salv_column,
lo_layout TYPE REF TO cl_salv_layout,
lv_key TYPE salv_s_layout_key,
lv_text_s TYPE scrtext_s,
lv_text_m TYPE scrtext_m,
lv_text_l TYPE scrtext_l,
lt_madein LIKE STANDARD TABLE OF ls_madein.
DEFINE set_column.
lv_text_s = lv_text_m = lv_text_l = &2.
lo_col = lo_cols->get_column( &1 ).
lo_col->set_short_text( lv_text_s ).
lo_col->set_medium_text( lv_text_m ).
lo_col->set_long_text( lv_text_l ).
END-OF-DEFINITION.
cl_salv_table=>factory(
IMPORTING
r_salv_table = lo_alv
CHANGING
t_table = lt_madein ).
lo_alv->set_screen_status(
pfstatus = 'STANDARD'
report = 'SAPLSALV'
set_functions = lo_alv->c_functions_all ).
lo_cols = lo_alv->get_columns( ).
lo_cols->set_optimize( 'X' ).
* lo_alv->get_columns( )->set_optimize( ).
* lo_alv->get_columns( )->get_column('ZZMADEIN')->set_visible( EXPORTING value = space ).
* lo_alv->get_columns( )->get_column('SATNR')->set_short_text('Articolo').
set_column 'SATNR' 'Articolo'.
lo_layout = lo_alv->get_layout( ).
lv_key-report = sy-repid.
lo_layout->set_key( lv_key ).
lo_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
lo_alv->display( ).