Create Push Buttons in Application Tool Bar

How to create pushbuttons in application tool bar in case of selection-screen?

REPORT  zsiva_test
MESSAGE-ID zprecot.
TABLES : afru.

TYPES : BEGIN OF ty_test,
        ism01 LIKE afru-ism01,
        END OF ty_test.
TABLES sscrfields.

SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001. 
SELECT-OPTIONS : so_werks FOR afru-werks. 
SELECTION-SCREEN PUSHBUTTON /79(10) charly USER-COMMAND abcd. 
SELECTION-SCREEN END OF BLOCK b1.

INITIALIZATION.
  MOVE 'Press' TO charly.

START-OF-SELECTION.

END-OF-SELECTION.
 

AT SELECTION-SCREEN.
  IF sscrfields-ucomm = 'ABCD'.
    MESSAGE i000 WITH so_werks-low 'Success' .
  ENDIF.

ABAP Tips by : V.Sivaram

Fast Links:
Get help for your ABAP problems
Do you have a ABAP Question?

SAP Books
SAP Certification, Functional, Basis Administration and ABAP Programming Reference Books

ABAP Tips
ABAP Forum for Discussion and Samples Program Codes for Abapers

Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.erpgreat.com

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.