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: 
Read only

selection sc

Former Member
0 Likes
1,167

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

11 REPLIES 11
Read only

Former Member
0 Likes
1,104

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.

Read only

Former Member
0 Likes
1,104

Hi Anurag,

Refer the following link:

Regards,

Nitin.

Read only

Former Member
0 Likes
1,104

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.

Read only

Former Member
0 Likes
1,104

Hi;

At selection screen output, just set its screen-active is equal to 0 and then modify the screen.

Regards

Shashi

Read only

Former Member
0 Likes
1,104

Hi,

Please search in the forum.

Thanks,

Sriram POnna.

Read only

Former Member
0 Likes
1,104

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.

Read only

Former Member
0 Likes
1,104

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.

Read only

Former Member
0 Likes
1,104

Hi ,

You can do it in AT SELECTION-SCREEN OUTPUT event looping the table Screen .

Regards

Pinaki

Read only

Former Member
0 Likes
1,104

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

Read only

Former Member
0 Likes
1,104

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

Read only

Former Member
0 Likes
1,104

Hi Anurag,

Try using it with LOOP AT SCREEN Statement.

Regrds

Mansi