Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add symbols or icons in ALV grid.

Former Member
0 Kudos

Hi Friend,

I have a requirement to add a red symbol in the ALV grid,

some how i did it, but i was unable to add it as a last column (i was able to add it in first column).

Bharath.

4 REPLIES 4

0 Kudos

Hi,

This might be a solution assuming that you are using the method CL_GUI_ALV_GRID (set_table_for_first_display) and not the function module.

Add a row to your fieldcatalog internal table called LOCK_ICON. Check the type group "ICON" for the value of the ICON you want to put and include the TYPE group in your program. Your fieldcatalog has a field called ICON. Pass 'X' to this field for your row (LOCK_ICON) in the fieldcatalog.

Your internal table containing the data to be output should carry the value you determined above.

I think this should do it.

Regards,

Tathagata

Former Member
0 Kudos

Hi gupta,

As u thought i was using classes only, but the fact that, iam unable to add that icon as a last column of my Alv grid, even though i declared the icon as the last field in my internal table.

regards,

Bharath.

0 Kudos

Hi Bharath,

Populate the column position (COL_POS) field in the fieldcatalog internal table with the value of the column you want the icon to be displayed in.

In your case you can describe your fieldcatalog table for the number of columns and then add 1 to the value for the column position of icon column. By default this value is 0.

Hope this solves your problem.

Regards,

Tathagata

Former Member
0 Kudos

If you Exception LED Display in Layout Check These Fields in Grid Layout.

EXCP_FNAME

EXCP_ROLLN --> This Need to Fill With Data Element

EXCP_CONDS

EXCP_LED

Then in Your Field Catalog you may need to Put Correct Column Position.