‎2009 Feb 12 6:47 AM
hi
in my selection screen 2 radio buttion and 3 fields are there if i click second raddio button i want third fielsd shoud disable .can you give me the code for that
‎2009 Feb 12 6:49 AM
Hi,
at selection-screen output.
if p_rad2 eq 'X'.
loop at screen.
if screen-name CS 'W_FIELD3'.
screen-active = 0.
modify screen.
endif.
endloop.
endif.
‎2009 Feb 12 6:50 AM
‎2009 Feb 12 6:51 AM
IF rb_bt2 = 'X'.
LOOP AT SCREEN.
IF ( screen-name = 3rd field). " field u need to disable
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
‎2009 Feb 12 6:51 AM
Hi;
At selection screen output, just set its screen-active is equal to 0 and then modify the screen.
Regards
Shashi
‎2009 Feb 12 6:52 AM
‎2009 Feb 12 6:52 AM
Hi,
Check this code, it serves the same as ur requirement,
TABLES : mara,marc.
*******************************************************************************************
************************Selection screen fields******************************************
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : p_meth1 RADIOBUTTON GROUP g1 USER-COMMAND g1,
p_meth2 RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK matnr
WITH FRAME TITLE text-002.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS : so_matnr FOR marc-matnr MODIF ID m1.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS : so_werks FOR marc-werks MODIF ID m1 .
SELECTION-SCREEN END OF BLOCK matnr.
SELECTION-SCREEN BEGIN OF BLOCK file WITH FRAME TITLE text-003.
SELECTION-SCREEN SKIP 1.
PARAMETERS: p_fpath TYPE ibipparms-path MODIF ID m2 LOWER CASE.
SELECTION-SCREEN END OF BLOCK file.
SELECTION-SCREEN BEGIN OF BLOCK date WITH FRAME TITLE text-004.
SELECTION-SCREEN SKIP 1.
PARAMETERS : p_date TYPE datuv. "CCT51576.
SELECTION-SCREEN END OF BLOCK date.
***************************************************************************************
***********************Screen Validation*********************************************
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CASE screen-group1.
WHEN 'M1'.
IF p_meth1 <> 'X'.
screen-active = 1.
ENDIF.
IF p_meth2 = 'X'.
screen-active = 0.
ENDIF.
WHEN 'M2'.
IF p_meth2 = 'X'.
screen-active = 1.
ELSE.
screen-active = 0.
ENDIF.
IF p_meth1 = 'X'.
screen-active = 0.
ENDIF.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
‎2009 Feb 12 6:52 AM
Example:
at selection screen output.
loop at screen.
if Radio1 = 'X' and screen-name = 'FIELD1'.
screen-invisible = 1.
screen-active = 0.
elseif radio2 = 'X' AND SCREEN-NAME = 'FIELD2'.
screen-invisible = 0.
screen-active = 1.
endif.
modify screen.
endloop.
‎2009 Feb 12 6:52 AM
Hi ,
You can do it in AT SELECTION-SCREEN OUTPUT event looping the table Screen .
Regards
Pinaki
‎2009 Feb 12 6:53 AM
Selection-screen begin of block b1.
Parameters:
Field1 modifid aa,
Field2 modifid ab,
Field3 modifid ac.
Selection-screen End of block b1 .
Parameters: R1 radiobutton group rd1 default 'X' user-command ucomm,
R2 radiobutton group rd1.
at selection-screen output.
Loop at screen.
If R2 = 'X'.
If Screen-group1 = 'AB'.
Screen-active = 0.
endif.
endif.
modify screen.
endloop.
Regards,
Gurpreet
‎2009 Feb 12 6:54 AM
Hi,
I tried this in my system..Just copy this code it is working fine..u will get the exact result...
when u click on the second radio button it will actomatically hides the thired field i.e.p_name2..
parameters:
p_sales radiobutton group grp user-command UC default 'X',
p_order radiobutton group grp.
parameters:
p_name type sy-uname modif id g1,
p_name1 type sy-uname modif id g2,
p_name2 type sy-uname modif id g3.
at selection-screen output.
if p_sales NE 'X'.
loop at screen.
if screen-group1 CS 'G3'.
screen-active = 0.
modify screen.
endif.
endloop.
endif.
Regards
Kiran
‎2009 Feb 12 6:56 AM
Hi Anurag,
Try using it with LOOP AT SCREEN Statement.
Regrds
Mansi