2007 Apr 16 7:13 AM
Hello All,
I have included a push button in the tab strip and the requirement is such that the button is displayed only under certain condition and has to be grayed out otherwise. I am making the screen modification inside the loop.
But the loop in the PBO and PAI is on the internal table (LOOP AT ITAB WITH CONTROL TABCON) and not the table control (LOOP WITH CONTROL TABCON). Hence the modify screen statement is not working as expected. The status of the button now depends on the last record in the tab strip. I cannot change the loop statement now. Can anyone let me know if there is a method to modify the button status ?
Thanks and Regards
Usha
2007 Apr 16 7:18 AM
hi
u create a module in the PBO. and inside that module write the following code
<b>loop at screen.
if screen-name = <button name>
screen-input = 0.
modify screen.
endif.
endloop.</b>
regards
ravish
<b>plz reward points if helpful</b>
2007 Apr 16 7:27 AM
hi Usha,
Include the following logic in PBO of your program.
loop at screen.
if screen-name = 'BUTTON1'.
" if your condition is not satisfied...put a check statement here
screen-input = 0.
modify screen.
endif.
endloop.
Hope this helps,
Sajan Joseph.
2007 Apr 16 7:37 AM
hi usha,
try out this,
<b>loop at screen.
if screen-name = 'push_button'.
screen-input = 0.
modify screen.
endif.
endloop.</b>
hope this is useful to u...
reward points if helpful...
Ginni..
2007 Apr 16 7:41 AM
HI USHA,
u can also try out this code
<b>AT SELECTION-SCREEN OUTPUT.
IF it_tab is not initial .
LOOP AT SCREEN.
IF screen-name = 'push_button'.
screen-input = '0'.
SCREEN-INVISIBLE = '1'.
MODIFY SCREEN.
ELSE.
screen-input = '1'.
ENDIF.
ENDLOOP.
ENDIF.</b>
hope this is useful to u...
reward points if helpful...
Ginni..
Message was edited by:
Ginni Makkar