10-18-2007 12:26 PM
Hi Experts,
How can I reactivate my custom menu button from deactivation?
For example when the user enters a valid sales document number, the custom menu button will be activated. The buttons will only be active when the user enters a valid sales document number in the selection screen.
Thanks.
10-18-2007 12:30 PM
Validate the Sales document no. & then call pf-status.
if v_vbeln = 'VALID'. "Pass your condition for validation
SET PF-STATUS 'ZACT'. "ACTIVE PF-STATUS
else.
SET PF-STATUS 'ZDAC'. "DEACTIVE PF-STATUS
Endif.
10-18-2007 12:33 PM
Hi Patil,
In PBO module I have already set my PF Status initially excluding the buttons.
In PAI module when I entered a sales document number I have to validate it if is it is a valid sales document number or not. Are you saying that I will call set pf-status again to activate my buttons? Is this possible?
10-18-2007 12:31 PM
create a PF-Status with the desired buttons..
at selection screen output
check if entered value is valid then SET PF-STATUS...
10-18-2007 12:35 PM
to deactivate a particular FCODE in status bar use
SET PF-STATUS pfstat EXCLUDING 'XXXXX' .
where XXXX is FCODE which you want to deactivate.
10-18-2007 1:17 PM
Hi,
To assign a GUI status to a screen, use the ABAP statement
SET PF-STATUS <stat> [OF PROGRAM <prog>]
[EXCLUDING <f>|<itab>].
This statement defines the user interface for all subsequent screens of a screen sequence until another is set using a new SET PF-STATUS statement. The GUI status <stat> must be a component of the current ABAP program, unless you use the OF PROGRAM addition in the SET PF-STATUS statement to set a GUI status of another program <prog>.
The EXCLUDING function allows you to change the appearance and function of a GUI status dynamically. This is useful if the individual user interfaces for a range of screens are very similar. You can define a single global status, and then just deactivate the functions you do not need using EXCLUDING. Specify <f> to deactivate the function code stored in field <f>. Specify <itab> to deactivate all function codes stored in the internal table <itab>. Field <f> and the lines of table
<itab> should be of type C, and have length 20.
You should set the GUI status for a screen in the PBO event. If you do not specify a GUI status for a screen, it is displayed with the interface of the previous screen. If you do not specify a GUI status for the first screen of a program, it has no user interface, and the user may not be able to leave the screen.
Regards,
Bhaskar