‎2007 Aug 10 4:44 AM
hi all gurz,
i want to put icon on push button without menu painter,Is there is any property of pushbutton on which i can assign icon name,using include<icons>
or if another way pls! help me.
thank you.
‎2007 Aug 10 4:46 AM
Hi,
REPORT DEMO_DYNPRO_STATUS_ICONS.
DATA VALUE TYPE I VALUE 1.
DATA: STATUS_ICON TYPE ICONS-TEXT,
ICON_NAME(20),
ICON_TEXT(10).
CALL SCREEN 100.
MODULE SET_ICON OUTPUT.
SET PF-STATUS 'SCREEN_100'.
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.
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.
CASE SY-SUBRC.
WHEN 1.
MESSAGE E888(BCTRAIN) WITH TEXT-004.
WHEN 2.
MESSAGE E888(BCTRAIN) WITH TEXT-005.
WHEN 3.
MESSAGE E888(BCTRAIN) WITH TEXT-006.
ENDCASE.
ENDMODULE.
MODULE CANCEL INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE CHANGE.
CASE VALUE.
WHEN 1.
VALUE = 2.
WHEN 2.
VALUE = 3.
WHEN 3.
VALUE = 1.
ENDCASE.
ENDMODULE.
aRs
‎2007 Aug 10 4:50 AM
Hi Pawan
Pushbuttons have a label - the text that you specify statically in the attributes - and can also have icons. If you set the Output field attribute for a pushbutton, you can also set its text dynamically in the ABAP program. To do this, you must create a field in the ABAP program with the same name as the pushbutton. You must then assign the required text to the field before the screen is displayed. You can also assign icons to dynamic texts on pushbuttons by including the icon code in the text. The icon codes are all contained in the include program <ICON>. For example, the ICON_CANCEL () icon has the code @0W@.
regards,
Gaurav
Reward points if helpful
‎2009 Sep 24 8:20 AM
>
> Pushbuttons have a label - the text that you specify statically in the attributes - and can also have icons. If you set the Output field attribute for a pushbutton, you can also set its text dynamically in the ABAP program. To do this, you must create a field in the ABAP program with the same name as the pushbutton. You must then assign the required text to the field before the screen is displayed. You can also assign icons to dynamic texts on pushbuttons by including the icon code in the text. The icon codes are all contained in the include program <ICON>. For example, the ICON_CANCEL () icon has the code @0W@.
>
Nice.
How to do not to be view "@xx@" of "@xx@ TEXTLABEL" in button hint?
‎2007 Aug 10 4:50 AM
hi
good
create push button . created a folder
set the location of icons at the regedit variable:
\hkey_local_machine\software\oracle\ui_icon
set this to "d:\icon"
then forms search the icons files at this directory!
if you have many applications, you can set more than one directory separate by ";" like:
"d:\icon;e:\icon;
my_share_pc\production\icons"
thanks
mrutyun^
‎2007 Aug 10 4:52 AM
i think no way in menu bar.
selection screen it possable.
see se37
ICON_CHECK
ICON_CREATE
ICON_SHOW
ICON_TRANSLATE
ICON_TRANSLATION_PREPARE