Skip to Content
author's profile photo Former Member
Former Member

Traffic Lights in ALVgrid

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2005 at 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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2005 at 11:08 PM

    see below example

    BCALV_GRID_04 it uses cl_gui_alv_grid and displays trafic lights.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2005 at 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!!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.