Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Disable standard tool bar button

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

Is it possible to achieve this.



Former Member
Former Member replied

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.



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


0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question