on 04-24-2006 1:03 PM
Can any one let me know how to disable a Button on the application toolbar based on a flag. i.e. If the flag is set the button should be enabled and if the flag is empty then the button should be disabled.
Regards,
Swamy Mantha.
hi,
when you say excluding button, this removes the button completely.
instead, if you want to disable button..
Set pf-status 'ABC' excluding itab.
double click on ABC, goto -> attributes -> push button assignment -> display all.
the buttons whose fcodes are passed to itab gets <b>grayed out (gets inactive)</b>.
depending on your condition, populate itab with the fcodes required.
Regards,
Sailaja.
Reward points, if answer is helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sailaja
One question. I want to disable a button after v press that button once i.e., total alv grid is displayed.
Should i write <b>set pf-status 'ZINV' EXCLUDING ' TRAN '.</b> in pai.
below is my code .Please chk & help me. i made that to display all as u mentioned earlier.
MODULE pai INPUT.
save_ok = ok_code.
CLEAR ok_code.
CASE save_ok.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
LEAVE TO SCREEN 0.
CALL METHOD g_grid->free.
FREE g_grid.
<b>WHEN 'TRAN'.
PERFORM transfer.
if SAVE_ok = 'TRAN'.
set pf-status 'ZINV' EXCLUDING ' TRAN '.
endif.</b>
WHEN OTHERS.
do nothing
ENDCASE.
CLEAR save_ok.
ENDMODULE.
Thanks
Swati
Hi,
U can use this statement
SET PF-STATUS 'STA3' EXCLUDING TAB.
STA3 -
Name of the STATUS.
ITAB -
Will contain the Function-code that corresponds to the Button on the application.
Fill itab with function code that u want to diasble.
Refresh the itab before u append function code based on the condition.
it will be executed in the PBO event.
U can use syntax suggested by akshay.
Regards
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all
Using the Excluding addition with set pf-status will simply hide the function button.I don't think it'll simple make the function buttons as in-active.
I have been trying for the same also.I tried using looping through screen . but it also don't serve the purpose.
So if anyone has some other ideas pls lemme know.
thnx in advance
With Regds
Pradipta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check following example for your requirement:
TYPES: BEGIN OF TAB_TYPE,
FCODE LIKE RSMPE-FUNC,
END OF TAB_TYPE.
DATA: TAB TYPE STANDARD TABLE OF TAB_TYPE WITH
NON-UNIQUE DEFAULT KEY INITIAL SIZE 10,
WA_TAB TYPE TAB_TYPE.
CLEAR TAB.
MOVE 'DELE' TO WA_TAB-FCODE.
APPEND WA_TAB TO TAB.
MOVE 'AUSW' TO WA_TAB-FCODE.
APPEND WA_TAB TO TAB.
SET PF-STATUS 'STA3' EXCLUDING TAB.
Regds,
Akshay
Note:Pls mark helpful answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Usage:
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.
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the SET PF-STATUS with the EXCLUDINg option.
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.