Tuesday, January 18, 2011
In the GUI status of the selection screen set by the system, the application toolbar contains five inactive pushbuttons, to which the function codes FC01 to FC05 are assigned. This statement activates the pushbutton of the function code FC0n, whereby a value between 1 and 5 must be entered for n.

To enable use of the pushbuttons, the statement TABLES must be used to declare an interface work area of the structure SSCRFIELDS from the ABAP Dictionary.

To activate pushbuttons on the selection screen, Please follow the sample program.
REPORT  ztest_notepad.
"This declaration must be there.
TABLES: sscrfields.

SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME.
PARAMETERS: p1(10),
            p2(10).
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK block1.
"Add button to application toolbar
SELECTION-SCREEN FUNCTION KEY 1.  "Will have a function code of 'FC01'

INITIALIZATION.
  "Add displayed text string to buttons
  MOVE 'Application button' TO sscrfields-functxt_01.

*AT SELECTION-SCREEN.
AT SELECTION-SCREEN.

  IF sscrfields-ucomm = 'FC01'.
    BREAK-POINT.
  ENDIF.

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.