Application Development and Automation 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: 
Read only

diable push buttons

Former Member
0 Likes
775

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
Read only

Former Member
0 Likes
730

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

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
Read only

Former Member
0 Likes
730

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

Read only

0 Likes
730

on the screen..

Read only

0 Likes
730

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

Read only

Former Member
0 Likes
731

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

Read only

hymavathi_oruganti
Active Contributor
0 Likes
730

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)