Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Painting cell in alv with objects

Hi, I created a alv with objects, this shows the following data:

Jan Feb March April

% REPROCESO MENSUAL 4.000 10.000 3.000 5.000

% REPROCESO ACUMULADO 21.000 26.000 11.000 16.000

By default both rows are gray, but I need than the cells whose value is < 5 be red,when the cells are > 5 and < 20 be yellow,

I used the following code for that,I use this code for each column

of each row:

WA_COLOR-FNAME = FNAME.

WA_COLOR-COLOR-COL = COL.

WA_COLOR-COLOR-INT = INT.

WA_COLOR-COLOR-INV = INV.

APPEND WA_COLOR TO IT_COLOR.

W_DATOS-COLOR_CELL[] = IT_COLOR[].

but when I test,the alv for case of March and April,only the value 16.000 is yellow. I need to paint some cells in the same row.

Please any ideas?

Tags:
replied

You have to fill this the COLOR table for all the fields e.g. Jan, Feb, March, April.. and so on..

WA_COLOR-FNAME = 'JAN'.
WA_COLOR-COLOR-COL = COL.  
WA_COLOR-COLOR-INT = INT.
WA_COLOR-COLOR-INV = INV.
APPEND WA_COLOR TO IT_COLOR.

WA_COLOR-FNAME = 'FEB'.
WA_COLOR-COLOR-COL = COL.  
WA_COLOR-COLOR-INT = INT.
WA_COLOR-COLOR-INV = INV.
APPEND WA_COLOR TO IT_COLOR.

and so on.

Regards,

Naimesh Patel

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question