Selection Screen – Disable Standard Toolbar Button

By | Last Updated on July 17, 2014 | 3,362

Many times you would need to disable the standard toolbar buttons to make sure unexpected behavior doesn’t occur. This code snippet will help you to achieve that.

Disable Standard Toolbar Button on Selection Screen

* Exclude Buttons from the PF-KEY
  DATA: t_rsexfcode        TYPE TABLE OF rsexfcode,
        ls_rsexfcode       LIKE LINE OF t_rsexfcode.
  ls_rsexfcode-fcode = 'PRIN'.          "Execute and Print
  APPEND ls_rsexfcode TO t_rsexfcode.
  ls_rsexfcode-fcode = 'SJOB'.          "Execute in Background
  APPEND ls_rsexfcode TO t_rsexfcode.
  ls_rsexfcode-fcode = 'VDEL'.          "Variant Delete
  APPEND ls_rsexfcode TO t_rsexfcode.
      p_status  = sy-pfkey
      p_exclude = t_rsexfcode.

Function Codes

You can get the function codes SJOB, PRIN, etc from GUI STATUS %_00 in the program RSSYSTDB. Or using the System > Status and drill down to the GUI status.

In Action

Before the code, You would have the buttons

After the code, buttons are disabled

Do you have a Code Snippet which you want to share, Submit Code Snippet here

Share It!

Don't miss an Update

Get notified of the new post, right into your inbox

Naimesh Patel{273 articles}

I'm SAP ABAP Consultant for more than a decade. I like to experiment with ABAP especially OO. I have been SDN Top Contributor.
Follow :

Explore all of his 273 articles.

Load comments


  • Sílvio Miranda

    Good tip… I´ll try this…

  • Gokul

    nice once…

Comments on this Post are now closed. If you have something important to share, you can always contact me.