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

Can we create a pushbutton on the selection screen?

Hi

Can we create a pushbutton on the selection screen?

If yes please tell me how?

thank You

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Sep 25, 2006 at 05:10 PM

    PL check demo_sel_screen_pushbutton

    ~Suresh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 25, 2006 at 05:11 PM

    Hi,

    SELECTION-SCREEN BEGIN OF LINE.

    SELECTION-SCREEN PUSHBUTTON POS_HIGH(8) PUSHY

    USER-COMMAND ABCD.

    SELECTION-SCREEN END OF LINE.

    INITIALIZATION.

    PUSHY = 'Command'.

    Thanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 25, 2006 at 05:14 PM

    Hi,

    Please try this.

    SELECTION-SCREEN PUSHBUTTON 1(15) P_PP USER-COMMAND PUS MODIF ID GP1.
    
    INITIALIZATION.
    P_PP = 'TEST'.
    
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF SCREEN-GROUP1 = 'GP1'.
    SCREEN-INPUT = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.

    Regards,

    Ferry Lianto

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 25, 2006 at 05:19 PM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 25, 2006 at 06:29 PM

    To create a pushbutton on the selection screen you use the following statement during the definition of the selection screen:

    <b>SELECTION SCREEN PUSHBUTTON [/]pos(len) push

    USER-COMMAND fcode [MODIF ID key].</b>

    REPORT demo_sel_screen_pushbutton.
    
    TABLES sscrfields.
    
    DATA flag(1) TYPE c.
    
    SELECTION-SCREEN:
      BEGIN OF SCREEN 500 AS WINDOW TITLE tit,
        BEGIN OF LINE,
          PUSHBUTTON 2(10) but1 USER-COMMAND cli1,
          PUSHBUTTON 12(10) text-020 USER-COMMAND cli2,
        END OF LINE,
        BEGIN OF LINE,
          PUSHBUTTON 2(10) but3 USER-COMMAND cli3,
          PUSHBUTTON 12(10) text-040 USER-COMMAND cli4,
        END OF LINE,
      END OF SCREEN 500.
    
    AT SELECTION-SCREEN.
    
      CASE sscrfields.
        WHEN 'CLI1'.
          flag = '1'.
        WHEN 'CLI2'.
          flag = '2'.
        WHEN 'CLI3'.
          flag = '3'.
        WHEN 'CLI4'.
          flag = '4'.
      ENDCASE.
    
    START-OF-SELECTION.
    
      tit  = 'Four Buttons'.
      but1 = 'Button 1'.
      but3 = 'Button 3'.
    
      CALL SELECTION-SCREEN 500 STARTING AT 10 10.
    
      CASE flag.
        WHEN '1'.
          WRITE / 'Button 1 was clicked'.
        WHEN '2'.
          WRITE / 'Button 2 was clicked'.
        WHEN '3'.
          WRITE / 'Button 3 was clicked'.
        WHEN '4'.
          WRITE / 'Button 4 was clicked'.
        WHEN OTHERS.
          WRITE / 'No Button was clicked'.
      ENDCASE.
    

    See another Program also

    http://www.sap-img.com/abap/create-push-buttons-in-application-tool-bar.htm

    Regards

    Sudheer

    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.