Copyright 2021 - BV TallVision IT

A button on the selection screen or on the selection screen application bar can be "enriched" with an icon. Run the SHOWICON report and take your pick. The button can also get "Quickinfo" information that is shown when the user hovers over the button with his/hes mouse. Here's how: 

Use function module ICON_CREATE to prepare a bit of text which instructs the SELECTION-SCREEN PUSHBUTTON statement which Icon to select and which Text and Quicktext should be used.

SELECTION-SCREEN PUSHBUTTON (70)
  pushbutton_01 USER-COMMAND ABAPCADABRA
  VISIBLE LENGTH 12.

INITIALIZATION. 
  CALL FUNCTION 'ICON_CREATE'
    EXPORTING
      NAME                        = ICON_PPE_MODNODE
      TEXT                        = 'Settings'
      INFO                        = 'Check out AbapcadabrA.com'
    IMPORTING
      RESULT                      = pushbutton_01
    EXCEPTIONS
      OTHERS                      = 0.

Alternatively (and also explanatory for the above example) you could simply set the text directly, like so:

INITIALIZATION. 
  pushbutton_01 = '@N5\QCheck out Abapcadabra.com@ Settings'.

Note how the text that is to be the Quickinfo text becomes part of the Icon-name, so @N5@ becomes @N5\QQuickinfo@.

Known issue - that you also need to know about

The text that holds the "Icon create instruction" is cut to length in the SELECTION-SCREEN PUSHBUTTON statement. So even though your small tiny little button only needs to consume 12 characters, the pushbutton length should be set to something larger to cater for the Quickinfo text you want to add. Cut the length of the actual button right back to 12 again by specifying a VISIBLE LENGTH as was done in the example above (total text length: 70, actual button width: 12.

Another known issue

The SELECTION-SCREEN PUSHBUTTON statement allows you to add a button in the selection screen. There is also the SELECTION-SCREEN FUNCTION KEY 1. method - which will place a button (1 of up to 5) in the menu bar of our report. Setting up Quickinfo for these doesn't work so well, the end user will see strange @ and \Q characters appearing. Not well. Not at all well.