12-12-2005 11:03 PM
Hi,
I am using 'CL_GUI_ALV_GRID' method to display data via ALV. I have a requirement of displaying the succesful records with green light and unsuccessful ones with red lights.
Can somebody tell me which field to use in field catalog for that icon or is there any other method. I am open to any other suggesstions also.
Thanks.
Shiv
12-12-2005 11:09 PM
also you can follow as below while filling your internal table.
Define a flag(4) type C in your internal table.
LOOP AT IT_MARA.
IF IT_MARA-vpsta = 'KELVZX'.
IT_MARA-FLAG = '@08@'.
ELSEIF IT_MARA-vpsta = 'KEBVGX'.
IT_MARA-FLAG = '@09@'.
ELSE.
IT_MARA-FLAG = '@0A@'.
ENDIF.
MODIFY IT_MARA INDEX SY-TABIX.
ENDLOOP.
12-12-2005 11:08 PM
see below example
BCALV_GRID_04 it uses cl_gui_alv_grid and displays trafic lights.
12-12-2005 11:09 PM
also you can follow as below while filling your internal table.
Define a flag(4) type C in your internal table.
LOOP AT IT_MARA.
IF IT_MARA-vpsta = 'KELVZX'.
IT_MARA-FLAG = '@08@'.
ELSEIF IT_MARA-vpsta = 'KEBVGX'.
IT_MARA-FLAG = '@09@'.
ELSE.
IT_MARA-FLAG = '@0A@'.
ENDIF.
MODIFY IT_MARA INDEX SY-TABIX.
ENDLOOP.
12-12-2005 11:13 PM
Ok, i got it. Ineed to include icons and use the traffic signal available there in a field of my ionternal table which I am displaying (type : char (4)).
It works.
Thanks to myself & also other who read this and were preparing to answer!!
12-12-2005 11:16 PM