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: 

whats syntax for icons??

Former Member
0 Kudos

Hi

How to bring icons(ex. telephone symbol,and some other symbol) in programs???

what is syntax for that???

can anyone tel me??

Thanks

senthil

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Just declare the ICONS INCLUDE and write them in the output

INCLUDE: ICONs.

WRITE: icon_red_light AS ICON.

Reward points for useful Answers

Regards

Anji

9 REPLIES 9

Former Member
0 Kudos

If u want to use through WRITE statement..

INCLUDE ICONs.

WRITE icon_green_light AS ICON.

Former Member
0 Kudos

Hi,

INCLUDE <symbol>.

INCLUDE <icon>.

/ 'Phone Symbol:', SYM_PHONE AS SYMBOL.

SKIP.

WRITE: / 'Alarm Icon: ', icon_alarm AS ICON.

for more information check out the following link it will help you

http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e4a35c111d1829f0000e829fbfe/content.htm

*********please reward points if the information is helpful to you**************

Former Member
0 Kudos

Hi

Just declare the ICONS INCLUDE and write them in the output

INCLUDE: ICONs.

WRITE: icon_red_light AS ICON.

Reward points for useful Answers

Regards

Anji

Former Member
0 Kudos

Hello ,

in the report you have to include two INCLUDES 1) SYMBOL 2) ICON or otherwise u can use LIST also in place of two .If you duble click on the include u can find one TYPE-POOL . select the symbol which you want to print . say assume u want to print Alarm Clock Icon then use follwoing syntax .

WRITE: / 'Alarm Icon: ', icon_alarm AS ICON.

Former Member
0 Kudos

hi,

u no need to declare as icon before. directly in output u can give with write statement as

WRITE: / ICON_OKAY AS ICON, "output as icon // AS ICON st is used for icons

if helpful reward some points.

With Regards,

Suresh.A

Former Member
0 Kudos

HI

refer this code.

Types: begin of lt_io.

include structure mara. " Your Structure

Types: style_table type lvc_t_style.

Types: end of lt_io.

data: lt_io type table of lt_io,

ls_layout type lvc_s_layo,

lt_fcat type lvc_t_fcat,

lo_grid type ref to cl_gui_alv_grid.

field-symbols: <io> type lt_io,

<fcat> type lvc_s_fcat.

... fill your output table ....

ls_layout-stylefname = 'STYLE_TABLE'.

loop at lt_io assigning <io>.

PERFORM set_style USING 'CHECKBOX' "Your Filename

CHANGING <io>.

endloop.

... Fill Your Field Catalog lt_fcat

read table lt_fcat assigning <fcat>

where fieldname = 'CHECKBOX'.

<fcat>-checkbox = 'X'.

...

create grid control lo_grid.

...

CALL METHOD lo_grid->set_table_for_first_display

EXPORTING

is_layout = ls_layout

CHANGING

it_fieldcatalog = lt_fcat

it_outtab = lt_io[].

...

FORM set_button_to_line

USING iv_fieldname TYPE lvc_fname

CHANGING cs_io TYPE io.

DATA: ls_style TYPE lvc_s_styl,

lt_style TYPE lvc_t_styl.

ls_style-fieldname = iv_fieldname.

if cs_io-checkbox = ' '.

ls_style-style = cl_gui_alv_grid=>mc_style_enabled.

else.

ls_style-style = cl_gui_alv_grid=>mc_style_disabled.

endif.

ls_style-maxlen = 2.

INSERT ls_style INTO TABLE io-style_table.

ENDFORM. "set_icon_to_status_line

[/code].

Reward all helpfull answers.

Regards.

Jay

Former Member
0 Kudos

hi

in se38 u type icon and place the cursor on it . and press F1. it will take u to how to declare and use icons and list of icons.u click on list of icons. it will display the list. use the icon_name to use it in the program.

example code:

INCLUDE icons.

WRITE: / ICON_OKAY AS ICON, "output as icon

'text1'.

WRITE: / ICON_locked AS ICON, "output as icon locked

'text2'.

reward if useful.

former_member208856
Active Contributor
0 Kudos

Hi,

write commends as below :

INCLUDE ICONs.

WRITE icon_green_light AS ICON.

WRITE: icon_red_light AS ICON.

write: icon_create_text AS ICON.

write: icon_Print AS ICON.

write: icon_Delete AS ICON.

Check table for the same list of Icons : ICONT

Check program in SE38 : SHOWICON

Reward, if helpful,

Sandeep Kaushik

Former Member
0 Kudos

HI,

This prog helps u.

REPORT z_icon.

INCLUDE <icon>.

DATA icon1 LIKE icon-name.

WRITE icon_green_light TO icon1.

WRITE /10 icon1.

WRITE icon_yellow_light TO icon1.

WRITE /20 icon1.

WRITE icon_red_light TO icon1.

WRITE /30 icon1.

WRITE icon_wd_tray TO icon1.

WRITE /40 icon1.

WRITE icon_negative TO icon1.

WRITE /50 icon1.

WRITE icon_positive TO icon1.

WRITE /60 icon1.

WRITE icon_failure TO icon1.

WRITE /70 icon1.

Reward if helpful.

Regards,

Karthick.