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

How can i get the Icons in the output of ALV?

Hi,

I am trying to get the Icons in my report output using ALVs.

i am adding the following line

line_fieldcat-icon = 'ICON_GREEN_LIGHT'. in my field catalog for getting the respective Icon in the list. but the Icon is not getting displayed?

May i know whether the above specified line is correct or not? if not, how can i get the Icons in my output using ALVs?

Thanks and regards,

Ramesh.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Sep 08, 2007 at 11:18 AM

    Hi,

    take idea from this code :

    INCLUDE ICONs.

    WRITE : / icon_green_light AS ICON.

    WRITE : / icon_red_light AS ICON.

    write : / icon_yellow_light AS ICON.

    OR

    add code as per steps below in your ALV report :

    <b>FIRST :</b>

    INCLUDE ICONs.

    <b>Second :</b> in your internal table add :

    icon type icon-id,

    <b>Third :</b>

    add this value in icon field for green light.

    itab-icon = '@08@'.

    append itab.

    <b>Fourth :</b> display

    is_fieldcat-tabname = 'IT_FINAL'.

    is_fieldcat-fieldname = 'ICON'.

    is_fieldcat-col_pos = '1'.

    is_fieldcat-outputlen = '12'.

    is_fieldcat-seltext_l = 'ICON'.

    APPEND is_fieldcat TO it_fieldcat.

    CLEAR is_fieldcat.

    Reward points, if helpful,

    Sandeep Kaushik

    Message was edited by:

    Sandeep Kaushik

    null

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2007 at 11:37 AM

    Ramesh,

    The l_fieldcat-icon must only contain 'X' or space.

    'X' indicates that an icon must be displayed for the contents of the field.

    The contents of the corresponding field must must consist of valid icon strings ( @xx@ or @xx\Q <Quickinfo> @ ).

    for eg. if it_data is your table with one field called icon.

    l_fieldcat-fieldname = 'ICON'

    l_fieldcat-tabname = 'IT_DATA'.

    l_fieldcat-icon = 'X'.

    in table IT_DATA, the contents of field icon should be :

    @xx@

    @x\Q <Quickinfo>@

    etc.

    Hope this helps

    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.