‎2005 Aug 26 4:32 AM
Hey experts,
I have created EXECUTE ICON thru PF-STATUS.
Now I want to disable this icon dynamically depends on my condition.
How to do this.
ambichan.
‎2005 Aug 26 6:12 PM
Hi Ambi
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 WITH HEADER LINE.
move 'EXECUTE' to TAB-FCODE.
append TAB.
In the program, where you want to exclude 'EXECUTE' :
SET PF-STATUS 'STAT1' EXCLUDING TAB.
where 'STAT' is the name of your status
or also explore the following FM:
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
P_STATUS = 'STAT2'
P_PROGRAM = 'ZAJ_COLLEGE'
TABLES
P_EXCLUDE = TAB.
You can also add more exclusions in this 'tab'.
Regards
Ashish
‎2005 Aug 26 4:38 AM
See this sample code
MODULE SET_STATUS OUTPUT.
CASE SY-DYNNR.
WHEN '0100' .
SET PF-STATUS '100'.
WHEN '0200' OR '0300'.
PERFORM STATUS_200_300.
SET PF-STATUS '200' EXCLUDING IT_DEFUNC.
WHEN '0400'.
PERFORM CONTROL_MENU_ITEMS.
SET PF-STATUS '400' EXCLUDING IT_DEFUNC.
ENDCASE.
ENDMODULE. " SET_STATUS OUTPUT
FORM CONTROL_MENU_ITEMS.
CLEAR: IT_DEFUNC, IT_DEFUNC[].
IF SAVE_OKCODE = 'DELETE' OR SAVE_OKCODE = 'DISPLAY'.
APPEND SAVE_OKCODE TO IT_DEFUNC.
PERFORM STATUS_DELETE_DISPLAY.
ELSEIF SAVE_OKCODE = 'CREATE' OR SAVE_OKCODE = 'CHANGE'.
APPEND SAVE_OKCODE TO IT_DEFUNC.
PERFORM STATUS_CREATE_CHANGE.
ELSEIF DATA_UCOMM = 'DELETE' OR DATA_UCOMM = 'DISPLAY'.
‎2005 Aug 26 4:46 AM
Hi,
Check this sample program,you will get an idea.
DEMO_LIST_SET_PF_STATUS_1
Thanks,
Ruthra.R
‎2005 Aug 26 4:23 PM
‎2005 Aug 26 6:12 PM
Hi Ambi
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 WITH HEADER LINE.
move 'EXECUTE' to TAB-FCODE.
append TAB.
In the program, where you want to exclude 'EXECUTE' :
SET PF-STATUS 'STAT1' EXCLUDING TAB.
where 'STAT' is the name of your status
or also explore the following FM:
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
P_STATUS = 'STAT2'
P_PROGRAM = 'ZAJ_COLLEGE'
TABLES
P_EXCLUDE = TAB.
You can also add more exclusions in this 'tab'.
Regards
Ashish
‎2005 Aug 27 2:30 AM
hey ashish,
THanks for your reply
What you gave suggestion seems to be the button will
get removed from Application tool bar.
Actually my requirement is, Execute button should display in screen but user could not be able to activate the button.
Is it possible to do this?
ambichan
Message was edited by: ambi chan
‎2005 Aug 27 2:44 AM
‎2005 Aug 27 3:03 AM
Hey Rich,
Thanks for your reply.
USING PF-STATUS 'S100',
I have added one EXECUTE Button(ICON_EXECUTE_OBJECT) in application tool bar. While running the program the added
EXECUTE Icon Button(Its not ordinary PUSH BUTTON, its Execute ICON button) will display in APPLICATION TOOL BAR(TOp of the screen).
Now depends on condition i want this button to greyed out or inactive.
hope i explained ..if not pls let meknow to explain more clearly.
ambichan
‎2005 Aug 27 3:05 AM
‎2005 Aug 26 9:11 PM
‎2005 Aug 27 1:26 PM
Hi Ambi
Thanks for giving more clear picture. Now i'm in a position to understand exactly what you want.....
Greying out a button in application toolbar (no removal)..
The solution that i proposed in earlier post will work but with something extra:
Double click on your menu -> choose Application toolbar
-> Goto -> Attributes -> Pusbutton assignment, here you have 3 options, you can choose 'Display All'.
Some other information i found on SAP help but not sure whether it works:
Start the Menu Painter.
Switch to change mode.
Choose Goto -> Attributes -> Application toolbar or choose the padlock icon to the right of the application toolbar
Set the Fixed positions option (check-box), and choose Continue
Now,the padlock icon next to the application toolbar appears 'locked'.
Now, Excluding the 'tab' (see my previous post) will just grey out.
Regards
Ashish Jain
‎2005 Aug 27 1:31 PM
Hi Ambi
I tried the 'former' solution in my code, it works: EXECUTE is greyed out but not removed
If it solves your problem, please close the thread
Cheers
Ashish Jain
‎2005 Aug 27 1:34 PM
By 'former' solution, i mean the 'first' solution in my 'second post' (not the one from SAP help).
Cheers
Ashish
‎2005 Aug 27 2:58 PM
Hey Ashish Jain,
Great Applause for you from myside.
yes this is what i want..great.
Thanks for your reply in right time.
Ambichan.