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

selection screen

hi,

the requirement is that

if i select one radiobutoon some the selection fields should be invisible.

Please provide the code for that

thanks in advance

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 02:46 PM

    Hi,

    If you want to do it using Selection screen then it is possible.

    for that you have to use AT SELECTION-SCREEN output. event..

    See the below code and use it according to your requirement.

    ======================================

    tables: pa0000, pa0001.

    parameters: p_rad1 radiobutton group rad1 default 'X' user-command rusr,

    p_rad2 radiobutton group rad1.

    selection-screen: begin of block blk1 with frame.

    select-options: s_pernr for pa0000-pernr modif id ABC.

    selection-screen: end of block blk1.

    selection-screen: begin of block blk2 with frame.

    select-options: s_stat2 for pa0000-stat2 modif id DEF.

    select-options: s_werks for pa0001-werks modif id DEF.

    selection-screen: end of block blk2.

    AT SELECTION-SCREEN output.

    LOOP AT SCREEN.

    IF SCREEN-GROUP1 = 'ABC'.

    IF p_rad1 = 'X'.

    SCREEN-ACTIVE = 1.

    ELSE.

    SCREEN-ACTIVE = 0.

    ENDIF.

    MODIFY SCREEN.

    ENDIF.

    IF SCREEN-GROUP1 = 'DEF'.

    IF p_rad2 = 'X'.

    SCREEN-ACTIVE = 1.

    ELSE.

    SCREEN-ACTIVE = 0.

    ENDIF.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    =====================================

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 02:49 PM

    Hi,

    Please refer to the code below :

    TABLES : bsis.
    
    
    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETER : sp_sel radiobutton group rad USER-COMMAND radio DEFAULT 'X',
                sp_all RADIOBUTTON GROUP rad.
    SELECTION-SCREEN END OF BLOCK b1.
    
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    SELECT-OPTIONS : so_bukrs FOR bsis-bukrs MODIF ID sp1.
    SELECT-OPTIONS : so_hkont FOR bsis-hkont MODIF ID sp2.
    SELECTION-SCREEN END OF BLOCK b2.
    
    AT SELECTION-SCREEN OUTPUT.
    
    LOOP AT SCREEN.
      IF sp_sel = 'X'.
    
    
          IF screen-group1 = 'SP2'.
            screen-input = '0'.
            screen-invisible = '0'.
            screen-required = '0'.
            MODIFY SCREEN.
          ENDIF.
          else.
          IF screen-group1 = 'SP1'.
            screen-input = '0'.
            screen-invisible = '0'.
            screen-required = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
    

    Thanks,

    Sriram Ponna.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 02:51 PM
    selection-screen begin of block b1 with frame.
    parameters: alv-list radiobutton group gp1 default 'X' user-command chk,
                alv-grid radiobutton group gp1.
    selection-screen end of block b1.
    
    selection-screen begin of block b2 with frame.
    
    parameters: s_matnr type mara-matnr modif id g1.
    select-options: k_matnr for mara-matnr modif id g2.
    
    selection-screen end of block b2.
    
    *FILE PATH
    selection-screen begin of block b3 with frame title text-003.
    parameters: p_path(128) type c.
    selection-screen end of block b3.
    
    
    parameters: p_var type slis_vari.
    
    
    *---------------------------------------------------------------------*
    *                    At Selection-Screen(output)
    *---------------------------------------------------------------------*
    at selection-screen output.
    
      loop at screen.
        if alv-list = 'X' and screen-group1 = 'G1'.
          screen-active = 0.
    *screen-intensified = '1'.
          modify screen.
        endif.
        if alv-grid = 'X' and screen-group1 = 'G2'.
          screen-active = 0.
          modify screen.
        endif.
      endloop.
    

    use this code you will get your answer

    <REMOVED BY MODERATOR>

    kushagra

    Edited by: Alvaro Tejada Galindo on Jan 31, 2008 10:08 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 02:55 PM
    TABLES : marc.
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: R1 RADIOBUTTON GROUP grp USER-COMMAND rusr,
                R2 RADIOBUTTON GROUP grp DEFAULT 'X'.
    SELECTION-SCREEN: END OF BLOCK b1.
    
    SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE TEXT-002.
    SELECT-OPTIONS:s_matnr FOR marc-matnr MODIF ID mat.
    PARAMETERS : p_werks LIKE marc-werks  MODIF ID mat.
    SELECTION-SCREEN: END OF BLOCK b2.
    
    AT SELECTION-SCREEN OUTPUT.
    
      LOOP AT SCREEN.
        IF screen-group1 = 'MAT' AND R1 = 'X'.
          screen-active = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    
    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.