Application Development and Automation 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: 
Read only

Disable button in application toolbar (PF-status)

Former Member
0 Likes
11,781

Hi,

I have buttons in application tool bar in PF status.

Can i enable and disable the buttons in the application tool bar basing on some logic?

I dont want to hide or exclude, just to enable or disable.

If yes, kindly let me know the way.

I have tried to see in 'Screen' int tab, but it did not contain the application

tool bar buttons.

Thanks,

Prasad

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,870

Thanks a lot for the quick response.

My requirement is not to make the button invisible. With the Excluding

keyword, it will make the button invisible.

My requirement is to make disable, (button will be shown but grayed out).

Thanks,

Prasad

Hi,

I have buttons in application tool bar in PF status.

Can i enable and disable the buttons in the application tool bar basing on some logic?

I dont want to hide or exclude, just to enable or disable.

If yes, kindly let me know the way.

I have tried to see in 'Screen' int tab, but it did not contain the application

tool bar buttons.

Thanks,

Prasad

6 REPLIES 6
Read only

Former Member
0 Likes
2,870

Hi Prasad,


on PBO...

 SET PF-STATUS 'STATUS' EXCLUDING 'SAVE'.
(by the above statment the Save button is disable and invisable)


Regards,

Prabhudas

Read only

Former Member
0 Likes
2,870

Hi Prasad,

You can disable the buttons in application toolbar by EXCLUDING the function codes.

IF you have one function code e.g. OKCD then do the follosing

SET PF-STATUS 'PF_SCREEN' EXCLUDING 'OKCD'.

IF you have a whole list of function codes then you can do the following:

DATA: it_ucomm TYPE TABLE OF sy-ucomm,

w_ucomm TYPE sy-ucomm.

Append all the OK codes you want to exclude to the IT_UCOMM table and then

SET PF-STATUS 'PF_SCREEN' EXCLUDING it_ucomm.

Do this in the PBO.

Cheers,

Aditya

Read only

Former Member
0 Likes
2,870

Hi Prasad,

if it is report..


Example: 
In the following program segment, double clicking the mouse or using the function key F2 only enables selection of a single line from the basic list. This function is then deactivated for the basic list and all subsequent list levels. 

START-OF-SELECTION. 
  SET PF-STATUS 'BASIC'. 
  WRITE / `Pick me!`. 

AT LINE-SELECTION. 
  SET PF-STATUS 'BASIC' EXCLUDING 'PICK' IMMEDIATELY. 
  WRITE / `Don't pick me!`.

Regards,

Prabhudas

Read only

Former Member
0 Likes
2,870

You could easily have figured this out if you had simply pressed F1 on SET PF-STATUS.

The forum doe not substitute for SAP help.

Actually, thye SAP help is not very informative on this.

mea culpa

Rob

Edited by: Rob Burbank on Apr 13, 2009 4:47 PM

Read only

Former Member
0 Likes
2,871

Thanks a lot for the quick response.

My requirement is not to make the button invisible. With the Excluding

keyword, it will make the button invisible.

My requirement is to make disable, (button will be shown but grayed out).

Thanks,

Prasad

Read only

0 Likes
2,870

Hi,

Need to set the attributes of the GUI status..for more details check this link..