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

Push button in the selection screen

Hi folks,

I need to display a push button the selection screen.its not on the application tool bar..but in one of the selection block in the selection screen..could anybody guide how to do this...

Thanks in advance,

shyam.

Edited by: shyam prasad on Jan 15, 2009 7:34 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Jan 15, 2009 at 06:37 AM

    Hi Shyam,

    Try the following code..

    TABLES sscrfields.

    TYPE-POOLS icon.

    *SELECTION-SCREEN:

    BEGIN OF SCREEN 500 AS WINDOW TITLE title,

    PUSHBUTTON 2(10) but1 USER-COMMAND cli1,

    PUSHBUTTON 28(30) but2 USER-COMMAND cli2

    VISIBLE LENGTH 10.

    END OF SCREEN 500.

    AT SELECTION-SCREEN.

    CASE sscrfields.

    WHEN 'CLI1'.

    ...

    WHEN 'CLI2'.

    ...

    ENDCASE.

    START-OF-SELECTION.

    title = 'Push button'.

    but1 = 'Button 1'.

    CALL FUNCTION 'ICON_CREATE'

    EXPORTING

    name = icon_information

    text = 'Button 2'

    info = 'My Quickinfo'

    IMPORTING

    RESULT = but2

    • EXCEPTIONS

    • OTHERS = 0.

    Hope it will be useful..

    Regards,

    Lakshman.

    Edited by: Lakshman N on Jan 15, 2009 7:39 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 06:37 AM

    Try this

    SELECTION-SCREEN BEGIN OF SCREEN 1111.

    SELECTION-SCREEN BEGIN OF BLOCK BL1.

    SELECT-OPTIONS SEL0 FOR SY-REPID.

    PARAMETERS PAR0.

    SELECTION-SCREEN END OF BLOCK BL1.

    SELECT-OPTIONS SEL1 FOR SY-REPID.

    PARAMETERS PAR1.

    SELECTION-SCREEN PUSHBUTTON /10(30) PUBU USER-COMMAND US03.

    SELECTION-SCREEN END OF SCREEN 1111.

    Hope this helps...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 06:41 AM

    Detailed documentation with examples are available in SAP help.

    Write Selection-screen in your ABAP editer and press F1 and look for Selection-screen Pushbutton.

    Murthy.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 06:53 AM

    Hi Shyam,

    Please try to search SDN before posting for basic questions, Anyways for bush button on selection screen do it this way:

    SELECTION-SCREEN:
      BEGIN OF BLOCK B1 WITH FRAME TITLE text-000,
        PUSHBUTTON 2(10)   but1 USER-COMMAND cli1,
        PUSHBUTTON 20(10) but2 USER-COMMAND cli2,
      END OF BLOCK B1.
    
    INITIALIZATION.
      but1 = 'BUTTON1'.
      but2 = 'BUTTON2'.
    
    AT SELECTION-SCREEN.
      CASE SY-UCOMM.
        WHEN 'CLI1'.
          MESSAGE 'You have clicked button1' type 'I'.
        WHEN 'CLI2'.
          MESSAGE 'You have clicked button2' type 'I'.
      ENDCASE.

    With luck,

    Pritam.

    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.