Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Activate Deactivate PF-STATUS

Former Member
0 Kudos

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.

5 REPLIES 5

former_member223537
Active Contributor
0 Kudos

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.

0 Kudos

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?

Former Member
0 Kudos

create a PF-Status with the desired buttons..

at selection screen output

check if entered value is valid then SET PF-STATUS...

Pawan_Kesari
Active Contributor
0 Kudos

to deactivate a particular FCODE in status bar use

SET PF-STATUS pfstat EXCLUDING 'XXXXX' .

where XXXX is FCODE which you want to deactivate.

Former Member
0 Kudos

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