Adding toolbar buttons on selection screen
In this recipe, we will see how toolbar buttons (and their relevant click code) may be added to selection screens. In this recipe, we will create a program that will display a selection screen having three toolbar buttons, each of which when clicked, takes us to a different transaction.
How to do it...
For adding buttons on your selection screen toolbar, proceed as follows:
First, declare the dictionary structure,
sscrfields
.Here we define buttons with function keys
1
,2
, and3
using theselection-screen
statement.Also, an integer
abc
is defined.Within the
initialization
event, the respective texts for the buttons are assigned to thefunctxt_01
,functxt_02
, andfunctxt_03
fields of the structuresscrfields
.Next, within the
at selection-screen
event, we check the value of the fieldsscrfields-ucomm
. TheFC01
,FC02
, andFC03
values represent the button-click event of the first, second, and third buttons respectively. We call the respective transactions...