Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Disable standard tool bar button

Former Member
0 Kudos

I want to disable standard tool bar Save button during run time.

Is it possible to achieve this.

Thanks,

Sai.

1 ACCEPTED SOLUTION

naveen_inuganti2
Active Contributor

Hi..,

Is it in modulepool program..?

Thanks,

Naveen.I

4 REPLIES 4

naveen_inuganti2
Active Contributor

Hi..,

Is it in modulepool program..?

Thanks,

Naveen.I

0 Kudos

Its a module pool.

0 Kudos

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

0 Kudos

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