Current Poll
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
PARAMETERS: p_test AS CHECKBOX. INITIALIZATION. * 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. CALL FUNCTION 'RS_SET_SELSCREEN_STATUS' EXPORTING p_status = sy-pfkey TABLES 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
Good tip… I´ll try this…
nice once…