Skip to Content
author's profile photo Former Member
Former Member

How to disable a pushbutton created in selection screen.

How to disable a pushbutton created in selection screen.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Feb 10, 2005 at 05:50 PM

    you can make it invisible during runtime.

    At the event, AT SELECTION-SCREEN OUTPUT. you can turn attributes on and off for screen elements. In this case, invisible = 1, makes the element invisible, 0 makes is visible.

    here is a short sample.

    report zrich_0001.
    
    parameters: p_check type c.
    selection-screen pushbutton 40(20) gocfg 
                         user-command gocfg.
    
    at selection-screen output.
    
      loop at screen.
        if screen-name = 'GOCFG'.
          screen-invisible = '1'.
          modify screen.
        endif.
      endloop.
    
    

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 10, 2005 at 06:12 PM

    As Rich suggested, that will make the button disappear but it would still allow the user to enter the function code. For example, if your button was assigned function code FUNC, the user could type =FUNC in the ok code and hit enter. Your AT SELECTION SCREEN event would be invoked and passed that function code.

    If this is a concern, the simplist thing to do is set a flag that you have turned off that button/function code and respond accordingly in your AT SELECTION SCREEN event by doing nothing or giving a message.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.