05-08-2006 2:10 AM
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..
05-08-2006 2:28 AM
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
05-08-2006 2:19 AM
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
05-08-2006 2:20 AM
05-08-2006 2:26 AM
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
05-08-2006 2:28 AM
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
05-08-2006 3:52 AM
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)