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

disabling push button in modulpool

Former Member
0 Likes
2,032

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..

5 REPLIES 5
Read only

Former Member
0 Likes
997

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..

Read only

Former Member
0 Likes
997

Hi ,

You want to disable it or make it invisible ..Can you explain clearly.

And also what error you get ?

Read only

Former Member
0 Likes
997

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.

Read only

Former Member
0 Likes
997

Hi,

If you need to disable the pushbutton use the loop as stated by karan, instead of invisible use

screen-input = 0.

regards,

Sachin

Read only

Mohamed_Mukhtar
Active Contributor
0 Likes
997

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.