8 Replies Latest reply: Jan 13, 2006 10:03 AM by max bianchi RSS

At selection-screen radio button change screen

Diliip Gupchup
Currently Being Moderated

Hello All,

            I am developing a single transaction for multiple reports.

There I am displaying radio buttons for each report. I want to change screen change when user selects the appropriate radio button. I have tried using at selection-output radiobutton group but it is not working. There are 2 selection-options on the selection screen which are mandatory.

Kindly suggest how to achieve this.

Points ll be awarded.......

Regards,

Dilip

  • Re: At selection-screen radio button change screen
    Vikas Madaan
    Currently Being Moderated

    Dear,

             Use AT SELECTION SCREEN ON <RADIO BUTTON>

     

    Points?

     

    Regards,

    Vikas Madaan

  • Re: At selection-screen radio button change screen
    Vikas Madaan
    Currently Being Moderated

    Dear

     

    Try this

     

    at selection-screen on radiobutton group grp1.

     

    If sscrfields-ucomm eq 'RB1'

    PERFORM EXECUTE

    ELSE.

    message 'radio 4 selected' type 'I'.

    ENDIF.

  • Re: At selection-screen radio button change screen
    Amit Mittal
    Currently Being Moderated

    Hi diliip,

     

     

    1. user-command

       at selection-screen output

       use this 2 concepts while defining radio button.s

     

    2. sample code (just copy paste)

     

    report abc.

     

     

    parameters : a  radiobutton group g1 user-command US,

                b  radiobutton group g1 .

     

     

    *----


     

    at selection-screen output.

    if a = 'X'.

     

     

    endif.

     

    if b = 'X'.

     

    endif.

     

    break-point.

     

    regards,

    amit m.

    • Re: At selection-screen radio button change screen
      Diliip Gupchup
      Currently Being Moderated

      Hello,

              I want to do following thing.

      as the two selections are mandatory & when user selects radiobutton 4 that fields should grayed out & another selection options should get displayed. Is it possible?

      Sample code pls.

       

      Selection-screen begin of block B1 with frame title text-001.

       

      select-options : S_werks1 for vbrp-werks obligatory,"Plant

                       S_erdat1 for SY-datUM obligatory."Document Date

       

       

      Selection-screen end of block B1 .

       

      Selection-screen begin of block b2 with frame title text-002.

       

      parameters : rb1 radiobutton group grp1 USER-COMMAND UK,"Sales Register

                   rb2 radiobutton group grp1,"Purchase Register

                   rb3 radiobutton group grp1,"Sales To Purchase link

                   rb4 radiobutton group grp1 ,"Stock Transfer

                   rb5 radiobutton group grp1."Purchases

       

      Selection-screen end of block b2 .

      • Re: At selection-screen radio button change screen
        Atish Sarda
        Currently Being Moderated

        HI Diliip

         

        If the parameters on the selection screen are mandatory then you can't change the layout dynamically, as AT SELECTION SCREEN OUTPUT will not be called. So fill some default value in the mandatory fields.

        On click of radibutton you can change the layout in the AT SELECTION SCREEN OUTPUT event by looping on the SCREEN table.

         

        Regards,

        Atish

      • Re: At selection-screen radio button change screen
        max bianchi
        Currently Being Moderated

        Hi

         

        try this:

         

        SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

         

        *SELECT-OPTIONS : s_werks1 FOR vbrp-werks OBLIGATORY MODIF ID aaa,"Plant

        •                 s_erdat1 FOR sy-datum OBLIGATORY   MODIF ID aaa.

        SELECT-OPTIONS : s_werks1 FOR vbrp-werks MODIF ID aaa,"Plant

                         s_erdat1 FOR sy-datum   MODIF ID aaa.

        "Document Date

        SELECT-OPTIONS : s_vbeln  FOR vbrp-vbeln MODIF ID bbb.

         

        SELECTION-SCREEN END OF BLOCK b1 .

         

        SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

         

        PARAMETERS : rb1 RADIOBUTTON GROUP grp1 USER-COMMAND uk,"Sales Register

        rb2 RADIOBUTTON GROUP grp1,"Purchase Register

        rb3 RADIOBUTTON GROUP grp1,"Sales To Purchase link

        rb4 RADIOBUTTON GROUP grp1 ,"Stock Transfer

        rb5 RADIOBUTTON GROUP grp1."Purchases

         

        SELECTION-SCREEN END OF BLOCK b2 .

         

        AT SELECTION-SCREEN OUTPUT.

         

          LOOP AT SCREEN.

            IF rb4 = 'X'.

              IF screen-group1 = 'AAA'.

        • If you want to disable input field

                screen-input = 0.

        • if you want to hide input field

                screen-active = 0.

                MODIFY SCREEN.

              ENDIF.

            ELSE.

              IF screen-group1 = 'BBB'.

        • If you want to disable input field

                screen-input = 0.

        • if you want to hide input field

                screen-active = 0.

                MODIFY SCREEN..

              ENDIF.

            ENDIF.

          ENDLOOP.

         

        AT SELECTION-SCREEN.

          IF rb4 = ' '.

            IF s_werks1[] IS INITIAL.

        • message error

            ENDIF.

            IF s_erdat1[] IS INITIAL.

        • message error

            ENDIF.

          ENDIF.

         

        Max

  • Re: At selection-screen radio button change screen
    Amit Mittal
    Currently Being Moderated

    Hi Diliip,

     

     

    1. use two selection-screen concept.

     

    2. see this code (just copy paste)

     

      if we selection radio button b,

       new screen comes.

     

    3.

     

    REPORT abc.

     

     

     

    SELECTION-SCREEN BEGIN OF SCREEN 1500.

     

     

    PARAMETERS : defscr TYPE c.

     

     

    PARAMETERS : a RADIOBUTTON GROUP g1 USER-COMMAND u,

                b RADIOBUTTON GROUP g1.

     

     

    SELECTION-SCREEN END OF SCREEN 1500.

     

    SELECTION-SCREEN BEGIN OF SCREEN 2000.

     

    PARAMETERS : c TYPE c.

     

     

    SELECTION-SCREEN END OF SCREEN 2000.

     

    *----


    INITIALIZATION.

      CALL SELECTION-SCREEN 1500.

     

    *----


     

    AT SELECTION-SCREEN OUTPUT.

     

      IF b = 'X' and sy-dynnr  = 1500.

        call selection-screen 2000.

      ENDIF.

     

     

     

     

    regards,

    amit m.

Actions