Skip to Content
Former Member
Feb 09, 2011 at 04:05 PM

ALV Tree - Color Specific Column based on value in that cell?


Hi Forums,

I have searched the forum and I am unable to find the answer to my question.

I am using an ALV tree and I would like to color a cell RED is the value in the cell is negative.

I have set my field catalog to many different emphasize numbers and no luck either?

  CLEAR ls_fieldcatalog.
  ls_fieldcatalog-fieldname  = 'ORG_TXT'.
  ls_fieldcatalog-coltext    = text-d02.
  ls_fieldcatalog-scrtext_m  = text-d02.
  ls_fieldcatalog-col_pos    = 2.
  ls_fieldcatalog-outputlen  = '30'.
  ls_fieldcatalog-no_out     = 'X'.
  ls_fieldcatalog-emphasize  = 5.
  APPEND ls_fieldcatalog TO et_fieldcatalog.

I am using

    gr_alv_tree_control  TYPE REF TO cl_gui_alv_tree 

as my class to display my tree and I have found no methods that would set the color in there either?

What else could be checked?