01-25-2008 8:21 AM
Hi,
I have a requirement to add table control in a custom defined infotype. The fields include two date fields, one icon field, number and name fields. I also need to populate my icon field with three different icons according to the modification in the records of the table control fields.
Please suggest regarding adding icons as a field of the table control and any suggestions about this are welcome.
Thanks in advance,
Saipriya
01-25-2008 8:52 AM
Hi,
Use FM 'ICON_CREATE' to add the icon to your table control field. (Give your table control field in Result parameter). Check the demo program DEMO_DYNPRO_STATUS_ICONS to display icon in the screen field.
Hope this helps,
Shrinivas
01-25-2008 8:52 AM
Hi,
Use FM 'ICON_CREATE' to add the icon to your table control field. (Give your table control field in Result parameter). Check the demo program DEMO_DYNPRO_STATUS_ICONS to display icon in the screen field.
Hope this helps,
Shrinivas
01-25-2008 8:57 AM
add this include <icon>.
we have a standard table called icon
go to that table and check which icon u want to display and directly give that icon_name in the table control so that i will display the icon.
01-29-2008 3:47 AM
Hi,
I tried out as u said.. using the function module icon_create. The function module works if the field is a input/output field. But I want to create icons in a input/output field in the table control. I tried the same way but a runtime error is coming. Please help me.
01-29-2008 3:50 AM
Hi Saipriya,
Use FM 'ICON_CREATE' to add the icon to your table control field. (Give your table control field in Result parameter). Check the demo program DEMO_DYNPRO_STATUS_ICONS to display icon in the screen field.
This may be helpful,
thanks,
swaroop
01-29-2008 7:03 AM
Hi,
I tried out as u said but am gettin a run time error. I had created a tablecontrol and a field by the name of icon1. when i call the function module icon_create am getting a runtime error. please help me.
This is my coding.
tables: icon.
DATA : icon_name(20) TYPE c,
icon_text(10) TYPE c.
DATA : flag TYPE i.
DATA : icon1 TYPE icon_text.
in flow logic,
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
LOOP AT WI_TABLE1 WITH CONTROL TABLE1.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
LOOP AT WI_TABLE1.
ENDLOOP.
module icon_pai.
module icon_pai input.
if flag = 1.
icon_name = 'ICON_GREEN_LIGHT'.
icon_text = 'green'.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = icon_name
TEXT = icon_text
INFO = 'Status'
ADD_STDINF = 'X'
IMPORTING
RESULT = icon1
EXCEPTIONS
ICON_NOT_FOUND = 1
OUTPUTFIELD_TOO_SHORT = 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.
endif.
endmodule. " icon_pai INPUT
Please help me out....
01-29-2008 8:36 AM
Hi
we have a standard table ICON
In the program use this as an include.
In the data browser go to that particular table and check which icon best suits ur requirement and use it.
In ur program give the relevant icon name in the table control u are using so that the icon will be displayed.
Hope this helps you.
reward if useful.
regs
krish