10-02-2008 7:53 AM
I want to disable standard tool bar Save button during run time.
Is it possible to achieve this.
Thanks,
Sai.
10-02-2008 7:55 AM
10-02-2008 7:55 AM
10-02-2008 7:58 AM
10-02-2008 8:02 AM
Hi..,
We can hide application toll bar push buttons, which we creates..
set pf-status 'STATUS NAME' excluding 'PUSH BUTTON'.
<----in PBO
But I dont think you can hide standard tool bar button..
My suggestion is..,
If you dont want to disable SAVE button for perticuler action..,
Then you can validate SAVE button code in PAI event to roll back for the condition...
Thanks,
Naveen.I
10-02-2008 8:12 AM
Hi Sai,
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 declarations:
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'
then write
if sy-uname = 'SAI'.
wa_fcode = 'SAV'.
append wa_fcode to int_fcode.
clear wa_fcode.
endif.
then
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
Regards