In this article we will see how to create toolbar buttons and click code added to selections screen. In this example we will create a program that will display a selection screen having three toolbar buttons, each of which when clicked takes to other transaction.

1. Declare sscrfields the declare dictionary structure.

2. We define buttons with function keys 1,2,3 using selection-screen statement.

4. We will define text assignment respective text for the buttons to the functxt_01, functxt_02, functxt_03 fields in initialization event. those field are the structure sscrfields.

5. We will define at selection-screen event, we will check the value of the field sscrfields-ucomm . The FC01, FC02, and FC03 values represent the button-click event of the first, second and third button respectively. We will call the transaction VA03, ME23N, VL03 for each button click.

The result :

how-to-add-toolbar-button-on-selection-screen-sap

Leave a Reply

Your email address will not be published. Required fields are marked *