‎2007 Aug 24 1:28 PM
Hi,
I added an item to the application tool bar.
Its like a button which is displayed when the screen is called.
Now i want to enable and disable the button(item) based on some condition.
How to do that ???
Regards,
Bikash.
‎2007 Aug 27 12:44 PM
hi
you didnt specified report / module pool...
to enable/disable buttons on the application tool bar, use SET PF-STATUS.
Syntax
SET PF-STATUS status [OF PROGRAM prog] [EXCLUDING fcode].
at the starting of the program u might have specified a pf status.
say if u clik on a icon/button to disable it.. if its in the same program.
use command like
set pf-status 'ZSTATUS' excluding 'FCODE'.
if ur using PF status of some other program. specify the [OF PROGRAM prog]
set pf-status 'ZSTATUS' OF PROGRAM 'ZPRG' excluding 'FCODE'.
thanks
‎2007 Aug 24 2:12 PM
hi Bikash,
you should do something like this:
IF condition is true
LOOP AT screen.
IF screen-name EQ button.
screen-active = 0.
MODIFY screen.
ENDIF.
ENDLOOP.
ENDIF.
hope this helps
ec
‎2007 Aug 25 8:39 AM
to disable buttons in tool bar, check out option 'EXCLUDING' for ABAP command SET PF-STATUS.
If in a report, you can do something like:
SET PF-STATUS 'BASIC' EXCLUDING 'PICK' IMMEDIATELY.In a dynpro screen:
DATA fcode TYPE TABLE OF sy-ucomm.
...
MODULE status_0100 OUTPUT.
APPEND 'CHANGE' TO fcode.
APPEND 'SAVE' TO fcode.
SET PF-STATUS 'STATUS_0100' EXCLUDING fcode.
ENDMODULE.
Andrew
‎2007 Aug 27 12:44 PM
hi
you didnt specified report / module pool...
to enable/disable buttons on the application tool bar, use SET PF-STATUS.
Syntax
SET PF-STATUS status [OF PROGRAM prog] [EXCLUDING fcode].
at the starting of the program u might have specified a pf status.
say if u clik on a icon/button to disable it.. if its in the same program.
use command like
set pf-status 'ZSTATUS' excluding 'FCODE'.
if ur using PF status of some other program. specify the [OF PROGRAM prog]
set pf-status 'ZSTATUS' OF PROGRAM 'ZPRG' excluding 'FCODE'.
thanks
‎2007 Aug 28 11:40 AM
Hi,
Using excluding is making it invisible. Its disappearing altogether.
I want it to be seen but being disabled.
My exact use case is :
I have a tree displayed and a action_button on the toolbar.
Whenever the root of the tree is selected i want to disable the action_button
and when a child of the tree is selected the action should be disabled.
How i added this button on the toolbar is :
module STATUS_0200 output.
SET PF-STATUS 'STATUS_0200' .
SET TITLEBAR 'TITLE_0200'.
endmodule.
After double clicking on 'STATUS_0200' i added a button on application tool bar.
‎2007 Aug 29 6:12 AM
Hi,
You need to use a standard setting which specifies if you want to make visible a disabled button. Do as below :
In the GUI status screen, goto the the menu " GOTO"-> "ATTRIBUTES" ->"PUSHBUTTON ASSIGNMENT". In that you find the choices for disabled buttons: You need to choose "Display All".
Doing this, you will be able to see the disabled buttons also in an inactive state which are otherwise invisible.
Regards,
Sharat
‎2013 Jul 11 2:51 PM