Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add Tool Tip( additional Information) on Push Button

Former Member
0 Kudos

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

2 REPLIES 2

former_member188685
Active Contributor
0 Kudos

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.

raymond_giuseppi
Active Contributor
0 Kudos

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