2005 Aug 25 8:53 AM
Hello,
I need to know whether some user added fields should be disabled or not depending on whether the current transaction only allows the user to look at the data or not. At the moment I check the sy-tcode whether it contains any of the transactions of which I know that they are for data display only. This is not very satisfactory as the code will break when a new transaction is created that serves for data display only.
So I would like to check whether the Save button in the horizontal button bar (left to the three buttons for Back, Finish, Cancel) is disabled or not. Does anybody know how to do this?
Thanks, Oliver Plohmann
2005 Aug 25 8:57 AM
Disabling and enabling are the functionalities that we can set in pf-status.
if you set ok-code for save it will display else it will not.
u can do this dynamically using this
SET PF-STATUS '1000' EXCLUDING itab.
in the itab u have set the ok-codes which are to be diaplayed,.
regds
gv
2005 Aug 25 8:57 AM
Disabling and enabling are the functionalities that we can set in pf-status.
if you set ok-code for save it will display else it will not.
u can do this dynamically using this
SET PF-STATUS '1000' EXCLUDING itab.
in the itab u have set the ok-codes which are to be diaplayed,.
regds
gv
2005 Aug 25 9:12 AM
Hello,
thanks for the answer. What I precisely want to do is to query whether the save button is disabled or not. I don't want to change its state but figure out in what state it is in. I can't get hold of its status using LOOP AT SCREEN. Do you know how to query its state?
Thanks for any answer.
Regards, Oliver Plohmann
2005 Aug 25 9:24 AM
You can use the command GET PF-STATUS with addiction EXCLUDING ITAB.
It should return the name of status and (in ITAB) the functions that are inactives
2005 Aug 25 9:41 AM
Hi,
thanks for the answer. What I get with GET PF-STATUS is the current status, which turned out to be GLOBAL. And that doesn't tell me much. I need the specific function code of the save button. I think I will have to dive into SAP's own includes to figure out how they are doing this.
Regarsd, Oliver
2005 Aug 25 9:15 AM
Perhaps you can find a table with the pf-status and the matching configuration of this status? Then you would be able to check it.