Disable standard tool bar button
I want to disable standard tool bar Save button during run time.
Is it possible to achieve this.
We use the ABAP statement "set pf-status" in PBO to set a tool bar in the module pool program
We can deactivate any button by passing the function code in the "excluding" syntax addition of the
"Set pf-status 'XXXX' excluding int_fcode'.
data: wa_fcode type ty_status.
data: int_fcode type table of ty_status.
eg : 'SAVE' is the function code for 'SAVE' button and '
ÉXAMPLE' is the name of pf-status in the module pool
then according to condition required.....say, if we want to hide save button for user 'SAI'
if sy-uname = 'SAI'.
wa_fcode = 'SAV'.
append wa_fcode to int_fcode.
set pf-status 'EXAMPLE' excluding int_fcode.
then you will no longer be able to use the 'SAVE'functionality for the user 'SAI'
Hope the example and code solves the problem