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: 

diable push buttons

Former Member
0 Kudos

Hi guys,

Is there a way to disable/make invisible the push buttons?

Like if certain conditions are met, it will be disabled/invisible. Note it is visible by default.

thanks..

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hey Lana,

1. Declare a variable flag of type i in the main program.

If you are making use of pushbutton in a screen then, assign pushbutton to any group say,GR1 (this you can do in the layout editor of the screen) .Make flag = 1, when your condition to make the pushbutton invisible is met .Finally include this code in any module of the PBO event of the screen.

Loop at screen.

if screen-group1 = 'GR1' and flag = 1.

screen-input = 0.

screen-active = 0.

screen-invisibility = 1.

endif.

endloop.

Regards,

Kunal.

Message was edited by: Kunal Kumar

5 REPLIES 5

Former Member
0 Kudos

Hi,

Where is the Push button on a tool bar or on a Screen?

Am assuming its a tool bar.

Capture the function code or the ok code of the buttons u want to disable and populate a itab and use the EXCLUDING option of the PF- STAUS or menu.

Cheers

VJ

0 Kudos

on the screen..

0 Kudos

Hi,

You will have to write additional code in the PBO event to disable the screen elements.

You will need to use LOOP at SCREEN and disable the button based on ur specific condition.

Cheers

VJ

Former Member
0 Kudos

Hey Lana,

1. Declare a variable flag of type i in the main program.

If you are making use of pushbutton in a screen then, assign pushbutton to any group say,GR1 (this you can do in the layout editor of the screen) .Make flag = 1, when your condition to make the pushbutton invisible is met .Finally include this code in any module of the PBO event of the screen.

Loop at screen.

if screen-group1 = 'GR1' and flag = 1.

screen-input = 0.

screen-active = 0.

screen-invisibility = 1.

endif.

endloop.

Regards,

Kunal.

Message was edited by: Kunal Kumar

hymavathi_oruganti
Active Contributor
0 Kudos

if u r building that push button using selection screen, then using

at selection screen output.

loop at screen.

if (certain conditions met).

if screen-name = (pushbutton name).

screen-active = 0.

screen-invisible = 1.

modify screen.

endif.

endif.

endloop.

2. if u r getting the push buttin using PF STATUS, then

if conditions are met

SET PF-STATUS EXCLUDING (PUShbutton)