2008 Apr 26 6:32 AM
Hello Gurus ,
hw to change the Icon of a button in run time (module pool program ) .
regards .
Joy .
Hello Gurus ,
hw to change the Icon of a button in run time (module pool program ) .
regards .
Joy .
2008 Apr 26 11:36 AM
Hello Joy,
We use the function module for icon creation...
CALL FUNCTION 'ICON_CREATE'
EXPORTING
NAME = ICON_NAME
TEXT = ICON_TEXT
INFO = 'Status'
ADD_STDINF = 'X'
IMPORTING
RESULT = STATUS_ICON
EXCEPTIONS
ICON_NOT_FOUND = 1
OUTPUTFIELD_TOO_SHORT = 2
OTHERS = 3.
use it as follows ...
based on the requirement in PAI or PBO fill the icon_name
CASE VALUE.
WHEN 1.
ICON_NAME = 'ICON_GREEN_LIGHT'.
ICON_TEXT = TEXT-003.
WHEN 2.
ICON_NAME = 'ICON_YELLOW_LIGHT'.
ICON_TEXT = TEXT-002.
WHEN 3.
ICON_NAME = 'ICON_RED_LIGHT'.
ICON_TEXT = TEXT-001.
ENDCASE.
then call the function module and pass them
CALL FUNCTION 'ICON_CREATE'
EXPORTING
NAME = ICON_NAME
TEXT = ICON_TEXT
INFO = 'Status'
ADD_STDINF = 'X'
IMPORTING
RESULT = STATUS_ICON
EXCEPTIONS
ICON_NOT_FOUND = 1
OUTPUTFIELD_TOO_SHORT = 2
OTHERS = 3.
there is a detailed explanation with sample program for status icon given below in the link
http://help.sap.com/saphelp_nw04/helpdata/en/59/348efa61c611d295750000e8353423/content.htm
Pls check and revert
Reward if helpful
Regards
Byju