24
Jul
ABAP Program to Add Toolbar to Selection-Screen
Posted by Admin, under ABAP, Sample Code, Selection-Screen, TutorialThis tutorial shows the sample code to insert Toolbar at the Selection-Screen and there handling, when user interacts with them. It is a nice code to look at for a beginner.

- Custom Toolbar
REPORT ZTEST_TOOLBAR.
TABLES: sscrfields.
* Specify the buttons
SELECTION-SCREEN FUNCTION KEY 1.
SELECTION-SCREEN FUNCTION KEY 2.
INITIALIZATION.
* Add Text to buttons
sscrfields-functxt_01 = ‘Custom Button1′.
sscrfields-functxt_02 = ‘Custom Button2′.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
PARAMETERS: vbeln LIKE vbak-vbeln.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN.
* Handling the button event
IF sy-ucomm EQ ‘FC01′.
PERFORM toolbar_test.
ENDIF.
IF sy-ucomm EQ ‘FC02′.
PERFORM toolbar_test.
ENDIF.
You might also be interested in these posts:

Post a Comment