[ABAP] SALV-Table: Nullwerte verbergen

* Variante 1: Für eine Spalte des Gitters 
DATA(o_col) = CAST cl_salv_column( o_alv->get_columns( )->get_column( 'MATNR' ) ).
o_col->set_zero( abap_false ).

* Variante 2: Für alle Spalten des Gitters: Nullwerte anzeigen/verstecken
LOOP AT o_alv->get_columns( )->get( ) ASSIGNING FIELD-SYMBOL(<c>).
  <c>-r_column->set_zero( abap_false ).
ENDLOOP.

[ABAP] SALV-Table – Zeilen/Zellen farbig anzeigen

Variante 1 (Zeilen farbig anzeigen)

TYPES: BEGIN OF ty_s_sflight,
         fldate    TYPE s_date,
         planetype TYPE s_planetye,
         seatsmax  TYPE s_seatsmax,
         seatsocc  TYPE s_seatsocc,
         color     TYPE lvc_t_scol, " Farbspalte
       END OF ty_s_sflight.

TYPES: ty_it_sflight TYPE STANDARD TABLE OF ty_s_sflight WITH DEFAULT KEY.

START-OF-SELECTION.

  TRY.
      DATA(it_sflight) = VALUE ty_it_sflight( ).

      SELECT FROM sflight
        FIELDS
             fldate,
             planetype,
             seatsmax,
             seatsocc
        INTO CORRESPONDING FIELDS OF TABLE @it_sflight.

      DATA: o_alv TYPE REF TO cl_salv_table.

      cl_salv_table=>factory( IMPORTING r_salv_table = o_alv
                              CHANGING  t_table      = it_sflight ).

* Farben in der Tabellen-Spalte 'COLOR' setzen
      LOOP AT it_sflight ASSIGNING FIELD-SYMBOL(<f>).
* Wenn >= 370 belegte Plätze in der Economy Class
        IF <f>-seatsocc >= 370.
* dann in der Spalte COLOR für jede Tabellen-Zeile (Row) eine Farbtabelle einfügen
          <f>-color = VALUE #( ( color-col = col_positive  " grün
                                 color-int = 0
                                 color-inv = 0
                               )
                             ).
        ENDIF.
      ENDLOOP.

* Namen der Farbspalte setzen
      o_alv->get_columns( )->set_color_column( 'COLOR' ).

* Grid anzeigen
      o_alv->display( ).
    CATCH cx_root INTO DATA(e_text).
      WRITE: / e_text->get_text( ).
  ENDTRY.

Variante 2 (einzelne Zellen farbig anzeigen)

TYPES: BEGIN OF ty_s_sflight,
         fldate    TYPE s_date,
         planetype TYPE s_planetye,
         seatsmax  TYPE s_seatsmax,
         seatsocc  TYPE s_seatsocc,
         color     TYPE lvc_t_scol, " Farbspalte
       END OF ty_s_sflight.

TYPES: ty_it_sflight TYPE STANDARD TABLE OF ty_s_sflight WITH DEFAULT KEY.

START-OF-SELECTION.

  TRY.
      DATA(it_sflight) = VALUE ty_it_sflight( ).

      SELECT FROM sflight
        FIELDS
             fldate,
             planetype,
             seatsmax,
             seatsocc
        INTO CORRESPONDING FIELDS OF TABLE @it_sflight.

      DATA: o_alv TYPE REF TO cl_salv_table.

      cl_salv_table=>factory( IMPORTING r_salv_table = o_alv
                              CHANGING  t_table      = it_sflight ).

* Farben in der Tabellen-Spalte 'COLOR' setzen
      LOOP AT it_sflight ASSIGNING FIELD-SYMBOL(<f>).
* Wenn >= 370 belegte Plätze in der Economy Class
        IF <f>-seatsocc >= 370.
* dann in der Spalte COLOR für jede einzelne Zelle (Cell) der Spalte SEATSOCC eine Farbtabelle einfügen
          <f>-color = VALUE #( ( fname     = 'SEATSOCC'
                                 color-col = col_positive  " grün
                                 color-int = 0
                                 color-inv = 0
                               )
                             ).
        ENDIF.
      ENDLOOP.

* Namen der Farbspalte setzen
      o_alv->get_columns( )->set_color_column( 'COLOR' ).

* Grid anzeigen
      o_alv->display( ).
    CATCH cx_root INTO DATA(e_text).
      WRITE: / e_text->get_text( ).
  ENDTRY.

Links

[ABAP] SALV-Table – technische Namen der Spalten auslesen

DATA: o_alv TYPE REF TO cl_salv_table.

...

* technische Spaltennamen auslesen
TRY.
    o_col = CAST cl_salv_column_list( o_alv->get_columns( )->get_column( 'SEATSOCC' ) ). " Spalte mit Namen 'SEATSOCC' ermitteln
    WRITE: / | { o_col->get_columnname( ) } |.     " Namen ausgeben
  CATCH cx_salv_not_found.
ENDTRY.