‎2009 Feb 13 11:32 AM
hello experts...
I am trying to disable a push buton in my modulpool based on some condition.
I am using 'loop at screen' command but it is not working. will u tell me how to do this .
thanks..
‎2009 Feb 13 11:35 AM
Do it in the PBO Module and MODIFY table.
Sample code...
LOOP AT SCREEN.
IF ( SCREEN-NAME = 'DA_BOX' AND SCREEN-GROUP1 = 'G1' )
SCREEN-INVISIBLE = 1.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
Hope this helps..
‎2009 Feb 13 11:52 AM
Hi ,
You want to disable it or make it invisible ..Can you explain clearly.
And also what error you get ?
‎2009 Feb 13 12:12 PM
Hi,
Try using,
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'FID'. "FID id is the modif ID
SCREEN-INPUT = 0.
ENDIF.
ENDLOOP.Hope this helps.
Thanks & Regards.
‎2009 Feb 13 12:13 PM
Hi,
If you need to disable the pushbutton use the loop as stated by karan, instead of invisible use
screen-input = 0.
regards,
Sachin
‎2009 Feb 13 12:34 PM
hi,
write this in PBO.
module pbttn_visible.
*&---------------------------------------------------------------------*
*& Module pbttn_visible OUTPUT
*&---------------------------------------------------------------------*
IF <urcondition>..
LOOP AT SCREEN.
IF screen-name = 'PB3'. "---> PB3 is the name of the pushbutton
screen-invisible = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.