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: 

create icon in alv grid

Former Member
0 Kudos

hi abap experts,

i want to create icon in alv grid report.that means on a particular field values the icon should be

unique.

for example,

if there is a field known as status with different values (open,close,cancel,approved.................... )

so, if the value is open a particular icon will be displayed.

if the value is closed another icon will be displayed.................................like that.

The icons are displayed at the left of status column dynamically based on the values.

can i know what is the coding for this.

thanks all.

4 REPLIES 4

Former Member
0 Kudos

Hi,

Include TYPES ICON in your program and pass the icon name to your field.

you can use tranaction ICON to get different icon names

Regards,

Raghavendra

0 Kudos

hi,

Use Tcode: ICONS.

in ur code use

TABLES: ICON.

WRITE: /(5) , 20 '@',21 ICON-ID+1(2),23 '@',ICON-OLENG,

ICON-BUTTON,ICON-STATUS,ICON-MESSAGE,ICON-FUNCTION,

ICON-NAME.

.

Refer:

http://www.sapdesignguild.org/resources/icons_sap/index.htm

ags.

0 Kudos

hi,

we can't use write statement in alv grid.

kindly tell me icons for alv grid as my requirement.

thanks for help.

0 Kudos

hi Archana,

dont use the write statement. it was just an excerpt from my code.

for ur case treat ICON as a table and use the fields accordingly in ur ALV ITAB.

Make a field in ALV ITAB and populate it with these values as req. like ICON-STATUS etc.

ags.