Icons in ALV Grid
Hello.
Could You tell me how to display icon in cell of ALV Grid? MAybe You have a link to some tutorial?
I'm trying make such thing:
to my itab I'm adding
icon1 LIKE icon-id
then I fill itab, to fieldcatalog give
PERFORM append_wsfield USING
ws_field_st ws_fieldcat_st 'ICON1' '' 0 1 0 '' 2 'X' ''.
When I debug code, there is an icon in the itab, but in grid it doesnt appears.
I'd be thankful for help. Greetings. P.
Message was edited by:
Piotr Wojciechowski
Go to the type pool ICON and you can find the code for each icon there. Depending on the icon that you want assign the code for that icon to the column in the ALV Grid (Icon field in the internal table). The icon will be displayed automatically.
Please mark points if the solution was useful.
Regards,
Manoj
Similar Messages
-
Microsoft Excel Icon in ALV Grid Report
Hi all,
We have a customized report. When we execute that reports, it open in ALV Grid format. When we choose "Microsoft Excel" Icon to change layout to Excel, it then shows the report in excel without any data.
Can any one please tell me that why there is no data? should i need to do any settings in excel for this?
Please respond.
Best Regards,
AIHi,
Refer these:
Microsoft Excel Icon in ALV Grid Report
Re: Not able display the Excel Icon in ALV List Display
Hope it helps
Regards
Mansi -
Hide/Remove Subtotal Icon in ALV Grid report output.
Hi,
Is ther a way to remove or hide the Subtotal icon in the ALV Grid report output?
Thanks & Regards,
Praveen.Hi,
You can add names of the buttons(which you want to hide) to internal table and pass this internal table for tool bar excluding parameter while calling ALV.
Here as shown in below code, 'Sorting, Ascending,Descending' buttons are removed from the tool bar list.
data : lt_exclude TYPE ui_functions.
ls_exclude = cl_gui_alv_grid=>MC_FC_SORT.
APPEND ls_exclude TO lt_exclude .
ls_exclude = cl_gui_alv_grid=>MC_FC_SORT_ASC.
APPEND ls_exclude TO lt_exclude .
ls_exclude = cl_gui_alv_grid=>MC_FC_SORT_DSC.
APPEND ls_exclude TO lt_exclude .
CALL METHOD alvgd->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IT_TOOLBAR_EXCLUDING = lt_exclude
Regards,
Maharshi Vyas -
Total/Subtotal Icon in ALV GRID
Hi;
i have an ALV GRID that is already sorted and data is shown ordered in the grid:
Sort Documento
wa_sort-spos = '1' .
wa_sort-fieldname = 'MBLNR'.
wa_sort-tabname = 'ITAB'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO i_sort .
CLEAR wa_sort.
But, i need to subtotal by a column and i do this:
gt_fieldcat-seltext_l = 'Cant_entregada'.
gt_fieldcat-fieldname = 'MENGE'.
gt_fieldcat-ref_tabname = 'itab'.
gt_fieldcat-outputlen = 14.
gt_fieldcat-do_sum = 'X'.
APPEND gt_fieldcat. CLEAR gt_fieldcat.
Menge is data type Integer because the Key User doesn´t want decimal places.
And ,
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
it_sort = i_sort
i_default = 'X'
i_save = 'A'
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2
So data in the grid is ordered by Document number, but the total/subtotal button is not displayed.
i've been lookin other posts about the same, but i don´t see any difference with my code.
Any help.
David Fúnez
Tegucigalpa, Hondurasi found the answer..jus added this line : gt_fieldcat-datatype = 'INT4'.
gt_fieldcat-seltext_l = 'Cant_entregada'.
gt_fieldcat-fieldname = 'MENGE'.
gt_fieldcat-ref_tabname = 'itab'.
gt_fieldcat-outputlen = 14.
gt_fieldcat-do_sum = 'X'.
gt_fieldcat-datatype = 'INT4'.
APPEND gt_fieldcat. CLEAR gt_fieldcat.
Now buttons are displayed... -
How to show icons in ALV grid ...
Hi guyz ,
A lill query ....
In an ALV gird ,if i need to display icons in one of the columns , say i have
a field called Status , where i need show some icons like green , yellow and
red circles , depending on some other fileds say invoice reciept date .
So can i get icons in ALV colums.
Please advise .
Thanks
JahanThis is very easy. IN your status field in your internal table, you simply write the icon to it. Make sure that the status field is defined as a character field with a length of 4. Then write the icon to it.
Type-pools: icon.
write icon_green_light as icon to itab-status.
Then when filling the field catalog, set the ICON flag. This puts the icon in the center of the cell in ALV.
xfc-icon = 'X'.
append xfc to ifc.
Regards,
Rich Heilman -
Hi,
I've already searched the forum about this topic and I didn't find any thread that helped me to display the icon.
I'll post my code below, mind you, this code is just a test code so it's kinda trashy...
INCLUDE: <icon>.
TYPE-POOLS: slis.
TYPES: BEGIN OF t_tab,
<b> icon TYPE icon-id,</b>
matnr TYPE matnr,
ersda TYPE ersda,
ernam TYPE ernam,
laeda TYPE laeda,
END OF t_tab.
DATA: i_tab TYPE STANDARD TABLE OF t_tab WITH HEADER LINE,
wa_tab TYPE t_tab.
DATA: i_fcat TYPE slis_t_fieldcat_alv,
wa_cat TYPE slis_fieldcat_alv,
wa_layout TYPE slis_layout_alv,
i_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader,
it_events TYPE slis_t_event,
wa_events TYPE slis_alv_event.
START-OF-SELECTION.
SELECT matnr
ersda
ernam
laeda
FROM mara
INTO CORRESPONDING FIELDS OF TABLE i_tab
WHERE ernam = 'DIEHL'.
END-OF-SELECTION.
<b>i_tab-icon = '@01@'.</b>
PERFORM fcat USING:
<b> 'ICON' 'I_TAB' 'ICON' 'Icon' 'X',</b>
'MATNR' 'I_TAB' 'MATNR' 'Material Number' space,
'ERSDA' 'I_TAB' 'ERSDA' 'Creation Date' space,
'ERNAM' 'I_TAB' 'ERNAM' 'Name of Creator' space,
'LAEDA' 'I_TAB' 'LAEDA' 'Date Last Changed' space.
wa_layout-zebra = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = wa_layout
it_fieldcat = i_fcat
TABLES
t_outtab = i_tab
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc NE 0.
ENDIF.
*& Form fcat
text
FORM fcat USING p_fieldname TYPE any
p_tabname TYPE any
p_reffname TYPE any
p_text TYPE any
p_icon TYPE any.
CLEAR wa_cat.
wa_cat-fieldname = p_fieldname.
wa_cat-tabname = p_tabname.
wa_cat-ref_fieldname = p_reffname.
wa_cat-seltext_l = p_text.
<b> wa_cat-icon = p_icon.</b>
APPEND wa_cat TO i_fcat.
CLEAR wa_cat.
ENDFORM. " fcat
With the code above, the icon is still not displaying...
Do you think there's something missing in the code?
I've also check the ALV sample programs BCALV* but call methods are used there not FM.I've already figured out the answer!!
I was not appending the ICON in the table i_tab... hehehe -
How to get the SAVE Layout ICON on ALV Grid display report
Hi,
I am using the standard ALV Layout, and I do not get the SAVE LAYOUT Icon on the Menubar, where I could save the report Layout.I am using the layout routine as,
FORM layout_build USING u_lf_layout TYPE slis_layout_alv.
u_lf_layout-box_fieldname = 'SELK'. " Checkbox
u_lf_layout-zebra = 'X'.
u_lf_layout-colwidth_optimize = 'X'.
u_lf_layout-confirmation_prompt = 'X'.
u_lf_layout-get_selinfos = 'X'.
u_lf_layout-f2code = '&ETA' .
u_lf_layout-detail_titlebar = 'Delivery Due List'.
u_lf_layout-key_hotspot = 'X'.
u_lf_layout-info_fieldname = 'COL'.
ENDFORM. " layout_build
Is there anything that I am missing. Please suggest.Many thanks for your help.
Regards,
MiraHi,
i think you've forgotten param. <b>i_save</b>
x_save = 'X'.
gs_variant-report = sy-repid.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_STRUCTURE_NAME = 'ZTAB01'
IS_VARIANT = gs_variant
IS_layout = lay
I_SAVE = x_save
TABLES
T_OUTTAB = gridtab
EXCEPTIONS
OTHERS = 1.
regards Andreas -
Hi,
I need to avoid the displaying the Crystal Report Functionality which is present in the drop down functionality of Excel Icon on ALV grid using object methods .
Am using
call method grid1->set_table_for_first_display
exporting
i_save = 'A'
is_variant = gs_variant
is_print = gs_print
is_layout = gs_layout
i_default = 'X'
changing it_fieldcatalog = gt_fieldcat
it_sort = gt_sort
it_outtab = itab_display[].
The below code will explain Using 'REUSE_ALV_GRID_DISPLAY'. I am looking for object oriented method to do the same as below code .
declare an internal table as below -
Data: t_exclude type SLIS_T_EXTAB with header line.
t_exclude-fcode = '&VCRYSTAL'.
append t_exclude.
clear t_exclude.
Now the function code of the crystal report functionality will be appended to this internal table. pass this parameter to the 'IT_EXCLUDING' parameter of the FM 'REUSE_ALV_GRID_DISPLAY.
below is a sample code.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = w_repid
is_layout = fs_layout
it_fieldcat = i_fieldcat
it_excluding = t_exclude[]
i_save = 'A'
it_events = t_events
TABLES
t_outtab = t_iab
EXCEPTIONS
program_error = 1
OTHERS = 2.
Thanks,
VindHi John ,
Tried the code still not wroking , are there any more changes to include in the code please let me know am trying to exclude the option Crystal Report'.
-Exclude functions:
zlv_exclude = cl_gui_alv_grid=>MC_FC_EXPCRDATA.
append zlv_exclude to zlt_functions.
zlv_exclude = cl_gui_alv_grid=>mc_fc_view_crystal.
append zlv_exclude
to zlt_functions.
call method grid1->set_table_for_first_display
exporting
i_save = 'A'
is_variant = gs_variant
is_print = gs_print
is_layout = gs_layout
i_default = 'X'
it_toolbar_excluding = zlt_functions
changing it_fieldcatalog = gt_fieldcat
it_sort = gt_sort
it_outtab = itab_display[].
Thanks,
Vind -
Hi experts,
Iam trying to display icons in one of the columns in my ALV grid.
I have created ITAB like this.
type-pools : icon,slis.
data: begin of gt_dtl occurs 0,
range(4).
include structure zbitrdtl.
data: field_style type lvc_t_styl.
data: end of gt_dtl.
And iam trying to pass ICON like this.
loop at gt_dtl.
gt_dtl-range = icon_green_light.
modify gt_dtl.
endloop.
And passing into fieldcat.
ls_fcat-fieldname = 'Range'.
ls_fcat-tabname = 'GT_DTL'.
ls_fcat-scrtext_l = 'Range'.
ls_fcat-outputlen = '10'.
ls_fcat-col_pos = 8.
ls_fcat-icon = 'X'.
append ls_fcat to gt_fieldcat.
clear ls_fcat.
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_buffer_active = 'X'
i_structure_name = 'ZBITRDTL'
i_client_never_display = 'X'
i_internal_tabname = 'GT_DTL'
changing
ct_fieldcat = gt_fieldcat
exceptions
inconsistent_interface = 1
program_error = 2
others = 3.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
<b>Iam able to see the ICON in the ITAB in debugging mode.</b>
But iam not getting ICON in my output of ALV.
where iam doing wrong?
Rewared guaranteed,
thanks
kakiHi...
copy paste the following code. And check out hte variation.
Hope this will be helpful
Thank-You.
vinsee
REPORT zrwty_wty_errors .
TYPE
TYPE-POOLS: slis, icon.
Tables
Tables : pnwtyh,
balhdr.
Data Decleration
DATA: text(1000), lv_clmno(40).
Internal table for messages ( Datewise )
DATA: BEGIN OF it_balhdr OCCURS 0,
lognumber TYPE balhdr-lognumber,
log_handle TYPE balhdr-log_handle,
END OF it_balhdr.
Internal table for PNWTYH
DATA: BEGIN OF it_pnwtyh OCCURS 0,
clmno TYPE pnwtyh-clmno,
log_message TYPE pnwtyh-log_message,
END OF it_pnwtyh.
Internal table to fetch the actual text messages
DATA: it_message LIKE balm OCCURS 0 WITH HEADER LINE.
Internal Table to handle the ALV o/p
DATA: BEGIN OF it_grid OCCURS 0,
clmno TYPE pnwtyh-clmno,
chgdat TYPE dats,
icon TYPE icon-id," BALIMSGTY
text(1000),
END OF it_grid.
Field Catelog and layout Decleration
DATA: it_fieldcat TYPE lvc_t_fcat,
wa_fieldcat TYPE lvc_s_fcat OCCURS 0 WITH HEADER LINE,
x_fieldcat TYPE lvc_s_fcat OCCURS 0 WITH HEADER LINE.
DATA: x_layout TYPE lvc_s_layo.
DATA: lv_repid LIKE sy-repid.
have hotspot for a PO.
DATA: s_fieldcat LIKE LINE OF it_fieldcat.
s_fieldcat-hotspot = 'X'.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
SELECT-OPTIONS:
s_aldate FOR balhdr-aldate.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
PARAMETERS : r1 RADIOBUTTON GROUP rg DEFAULT 'X'.
PARAMETERS : r2 RADIOBUTTON GROUP rg .
SELECTION-SCREEN END OF BLOCK b2.
if s_aldate-high = '00000000'.
s_aldate-high = s_aldate-low.
endif.
FM to fetcht he messg no. based on date
CALL FUNCTION 'APPL_LOG_READ_DB'
EXPORTING
object = 'WTY'
subobject = 'CLAIMMSG'
EXTERNAL_NUMBER = ' '
date_from = s_aldate-low
date_to = s_aldate-high
TIME_FROM = '000000'
TIME_TO = '240000'
log_class = '1'
PROGRAM_NAME = '*'
TRANSACTION_CODE = '*'
USER_ID = ' '
MODE = '+'
PUT_INTO_MEMORY = ' '
IMPORTING
NUMBER_OF_LOGS =
TABLES
HEADER_DATA =
HEADER_PARAMETERS =
messages = it_message
MESSAGE_PARAMETERS =
CONTEXTS =
data: zlines type i.
describe table it_message lines zlines.
if it_message[] is initial.
message S398(00) with 'No data found.'.
exit.
endif.
IF radio button ERROR only is selected, Delete others
IF r2 = 'X' .
DELETE it_message WHERE msgty <> 'E'.
ENDIF.
fetch log_handle from BALHDR
SELECT lognumber log_handle FROM balhdr INTO TABLE it_balhdr FOR ALL
ENTRIES IN
it_message WHERE lognumber = it_message-lognumber.
Based on log _handle fetch claim no from PNWTYH
SELECT DISTINCT clmno log_message FROM pnwtyh INTO TABLE it_pnwtyh FOR
ALL ENTRIES IN it_balhdr WHERE log_message = it_balhdr-log_handle.
LOOP AT it_message.
READ TABLE it_balhdr WITH KEY lognumber = it_message-lognumber.
IF sy-subrc = 0.
READ TABLE it_pnwtyh WITH KEY log_message = it_balhdr-log_handle.
IF sy-subrc = 0.
lv_clmno = it_pnwtyh-clmno.
ENDIF.
FM to fetch the actual text message
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = it_message-msgid
lang = 'EN'
no = it_message-msgno
v1 = it_message-msgv1
v2 = it_message-msgv2
v3 = it_message-msgv3
v4 = it_message-msgv4
IMPORTING
msg = text
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
it_grid-clmno = lv_clmno.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_grid-clmno
IMPORTING
output = it_grid-clmno.
Local Variable to handle Date Data
DATA: l_tmstp(30) TYPE c,
l_date TYPE sydatum.
WRITE it_message-time_stmp TO l_tmstp LEFT-JUSTIFIED DECIMALS 0
NO-GROUPING.
l_date = l_tmstp(8).
it_grid-chgdat = l_date.
it_grid-text = text.
IF it_message-msgty = 'E'.
it_grid-icon = '@0A@'.
ELSEIF it_message-msgty <> 'E' AND it_message-msgty <> 'S'.
it_grid-icon = '@09@'.
ENDIF.
APPEND it_grid.
CLEAR it_grid.
CLEAR: lv_clmno, it_message, text.
ENDIF.
ENDLOOP.
PERFORM display_alv.
*& Form display_alv
text
--> p1 text
<-- p2 text
FORM display_alv .
PERFORM build_field_catalog.
PERFORM build_layout.
Assign program name to variable
lv_repid = sy-repid.
Call the ALV Grid FM for Display
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_callback_program = lv_repid
i_grid_title = 'Wty Errors'
is_layout_lvc = x_layout
it_fieldcat_lvc = it_fieldcat
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
TABLES
t_outtab = it_grid[]
EXCEPTIONS
program_error = 1
OTHERS = 2 .
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " display_alv
*& Form build_field_catalog
text
--> p1 text
<-- p2 text
FORM build_field_catalog .
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'ZWTY_ERR'
i_bypassing_buffer = 'X'
CHANGING
ct_fieldcat = it_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
wa_fieldcat-col_pos = 1.
wa_fieldcat-fieldname = 'ICON'.
wa_fieldcat-seltext_l = 'Mssg Type'.
wa_fieldcat-seltext = 'Mssg Type'.
wa_fieldcat-icon = 'X'.
wa_fieldcat-SCRTEXT_L = 'Mssg Type'.
wa_fieldcat-outputlen = 8.
wa_fieldcat-tabname = 'IT_GRID'.
APPEND wa_fieldcat TO it_fieldcat.
MODIFY it_fieldcat FROM wa_fieldcat TRANSPORTING seltext_l WHERE
fieldname = 'ICON' .
CLEAR wa_fieldcat.
MODIFY it_fieldcat FROM wa_fieldcat TRANSPORTING seltext icon
SCRTEXT_L
WHERE
fieldname = 'ICON' .
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 2.
wa_fieldcat-fieldname = 'CHGDAT'.
wa_fieldcat-seltext_l = 'Chg Date'.
wa_fieldcat-seltext = 'Chg Date'.
wa_fieldcat-SCRTEXT_L = 'Chg Date'.
wa_fieldcat-outputlen = 10.
wa_fieldcat-tabname = 'IT_GRID'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
MODIFY it_fieldcat FROM wa_fieldcat TRANSPORTING seltext_l WHERE
fieldname = 'CHGDAT' .
CLEAR wa_fieldcat.
MODIFY it_fieldcat FROM wa_fieldcat TRANSPORTING seltext SCRTEXT_L
WHERE
fieldname = 'CHGDAT' .
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 4.
wa_fieldcat-fieldname = 'TEXT'.
wa_fieldcat-seltext_l = 'Message Text'.
wa_fieldcat-seltext = 'Message Text'.
wa_fieldcat-SCRTEXT_L = 'Chg Date'.
wa_fieldcat-outputlen = 100.
wa_fieldcat-tabname = 'IT_GRID'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
*MODIFY it_fieldcat FROM wa_fieldcat TRANSPORTING seltext_l WHERE
fieldname = 'TEXT'.
CLEAR wa_fieldcat.
MODIFY it_fieldcat FROM wa_fieldcat TRANSPORTING seltext SCRTEXT_L WHERE
fieldname = 'TEXT'.
CLEAR wa_fieldcat.
MODIFY it_fieldcat FROM s_fieldcat TRANSPORTING hotspot
WHERE fieldname = 'CLMNO'.
ENDFORM. " build_field_catalog
*& Form Build_layout
text
--> p1 text
<-- p2 text
FORM build_layout .
CLEAR x_layout.
x_layout-colwidth_optimize = 'X'.
x_layout-zebra = 'X'.
ENDFORM. " Build_layout
FORM display_detail *
--> UCOMM *
--> SELFIELD *
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
IF ucomm = '&IC1'.
READ TABLE it_grid INDEX selfield-tabindex.
IF sy-subrc EQ 0.
CALL 'WTY' FOR SELECTED CLAIM
CALL FUNCTION 'ZWTY_CLAIM_DISPLAY'
EXPORTING
i_clmno = it_grid-clmno
iv_from_doc = 'J'
EXCEPTIONS
not_found = 1
authority_failed = 2
no_claimtype = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. "user_command -
ICON with field contents in case of ALV GRID
please have a look at the program. the output of the program display ICONS with the field contents.
I wanted the same functionality in case of GRID layout.
But in case of GRID layout I am only getting ICON without field contents.
In this Example
if I use ALV LIST the ouput will be STACk ICON with X
IF I use ALV GRID the output will be STACK ICON.
REPORT ZTEST_SO1 .
type-pools : slis.
data : result(25).
types : BEGIN OF Ty_MARA,
gv_flag type char25,
end of ty_mara.
data : gt_mara type standard table of ty_mara,
wa_mara type ty_mara.
DATA : gt_fieldcat type slis_t_fieldcat_alv,
wa_fieldcat type slis_fieldcat_alv.
wa_fieldcat-fieldname = 'GV_FLAG'.
APPEND WA_FIELDCAT TO GT_FIELDCAT.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = '@3B@'
TEXT = 'X'
INFO = 'YY'
ADD_STDINF = 'X'
IMPORTING
RESULT = wa_mara-gv_flag.
IF sy-subrc EQ 0.
APPEND WA_MARA TO GT_MARA.
ENDIF.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = 'ZTEST_SO1'
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
IS_LAYOUT =
IT_FIELDCAT = GT_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = GT_MARA
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Read the documentation of FM ICON_CREATE, the purpose of the Function module is entirely different from what you are using it for.
To print Icons in ALV (Using FMs ) all you need to do is to send the Icon name in the field.
Also parameters TEXT and INFO of FM ICON_CREATE seem to be flags, that are appended to the icon name so that when you set it on the screen the appropriate info or Text is shown. -
ALV GRID with icon fields. When exports to Excel, icon fields are emtpy.
Hi all,
In our SAP system (6.0 ECC) we've noticed the following behaviour:
In ALV GRID with icons (color lights for example...) when we export the list to Excel format with the standard button bat, the icon column is always empty.
We think that in previous SAP version (4.7), the code corresponding to the icon appeared (For example @08@ for green light).
It's possible to have tha same functionality in this new version like in 4.7?
Regards.
Edited by: Ole ES on Nov 17, 2010 6:05 PMHi,
Check the format in which you export to Excel (MHTML, XML, ...) and try antoher one.
http://help.sap.com/saphelp_erp60_sp/helpdata/en/66/79ad48157f11d2953700a0c930328a/content.htm
I think the integrated Excel mode shows '@08@'.
Best regards,
Guillaume -
Problem when printing icons of an ALV grid
I made an Alv grid report that has some icons.When i printed i don't see the icons but isee some characters ...
What can i do ?
Thanks a lot ....hi good
if you take the print out of a alv grid report it wont show you the icon pictures in your paper,it wll show you the respective characters for those icons,
Thanks
mrutyun^ -
is there any way in which we can put an icon in a cell in alv grid list like we put pushbuttons on alv grid
Hai ,
Please use the below links ..
How can I display an icon in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
Regards,
K.Vinay Kumar -
ALV grid refresh problem - Icons briefly flashed on screen
Hi ,
I have an editable OO ALV grid which has a "New Entries" option. When the user clicks on that button a new blank row is appended at the bottom. The problem is on some monitors /screens when the user clicks on the button the ALV grid flashes for a brief moment and every cell has an image icon.
You can see this problem by going to Tcode SE16N choose a large table like VBAP and display 500 records or more. On the next screen press the page down button, you would see those icons.(the problem is as described above, except that the se16n ALV is not editable ).
Is this a buffering problem of ALV ? Or is there a way to avoid / fix this ?
Thanksyou will find a beginning of explanation here in [sap library - Using the ALV Grid Control in WANs|http://help.sap.com/saphelp_nw2004s/helpdata/en/32/d3e962f7fb11d2b48c006094192fe3/frameset.htm]
-
ALV Grid and Icon : Printing Problem
Hi, i develop some reports using ALV Grid and Icon and i'm facing printing problem, all report that using ALV grid with the option icon = 'X' cannot print properly, all the character field showing improper icon instead of the text. While all the ALV grid report with the option icon = ' ' can print normally.
Thanks.Hi,
Check the Demo Program <b>BCALV_DEMO_TOOLTIP</b>, Here i am able to see the Output Properly, and also able to Print them.
Regards
vijay
Maybe you are looking for
-
My ipod touch won't download anything ill tap download then it'll leave the app then ask for my password after i type my password it says "enter your [?] and password then tap security info and answer the Qs" then ill tap okay and it'll say the same
-
Illustrator CS5 just won't stay open
I have looked all over the forums and elsewhere to find a solution to this, but so far, I haven't been able to resolve it. I noticed many other people have had this problem, and it was resolved in many ways, but none of those ways worked for me. This
-
ITunes on new Mac Mini does not show shared libraries on network or songs on NAS drive
iTunes on new Mac Mini does not show shared libraries on network or songs on NAS drive The latest version of iTunes on a 3-month old Mac Mini (8 gig RAM, OS 10.10.2) does not see any of the shared iTunes libraries on a MacBookPro (MBP) (OS 10.9.5) a
-
Online Migration using SQL developer
Hi All, We are planning to migrate our production SQL server.2005 database to oracle 10g. If I use online migration using Oracle SQL Developer Tool to migrate data from SQL server 2005 to Oracle 10g, then will it migrate all those records that are in
-
Tomcat startup,shutdown blues......
hi, my dev environment:Win2000 professional,Tomcat 4.1,j2sdk1.4.1_02 I hv successfully installed TomCat and m able to run jsp,servlet,struts applications. The only problem i m facing is dat.....i dun hv to use "startup.bat" for starting the Tomcat.Wh