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

radiobutton

there is 2 input parameters n two radiobuttons on the selection screen when click on ist radiobutton then 2nd parameter is not appear on the selection screen and if i click on 2nd radiobutton then ist parameter is not appear on screen….how?……plz fwrd at my mail id if anbodt got the solutions

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 02:53 AM

    Try this out,

    Sample:

    SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-000.

    SELECT-OPTIONS: s_sapobj FOR toa01-sap_object obligatory,

    s_blart FOR bkpf-blart obligatory.

    PARAMETERS: rb_img RADIOBUTTON GROUP rad1 user-command rad.

    PARAMETERS: rb_invo RADIOBUTTON GROUP rad1.

    SELECTION-SCREEN END OF BLOCK b_1.

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

    PARAMETERS: p_from like bkpf-bldat modif id gr2,

    p_to like bkpf-bldat modif id gr2.

    SELECT-OPTIONS: s_arobj FOR toa01-ar_object modif id gr2.

    SELECTION-SCREEN END OF BLOCK b_2.

    So u can validate as

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN.

    IF SCREEN-GROUP1 = 'GR1'. "Name field

    IF RB_INVO = SPACE.

    SCREEN-ACTIVE = 0.

    ELSE.

    SCREEN-ACTIVE = 1.

    ENDIF.

    MODIFY SCREEN.

    ELSEIF SCREEN-GROUP1 = 'GR2'.

    IF RB_INVO = C_X.

    SCREEN-ACTIVE = 0.

    ELSE.

    SCREEN-ACTIVE = 1.

    ENDIF.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    START-OF-SELECTION.

    • Two processing modes available based on radiobutton selection.

    *Radiobutton 1 selected

    IF NOT RB_IMG IS INITIAL.

    PERFORM

    ENDIF.

    *Radiobutton 2 selected

    IF NOT RB_INVO IS INITIAL.

    PERFORM .

    ENDIF.

    Similiarly u can do.

    I have given the same answer in this forum.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 04:07 AM

    Find the following code. this code may suit your requirement.

    PARAMETERS:

    R1 RADIOBUTTON GROUP G1 USER_COMMAND U1,

    R2 RADIOBUTTON GROUP G1 DEFAULT 'X',

    P_VAR2 TYPE I MODIFID SC1,

    P_VAR3 TYPE I MODIFID SC2.

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN.

    IF R1 ='X'.

    IF SCREEN-GROUP = 'SC1'.

    SCREEN-ACTIVE = 1.

    MODIFY SCREEN.

    ELSEIF SCREEN-GROUP = 'SC2'.

    SCREEN-ACTIVE = 0.

    MODIFY SCREEN.

    ENDIF.

    ELSEIF R2 ='X'.

    IF SCREEN-GROUP = 'SC1'.

    SCREEN-ACTIVE = 0.

    MODIFY SCREEN.

    ELSEIF SCREEN-GROUP = 'SC2'.

    SCREEN-ACTIVE = 1.

    MODIFY SCREEN.

    ENDIF.

    ENDIF.

    ENDLOOP.

    Rewards if useful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 04:19 AM

    Hi,

    see this code.

    tables:sscrfields.

    PARAMETERS:field_1 RADIOBUTTON GROUP rad1 USER-COMMAND RAD DEFAULT 'X',

    field_2 RADIOBUTTON GROUP rad1.

    PARAMETERS:field1(10).

    PARAMETERS:field2(10).

    AT SELECTION-SCREEN OUTPUT.

    perform modif.

    at SELECTION-SCREEN.

    case sscrfields-ucomm.

    when 'RAD'.

    perform modif.

    ENDCASE.

    FORM modif .

    if field_1 = 'X'.

    LOOP AT SCREEN.

    if screen-name = 'FIELD1' OR SCREEN-NAME = '%_FIELD1_%_APP_%-TEXT'.

    screen-ACTIVE = 1.

    MODIFY SCREEN.

    ELSEIF screen-name = 'FIELD2' OR SCREEN-NAME = '%_FIELD2_%_APP_%-TEXT'.

    screen-ACTIVE = 0.

    MODIFY SCREEN.

    endif.

    ENDLOOP.

    elseif FIELD_2 = 'X'.

    LOOP AT SCREEN.

    if screen-name = 'FIELD2' OR SCREEN-NAME = '%_FIELD2_%_APP_%-TEXT'.

    screen-ACTIVE = 1.

    MODIFY SCREEN.

    ELSEIF screen-name = 'FIELD1' OR SCREEN-NAME = '%_FIELD1_%_APP_%-TEXT'.

    screen-ACTIVE = 0.

    MODIFY SCREEN.

    endif.

    ENDLOOP.

    endif.

    ENDFORM. " modif

    rgds,

    bharat.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 05:00 AM

    u can hve look at this..

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 05:03 AM

    Hi

    same requirment , check one radibutton and click on enter button the changes will be applied

    REPORT  ZNNR_REPORT NO STANDARD PAGE HEADING MESSAGE-ID ZNNR LINE-SIZE 100 LINE-COUNT 65(4).
    
    *******DATA DECLARATIONS***********
    DATA : BEGIN OF IT_PLANT OCCURS 0,
            MATNR LIKE MARA-MATNR,
            WERKS LIKE MARC-WERKS,
            PSTAT LIKE MARC-PSTAT,
            EKGRP LIKE MARC-EKGRP,
           END OF IT_PLANT.
    
    DATA : BEGIN OF IT_PONO OCCURS 0,
            EBELN LIKE EKKO-EBELN,
            EBELP LIKE EKPO-EBELP,
            MATNR LIKE EKPO-MATNR,
            WERKS LIKE EKPO-WERKS,
            LGORT LIKE EKPO-LGORT,
           END OF IT_PONO.
    
    TABLES EKKO.
    *********END OF DATA DECLARATIONS**********
    
    ********SELECTION SCREEN DESIGN ***********
    
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    
    PARAMETER : P_WERKS LIKE MARC-WERKS MODIF ID S1.
    SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS MODIF ID S2.
    
    SELECTION-SCREEN END OF BLOCK B1.
    
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-004.
    
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : R1 RADIOBUTTON GROUP G1 DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 5(20) TEXT-002 FOR FIELD R1.
    SELECTION-SCREEN END OF LINE.
    
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : R2 RADIOBUTTON GROUP G1.
    SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R2.
    SELECTION-SCREEN END OF LINE.
    
    SELECTION-SCREEN END OF BLOCK B2.
    
    
    *******END OF SELECTION SCREEN DESIGN*****************
    
    **********INITIALIZATION OF SELECTION SCREEN ELEMENTS.******
    
    INITIALIZATION.
    
    P_WERKS = '1000'.
    
    S_EBELN-LOW = '4500016926'.
    S_EBELN-OPTION = 'EQ'.
    S_EBELN-SIGN = 'I'.
    APPEND S_EBELN.
    CLEAR S_EBELN.
    
    *************END OF INITIALIZATION************************
    
    ************SCREEN MODIFICATIONS********************
    
    AT SELECTION-SCREEN OUTPUT.
    
      LOOP AT SCREEN.
    
        IF R1 EQ 'X' AND SCREEN-GROUP1 EQ 'S2'.
          SCREEN-INPUT = 0.
          MODIFY SCREEN.
        ENDIF.
    
        IF R2 EQ 'X' AND SCREEN-GROUP1 EQ 'S1'.
          SCREEN-INPUT = 0.
          MODIFY SCREEN.
        ENDIF.
    
      ENDLOOP.
    
    
    
    *********END OF SCREEN MODIFICATIONS******************
    
    ***************SCREEN VALIDATIONS *****************
    at selection-screen.
      SELECT SINGLE *
               FROM EKKO
               INTO EKKO
               WHERE EBELN IN S_EBELN.
    
      IF SY-SUBRC <> 0.
        SET CURSOR FIELD 'S_EBELN-LOW'.
        MESSAGE E999 WITH TEXT-005.
      ENDIF.
    *********end of screen validation******************
    
    START-OF-SELECTION.
    *set pf-status '100'.
      IF R1 EQ 'X'.
    
        SELECT MATNR
               WERKS
               PSTAT
               EKGRP
           FROM MARC
           INTO TABLE IT_PLANT
           WHERE WERKS = P_WERKS.
    
        LOOP AT IT_PLANT.
    
    
          WRITE : SY-VLINE , 2 IT_PLANT-MATNR COLOR COL_KEY,
                 21 SY-VLINE , 22  IT_PLANT-WERKS COLOR COL_KEY,
                 27 SY-VLINE ,28 IT_PLANT-PSTAT COLOR COL_NORMAL,
                 43 SY-VLINE ,44 IT_PLANT-EKGRP COLOR COL_NORMAL.
    
    
        ENDLOOP.
    
      ENDIF.
    
      IF R2 EQ 'X'.
    
        SELECT EBELN EBELP MATNR WERKS LGORT
               FROM EKPO
               INTO TABLE IT_PONO
               WHERE EBELN IN S_EBELN.
    
        LOOP AT IT_PONO.
    
          WRITE : SY-VLINE , 2 IT_PONO-EBELN COLOR COL_KEY,
                 12 SY-VLINE , 13 IT_PONO-EBELP COLOR COL_KEY,
                 18 SY-VLINE , 19 IT_PONO-MATNR COLOR COL_NORMAL,
                 37 SY-VLINE , 38 IT_PONO-WERKS COLOR COL_NORMAL,
                 44 SY-VLINE , 45 IT_PONO-LGORT COLOR COL_NORMAL, 49 SY-VLINE..
        ENDLOOP.
      ENDIF.
    
    TOP-OF-PAGE.
    
      IF R1 EQ 'X'.
    
    *ULINE AT /1(48).
    
        WRITE : SY-VLINE ,2 'MATERIAL NUMBER',
                21 SY-VLINE , 22 'PLANT',
                27 SY-VLINE , 28 'STATUS',
                43 SY-VLINE , 44 'GRUP', 48 SY-VLINE.
    
        ULINE AT /1(48).
    
      ENDIF.
    
      IF R2 EQ 'X'.
    
        WRITE : SY-VLINE , 2 'PO NUMBER',
               12 SY-VLINE, 13 'ITEM',
               18 SY-VLINE,19 'MATERIAL NUMBER',
               37 SY-VLINE, 38 'PLANT',
               44 SY-VLINE, 45 'GRUP',
               49 SY-VLINE.
        ULINE AT /1(50).
      ENDIF.
    
    END-OF-PAGE.
    
      ULINE AT /1(50).
      WRITE :/10 'PAGE NUMBER', SY-PAGNO.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 30, 2007 at 05:04 AM

    Hi,

    Refer this code

    ----


    • PARAMETERS & SELECT-OPTIONS *

    ----


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

    PARAMETERS : p_pay1 RADIOBUTTON GROUP grp USER-COMMAND fc DEFAULT 'X',

    p_pay2 RADIOBUTTON GROUP grp.

    SELECTION-SCREEN END OF BLOCK b1.

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

    SELECT-OPTIONS : s_pernr FOR pa0000-pernr. "Personnel Number

    SELECTION-SCREEN BEGIN OF LINE.

    SELECTION-SCREEN COMMENT (31) text-018.

    PARAMETERS : p_begda LIKE pa0000-begda OBLIGATORY. "Start Date

    SELECTION-SCREEN COMMENT 52(05) text-019.

    PARAMETERS : p_endda LIKE pa0000-endda OBLIGATORY. "End Date

    SELECTION-SCREEN END OF LINE.

    SELECT-OPTIONS : s_stat2 FOR pa0000-stat2, "Status

    s_werks FOR pa0001-werks, "Personnel Area

    s_raufnr FOR catsdb-raufnr MODIF ID md1. "Internal Order Number

    SELECTION-SCREEN END OF BLOCK b2.

    ----


    • AT SELECTION-SCREEN *

    ----


    AT SELECTION-SCREEN OUTPUT.

    IF p_pay1 EQ 'X'.

    LOOP AT SCREEN.

    IF screen-group1 = 'MD1'.

    screen-active = '1'.

    screen-input = '0'.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    ELSEIF p_pay2 EQ 'X'.

    LOOP AT SCREEN.

    IF screen-group1 = 'MD1'.

    screen-active = '1'.

    screen-input = '1'.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    ENDIF.

    Regards,

    Prashant

    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.