ABAP Program to Add Toolbar to Selection-Screen

This 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
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:

  1. ABAP Program to add Dynamic Parameter Text on Selection-Screen
  2. ABAP Program to Display OAER pictures on Screen
  3. Embed SAP View in an ABAP Program
  4. Date formatting for Display in ABAP Program
  5. ABAP Program for Table Maintenance in SAP

No Responses to “ABAP Program to Add Toolbar to Selection-Screen”

Post a Comment