Skip to Content
avatar image
Former Member

Visibility of Selection option field according to Radio button

Hi All,

I have 2 redio button (Say Red_ 1 And Red_2 of same group) And a selection option field (Say Sel_op) on a report output screen.

Redio button Red_1 is bydefault CHECKED.

I want that if user check another redio button Red_2 then selection option field Sel_op should hide.

I hope query is clear......

Plz send me code.

Thanks & Regards,

Amit

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Oct 16, 2008 at 07:31 AM

    Hello,

    At selection screen.

    if rad2 = 'X'.

    Loop at screen.

    if screen-name = 'your select option name.

    screen-active = 0.

    screen-invisible = 1.

    endif.

    endloop.

    regards,

    Sandeep

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2008 at 07:32 AM

    Hi..

    you create as

    SELECT-OPTIONS:ss for <field> modif id 'UUU'.

    if radio2 = 'X'.

    loop at screen.

    if screen-group1 = 'UUU'.

    screen-active = '0'.

    modify screen.

    endif.

    endloop.

    endif.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2008 at 07:32 AM

    hi,

    in loop at screen event we can do this or in at selection screen we do this ... in that we have to use parameters like visble as 0 or 1 if its is 0 then it will hide that if its is 1 it will appear.

    try it...

    im not sure

    santhosh

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 16, 2008 at 07:37 AM

    hi Amit,

    TABLES: kna1.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
    PARAMETERS   :  red_1 RADIOBUTTON GROUP rad DEFAULT 'X' USER-COMMAND comm,
                    red_2 RADIOBUTTON GROUP rad.
    SELECT-OPTIONS: s_cust FOR kna1-kunnr.
    SELECTION-SCREEN END OF BLOCK blk2.
    
    AT SELECTION-SCREEN OUTPUT.
    
      IF red_1 = 'X'.
        LOOP AT SCREEN.
          IF screen-name = 'S_CUST-LOW' OR screen-name = 'S_CUST-HIGH'.
            screen-input = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSEIF red_2 = 'X'.
        LOOP AT SCREEN.
          IF screen-name = 'S_CUST-LOW' OR screen-name = 'S_CUST-HIGH'.
            screen-input = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.

    Thanks & Regards

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2008 at 07:44 AM

    Hi amit

    1st you have to set a modid id for that and then loop the Screen and set the screen-active 0 or 1 according to user requirement..

    Check the simply code

    REPORT ZTARAK_REPORT_COM_ASSIN1 .

    TABLES: ZTARAK_PO,ZTARAK_PGI,ZTARAK_BATCH.

    DATA: BEGIN OF ITAB_PO OCCURS 0,

    EBELN LIKE ZTARAK_PO-EBELN,

    EBELP LIKE ZTARAK_PO-EBELP,

    AEDAT LIKE ZTARAK_PO-AEDAT,

    LIFNR LIKE ZTARAK_PO-LIFNR,

    RESWK LIKE ZTARAK_PO-RESWK,

    MATNR LIKE ZTARAK_PO-MATNR,

    WERKS LIKE ZTARAK_PO-WERKS,

    LGORT LIKE ZTARAK_PO-LGORT,

    MATKL LIKE ZTARAK_PO-MATKL,

    MENGE LIKE ZTARAK_PO-MENGE,

    MEINS LIKE ZTARAK_PO-MEINS,

    ELIKZ LIKE ZTARAK_PO-ELIKZ,

    PSTYP LIKE ZTARAK_PO-PSTYP,

    CHARG LIKE ZTARAK_PO-CHARG,

    END OF ITAB_PO.

    DATA: BEGIN OF ITAB_BAT OCCURS 0,

    CHARG LIKE ZTARAK_BATCH-CHARG,

    MENGE LIKE ZTARAK_BATCH-MENGE,

    END OF ITAB_BAT.

    DATA: V_FLAGE LIKE ZTARAK_PGI-MENGE.

    DATA: V_FLAGE1 LIKE ZTARAK_PGI-MENGE.

    DATA: BEGIN OF ITAB_PGI OCCURS 0,

    MBLNR LIKE ZTARAK_PGI-MBLNR,

    MJAHR LIKE ZTARAK_PGI-MJAHR,

    EBELN LIKE ZTARAK_PGI-EBELN,

    EBELP LIKE ZTARAK_PGI-EBELP,

    BWART LIKE ZTARAK_PGI-BWART,

    MENGE LIKE ZTARAK_PGI-MENGE,

    MEINS LIKE ZTARAK_PGI-MEINS,

    WERKS LIKE ZTARAK_PGI-WERKS,

    CHARG LIKE ZTARAK_PGI-CHARG,

    MENGEP LIKE ZTARAK_PGI-MENGE,

    MENGEB LIKE ZTARAK_PGI-MENGE,

    REM_PO LIKE ZTARAK_PGI-MENGE,

    REM_BAT LIKE ZTARAK_PGI-MENGE,

    END OF ITAB_PGI.

    DATA: V1 TYPE STRING.

    SELECTION-SCREEN: BEGIN OF BLOCK B0 WITH FRAME TITLE TEXT-001.

    PARAMETERS : RB1 RADIOBUTTON GROUP GP1 DEFAULT 'X' USER-COMMAND ABC,

    RB2 RADIOBUTTON GROUP GP1,

    RB3 RADIOBUTTON GROUP GP1,

    RB4 RADIOBUTTON GROUP GP1.

    SELECTION-SCREEN END OF BLOCK B0.

    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-002.

    PARAMETERS : P_EBELN LIKE ZTARAK_PO-EBELN MODIF ID B1.

    SELECTION-SCREEN END OF BLOCK B1.

    SELECTION-SCREEN: BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-003.

    PARAMETERS :P1_EBELN LIKE ZTARAK_PO-EBELN MODIF ID B2,

    P1_EBELP LIKE ZTARAK_PO-EBELP MODIF ID B2.

    SELECTION-SCREEN END OF BLOCK B2.

    SELECTION-SCREEN: BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-001.

    PARAMETERS : P_MBLNR LIKE ZTARAK_PGI-MBLNR MODIF ID B3 .

    SELECTION-SCREEN END OF BLOCK B3.

    SELECTION-SCREEN: BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-001.

    PARAMETERS :P2_EBELN LIKE ZTARAK_PO-EBELN MODIF ID B4,

    P2_EBELP LIKE ZTARAK_PO-EBELP MODIF ID B4,

    P_CHARG LIKE ZTARAK_PO-CHARG MODIF ID B4.

    SELECTION-SCREEN END OF BLOCK B4.

    INITIALIZATION.

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN .

    IF RB1 = 'X' .

    IF SCREEN-GROUP1 = 'B1'.

    SCREEN-ACTIVE = 1 .

    ELSEIF SCREEN-GROUP1 = 'B2' OR

    SCREEN-GROUP1 = 'B3' OR

    SCREEN-GROUP1 = 'B4'.

    SCREEN-ACTIVE = 0.

    MODIFY SCREEN.

    ENDIF.

    ENDIF.

    IF RB2 = 'X' .

    IF SCREEN-GROUP1 = 'B2'.

    SCREEN-ACTIVE = 1 .

    ELSEIF SCREEN-GROUP1 = 'B1' OR

    SCREEN-GROUP1 = 'B3' OR

    SCREEN-GROUP1 = 'B4'.

    SCREEN-ACTIVE = 0.

    MODIFY SCREEN.

    ENDIF.

    ENDIF.

    IF RB3 = 'X' .

    IF SCREEN-GROUP1 = 'B3'.

    SCREEN-ACTIVE = 1 .

    ELSEIF SCREEN-GROUP1 = 'B2' OR

    SCREEN-GROUP1 = 'B1' OR

    SCREEN-GROUP1 = 'B4'.

    SCREEN-ACTIVE = 0.

    MODIFY SCREEN.

    ENDIF.

    ENDIF.

    IF RB4 = 'X' .

    IF SCREEN-GROUP1 = 'B4'.

    SCREEN-ACTIVE = 1 .

    ELSEIF SCREEN-GROUP1 = 'B1' OR

    SCREEN-GROUP1 = 'B2' OR

    SCREEN-GROUP1 = 'B3'.

    SCREEN-ACTIVE = 0.

    MODIFY SCREEN.

    ENDIF.

    ENDIF.

    ENDLOOP.

    Add comment
    10|10000 characters needed characters exceeded