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: 

ICONS

Former Member
0 Kudos

Hi

How can we get icons ( like grater than symbol or equal to symbol )for a field in ITAB and display an icon according to the result we get...

also please let me know where we can find the code for a particular icon...

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi rahul,

1. simple

2. just copy paste this in new program.

3. <b>it will show

EQUAL to

GREATER than ICON

from field of internal table.</b>

4.

REPORT abc.

TYPE-POOLS: icon.

*----


DATA : BEGIN OF itab OCCURS 0,

bukrs LIKE t001-bukrs,

myicon(100) TYPE c,

END OF itab.

SELECT * FROM t001

INTO CORRESPONDING FIELDS OF TABLE itab.

*----


important.

LOOP AT itab.

IF sy-tabix >= 5.

<b> MOVE '@1G@' TO itab-myicon.</b>

ELSE.

<b>MOVE '@1I@' TO itab-myicon</b>.

ENDIF.

MODIFY itab.

ENDLOOP.

LOOP AT itab.

WRITE 😕 itab-bukrs , itab-myicon.

ENDLOOP.

5. double icon in TYPE-POOLS: icon

and u will get all list of icons.

regards,

amit m.

6 REPLIES 6

former_member188685
Active Contributor
0 Kudos

Hi,

Check the Table ICON in SE11.

Regards

vijay

naimesh_patel
Active Contributor
0 Kudos

Hello,

You can get help of Icon, in ABAP Help itself. Click on ICon list, you will get the list of ICons with its code.

Regards,

Naimesh

former_member188685
Active Contributor
0 Kudos

Hi,

check the program <b>BALVSD01</b>, which uses trafic lights.

Regards

vijay

rainer_hbenthal
Active Contributor
0 Kudos

To see all icons, use transaction ICON.

To have an icon in an ALV list, specify type-pools: icon in your program, assign the icon name to your field (wa_out-stat = ICON_RED_LIGHT) and in your fieldcatalog specify wa_fcat-icon = X for that column.

Former Member
0 Kudos

Hi rahul,

1. simple

2. just copy paste this in new program.

3. <b>it will show

EQUAL to

GREATER than ICON

from field of internal table.</b>

4.

REPORT abc.

TYPE-POOLS: icon.

*----


DATA : BEGIN OF itab OCCURS 0,

bukrs LIKE t001-bukrs,

myicon(100) TYPE c,

END OF itab.

SELECT * FROM t001

INTO CORRESPONDING FIELDS OF TABLE itab.

*----


important.

LOOP AT itab.

IF sy-tabix >= 5.

<b> MOVE '@1G@' TO itab-myicon.</b>

ELSE.

<b>MOVE '@1I@' TO itab-myicon</b>.

ENDIF.

MODIFY itab.

ENDLOOP.

LOOP AT itab.

WRITE 😕 itab-bukrs , itab-myicon.

ENDLOOP.

5. double icon in TYPE-POOLS: icon

and u will get all list of icons.

regards,

amit m.

Peter_Inotai
Active Contributor
0 Kudos

You can display available icons via report SHOWICON. In your program you have to add TYPE-POOLS: icon (or include), so they will be available in a nice readable format like ICON_SOMETHING.

Peter