Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding Fields on Selection Screen by RB input

Former Member
0 Kudos
271

Hi,

I did search the forum and google, tried various codes, none worked.

I need to hide p_fifom when the user selects the precept radio button.

This is how my selection screen is layed out at the moment:

SELECTION-SCREEN BEGIN OF BLOCK main WITH FRAME.


PARAMETERS:   p_fifom TYPE v_my02-method OBLIGATORY MODIF ID fif,
                              p_plant
TYPE v_my03-myfky OBLIGATORY MATCHCODE OBJECT sh_t001w_exts.


SELECT-OPTIONS:

             s_matnr
FOR mara-matnr MATCHCODE OBJECT s_mat1.

PARAMETERS: p_fifo    RADIOBUTTON GROUP rad1 USER-COMMAND rad DEFAULT 'X',
             p_recpt  
RADIOBUTTON GROUP rad1.

SELECTION-SCREEN END OF BLOCK main.


AT SELECTION-SCREEN OUTPUT.

  
IF p_recpt = 'X'.
    
LOOP AT SCREEN.
      
IF screen-name = 'FIF'.
        
screen-active = '0'.
        
screen-input = '0'.
        
screen-output = '0'.
        
screen-invisible = '1'.
        
MODIFY SCREEN.
      
ENDIF.
    
ENDLOOP.
  
ENDIF.

PLEASE HELP!

Thank you guys,

Daniel.

2 REPLIES 2

FredericGirod
Active Contributor
0 Kudos
221

Hi Daniel,

your two radiobuttons must be link to a command.

after that you have to take the user-command event. AT USER-COMMAND ...

regards

Fred

former_member205763
Active Contributor
0 Kudos
221

Write as:

   IF p_recpt = 'X'.        Remove this
    
LOOP AT SCREEN.
      
IF screen-name = 'FIF' AND p_recpt = 'X'.
        
screen-active = '0'.
        
screen-input = '0'.
        
screen-output = '0'.
        
screen-invisible = '1'.
        
MODIFY SCREEN.
      
ENDIF.
    
ENDLOOP.
  
ENDIF.