Skip to Content

how do I create a button in a selction screen of the report ??

how do I create a button in a selction screen of the report ??

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 29, 2007 at 04:17 PM

    Hi

    To create pushbutton on the selection screen, then you need to use

    Selection-screen pushbutton...

    But if its ok with a button in the toolbar, then you need to set pf-status.

    I think you have solution for both from above posts.

    Regards,

    Navneet

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 29, 2007 at 04:01 PM

    See sample Program :

    REPORT ZLPRWINSPC_TMP .

    tables : mara,

    sscrfields.

    select-options s_matnr for mara-matnr.

    initialization.

    sscrfields-functxt_01 = 'Clear Selection'.

    selection-screen function key 1.

    AT SELECTION-SCREEN.

    case sscrfields-ucomm.

    when 'Clear Selection' or 'FC01'.

    clear s_matnr.

    refresh s_matnr.

    endcase.

    Reward Points if it is helpful

    Thanks

    Seshu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 29, 2007 at 04:01 PM

    Hello,

    Do like this:

    report zV_TEST.
     
    type-pools: icon.
     
    selection-screen pushbutton 40(20) gocfg user-command gocfg.
     
    at selection-screen .
     
      case sy-ucomm.
        when 'GOCFG'.
          call transaction 'VA01'.
      endcase.
     
    start-of-selection.
     
     
     
    at selection-screen output.
     
    * Write pushbutton text
      write icon_configuration as icon to gocfg.
      concatenate gocfg 'Go to VA01' into gocfg
                  separated by space.
     
    
    

    Regards,

    Vasanth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 29, 2007 at 04:03 PM

    Hi,

    To place a pushbutton on the selection screen, u need to define the PF-STATUS.

    PF-STATUS needs to be called in the AT SELECTION-SCREEN OUTPUT.

    e.g.

    Define the selecvtion screen.

    then write the following code :

    AT SELECTION-SCREEN OUTPUT.

    SET PF-STATUS 'ZTEST'.

    Double click on ZTEST. It will take u to the GUI Status Creation screen.

    In the application toolbar, define a pushbutton and assign a function code say 'FUNC1' to it.

    activate the GUI Status.

    Now, in ur program,

    Write the following piece of code :

    CASE SY-UCOMM.

    WHEN 'FUNC1'.

    Write the logc.

    Hope it helps.

    need ur reward points

    Regards

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 29, 2007 at 04:30 PM

    just use

    selection-screen pushbutton button1 20(30) user-command BUT1.

    to give textor the button.

    initialization.

    buttton1 = text-001.

    to handle button click by user.

    at seelction-screen.

    if sy-ucomm = 'BUT1'.

    "write the code for user action.

    endif.

    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.