sapdev logo background
sapdev logo sapdev logo
Comments

Add buttons to Application toolbar of selection screen




The following code demonstrates how to add user defined push buttons to the application toolbar of a standard report selection screen.


*&----------------------------------------------------------*
*& Report  ZSSCRAPPBUT                                      *
*&                                                          *
*&----------------------------------------------------------*
*&  Adds buttons to application toolbar of selection screen.*
*&----------------------------------------------------------*

REPORT  zsscrappbut NO STANDARD PAGE HEADING.

TABLES: t030, skat, sscrfields.


SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME
                                     TITLE text-001.
SELECT-OPTIONS: p_ktopl FOR t030-ktopl,
                p_komok FOR t030-komok,
                p_ktosl FOR t030-ktosl.
SELECTION-SCREEN SKIP.

* Add button to application toolbar
SELECTION-SCREEN FUNCTION KEY 1.  "Will have a function code of 'FC01'
SELECTION-SCREEN FUNCTION KEY 2.  "Will have a function code of 'FC02'
*                                                                 .....
SELECTION-SCREEN END OF BLOCK block1.



************************************************************************
*INITIALIZATION.
INITIALIZATION.

* Add displayed text string to buttons
MOVE 'Application button' to SSCRFIELDS-FUNCTXT_01.
MOVE 'Excecute report ????' to SSCRFIELDS-FUNCTXT_02.
*                                                 .....


************************************************************************
*AT SELECTION-SCREEN.
AT SELECTION-SCREEN.

if sscrfields-ucomm = 'FC01'.
  break-point.
elseif sscrfields-ucomm = 'FC02'.
  break-point.
endif.




comments powered by Disqus