cancel
Showing results for 
Search instead for 
Did you mean: 

CL_SALV_TABLE Hide empty rows

luis_rod
Participant
0 Kudos
156

Hi all,

Does anybody knows if there is a method to hiding (i.e. Setting not visible) empty rows when using CL_SALV_TABLE (Similar to CL_GUI_ALV_GRID_EXT=>SET_HIDE_EMPTY_COLUMNS)

Thanks,

View Entire Topic
ThorstenHoefer
Active Contributor
0 Kudos

Hi Luis,
you can use filters:

DATA: o_alv TYPE REF TO cl_salv_table.
 ... 
DATA: lcl_filters TYPE REF TO cl_salv_filters.
 
TRY.
    lcl_filters = o_alv->get_filters( ).
    " gesetzten Filter der Spalte 'CARRID' entfernen
    lcl_filters->remove_filter( 'CARRID' ).
    " neuen Filter für Spalte 'CARRID' setzen
    lcl_filters->add_filter( columnname = 'CARRID'
                             sign = 'I'
                             option = 'EQ'
                             low = 'AA' ).
  CATCH cx_salv_existing
        cx_salv_data_error
        cx_salv_not_found.
ENDTRY.



SAP Help 

https://codezentrale.de/abap-salv-table-filter-benutzen/ 

luis_rod
Participant
0 Kudos
Before anything, let me apologize for the tardiness in my responde. Got sidetracked with another project. What I really wanted to do was to supress columns WITHOUT having to specify a specific column name. A generic method, if possible. Thanks