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

how to disable push button?

Former Member
0 Likes
997

Hi All,

we have two push buttons ADD and DELETE.Based on some condition we need to disable it.The foolowing code is not working.What could be the problem?

loop at screen.

IF screen-name = 'ADD' or screen-name = 'DELETE'.

screen-invisible = 1.

modify screen.

endif.

Thanks,

Rakesh More.

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
710

These are pushbuttons on the screen, not the toolbar right?

Regards,

Rich Heilman

Read only

0 Likes
710

This works fine in my case.

        loop at screen.
          if screen-name = 'ACCEPTSHIPQTY'.
            screen-invisible  = 1.
            modify screen.
          endif.
        endloop.

If the buttons are on the application toolbar. You must exclude them using the SET PF-STATUS statement.

set pf-status 'Test' excluding 'ADD'.

If you want to do more than one, you must use a table here.

http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/801e2d454211d189710000e8322d00/frameset.htm

Regards,

Rich Heilman

Read only

Former Member
0 Likes
710

Hi,

try this.

loop at screen.

IF screen-name = 'ADD' or screen-name = 'DELETE'.

screen-invisible = '1'.

modify screen.

endif.

endloop.

regards,

bharat.

Read only

Former Member
0 Likes
710

hi,

do you want to make the buttons on application tool bar invisible or grayed out?

if you want to gray them out, then go to pf-status..

Go-> attributes-> push button assignment

select radiobutton display all and activate.

Now, you can get the buttons that are excluded in pf-status as grayed out .

regards,

Sailaja.