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

Disable Radiobutton

Former Member
0 Likes
630

Hi,

I have this in my selection-screen:

SELECTION-SCREEN BEGIN OF BLOCK bloq4 WITH FRAME TITLE text-004.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(31) text-c01.

PARAMETERS: p_mature TYPE c AS CHECKBOX USER-COMMAND ucom.

SELECTION-SCREEN END OF LINE.

PARAMETERS: rb_yes RADIOBUTTON GROUP rad3

USER-COMMAND ucom DEFAULT 'X' MODIF ID ABC,

rb_no RADIOBUTTON GROUP rad3 MODIF ID ABC.

SELECTION-SCREEN END OF BLOCK bloq4.

If the checkbox is unchecked, the radiobutton should not be accessible for input, or if they can be hide, better.

How can I achieve this?

Thanks,

Jim

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
600

hi jim,

try this...

at selection-screen output.

if p_mature is initial.

loop at screen.

if screen-group1 = 'ABC'.

SCREEN-INVISIBLE = '1'.

SCREEN-INPUT = '0'.

modify screen.

endif.

endloop.

endif.

do reward if it helps,

priya.

5 REPLIES 5
Read only

Former Member
0 Likes
600

U have to use AT SELECTION-SCREEN ON OUTPUT

and modify the SCREEN table

Read only

Former Member
0 Likes
600

Hi,

see the sample code for modification and write accordingly

T SELECTION-SCREEN OUTPUT.

IF p_up = 'X' .

LOOP AT SCREEN.

CASE screen-group1.

WHEN 'CCC'.

screen-input = 1. "Enable

screen-invisible = 0. "Disable

MODIFY SCREEN.

WHEN 'DDD'.

screen-input = 0.

screen-invisible = 1.

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

ENDIF.

IF p_list = 'X'.

LOOP AT SCREEN.

CASE screen-group1.

WHEN 'CCC'.

screen-input = 0.

screen-invisible = 1.

MODIFY SCREEN.

WHEN 'DDD'.

screen-input = 1.

screen-invisible = 0.

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

ENDIF.

reward if useful

regards,

Anji

Read only

Former Member
0 Likes
600

Use the AT SELECTION-SCREEN OUTPUT event and write the code. But before doing this, assign user command to the checkbox and handle logic based on SY-UCOMM

Read only

Former Member
0 Likes
601

hi jim,

try this...

at selection-screen output.

if p_mature is initial.

loop at screen.

if screen-group1 = 'ABC'.

SCREEN-INVISIBLE = '1'.

SCREEN-INPUT = '0'.

modify screen.

endif.

endloop.

endif.

do reward if it helps,

priya.

Read only

Former Member
0 Likes
600

hi

good

you can take a flag as x and as per your checking the checkbox you can set the radio button as on or off.

thanks

mrutyun^