10-06-2008 3:01 PM
Hi All,
I have a Push button in selection screen. I need to add Tool Tip on it,( Ex, If user put cursor on that button, some information should come just below that.).
If anybody are aware, please help me.
Thanks in advance.
Regards
Manglesh
10-06-2008 3:08 PM
check this sample code.
REPORT ztest_pbutton.
TABLES sscrfields.
DATA: dyn TYPE smp_dyntxt.
PARAMETERS: p_carrid TYPE s_carr_id.
SELECTION-SCREEN: FUNCTION KEY 1.
INITIALIZATION.
dyn-icon_id = '@1S@'.
dyn-quickinfo = 'Send Mail'.
dyn-icon_text = 'Mail'.
sscrfields-functxt_01 = dyn.
10-06-2008 3:19 PM
If you put the button in the menu :
SELECTION-SCREEN FUNCTION KEY 1.
add in INITIALIZATION or AT SELECTIOBN-SCREEN OUTPUT
CLEAR smp_dyntxt.
smp_dyntxt-text = 'TEXT'.
smp_dyntxt-icon_id = icon_tools.
smp_dyntxt-icon_text = 'TEXT'. "
smp_dyntxt-quickinfo = 'INFO'. " quick info text
smp_dyntxt-path = 'T'.
sscrfields-functxt_01 = smp_dyntxt.
If you put the pushbutton in the main part of the screen
SELECTION-SCREEN PUSHBUTTON /10(20) PUSHB
USER-COMMAND ABCD.
fill the value of PUSHB with the function module [ICON_CREATE|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=icon_create&cat=sdn_all] which give something like "@45QINFO@ TEXT".
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = 'ICON_TOOLS'
text = 'TEXT'
info = 'INFO'
IMPORTING
result = result.
pushb = result.
Regards