07-02-2007 8:00 AM
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
07-02-2007 8:07 AM
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
07-02-2007 8:06 AM
If u want to use through WRITE statement..
INCLUDE ICONs.
WRITE icon_green_light AS ICON.
07-02-2007 8:06 AM
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**************
07-02-2007 8:07 AM
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
07-02-2007 8:09 AM
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.
07-02-2007 8:11 AM
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
07-02-2007 8:12 AM
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
07-02-2007 8:12 AM
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.
07-02-2007 8:19 AM
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
07-02-2007 8:35 AM
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.