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

DISABLING A RADIO BUTTON

Former Member
0 Likes
1,191

Supose if I have two radio button groups, one with two radio buttons with names RB1 and RB2 with function code R1 and the other group contains three radio buttons with names RB3, RB4 and RB5 with fuction code R2. Now only when I click RB2 of first radio button group the other radio button group should be disabled ( ie radio buttons RB3, RB4 and RB5 must not accept any input)?

Thanks.

Sara.

Supose if I have two radio button groups, one with two radio buttons with names RB1 and RB2 with function code R1 and the other group contains three radio buttons with names RB3, RB4 and RB5 with fuction code R2. Now only when I click RB2 of first radio button group the other radio button group should be disabled ( ie radio buttons RB3, RB4 and RB5 must not accept any input)?

Thanks.

Sara.

9 REPLIES 9
Read only

Former Member
0 Likes
1,112

Hi Sara,

Try this..

TABLES: SSCRFIELDS.

PARAMETERS: RB1 RADIOBUTTON GROUP G1 USER-COMMAND UCOMM,

RB2 RADIOBUTTON GROUP G1.

PARAMETER: P_DUMMY TYPE XFELD.

PARAMETERS: RB3 RADIOBUTTON GROUP G2 MODIF ID G2,

RB4 RADIOBUTTON GROUP G2 MODIF ID G2,

RB5 RADIOBUTTON GROUP G2 MODIF ID G2.

AT SELECTION-SCREEN OUTPUT.

IF NOT RB2 IS INITIAL.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'G2'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Thanks,

Naren

Read only

0 Likes
1,112

THANKS NAREN, I WILL TRY.

Read only

Former Member
0 Likes
1,112

Please let me know if it works..

Thanks,

Naren

Read only

0 Likes
1,112

hello Naren,

what you using in the above code, if you do not mind would you explain about

PARAMETERS: RB1 RADIOBUTTON GROUP G1 USER-COMMAND UCOMM,

RB2 RADIOBUTTON GROUP G1.

PARAMETER: P_DUMMY TYPE XFELD.

PARAMETERS: RB3 RADIOBUTTON GROUP G2 MODIF ID G2,

RB4 RADIOBUTTON GROUP G2 MODIF ID G2,

RB5 RADIOBUTTON GROUP G2 MODIF ID G2.

THANKS.

Sara.

Read only

Former Member
0 Likes
1,112

Hi Sara,

I am giving the user-command for the radio button RB1 for triggering the event AT SELECTION-SCREEN OUTPUT event when the button RB1 or RB2 is pressed.

TABLES: SSCRFIELDS.

PARAMETERS: RB1 RADIOBUTTON GROUP G1 USER-COMMAND UCOMM,

RB2 RADIOBUTTON GROUP G1.

PARAMETER: P_DUMMY TYPE XFELD.

PARAMETERS: RB3 RADIOBUTTON GROUP G2 MODIF ID G2,

RB4 RADIOBUTTON GROUP G2 MODIF ID G2,

RB5 RADIOBUTTON GROUP G2 MODIF ID G2.

LOOP AT SCREEN.

<b> IF SCREEN-GROUP1 = 'G2'.</b>

ENDLOOP.

For the second set of radio buttons I am grouping together using the MODIF ID addition..It will useful when I want to disable the second sets of radio buttons..Otherwise I have to give all the parameters involved in the radio button group G2..

Hope this explains clearly for you..Let me know if you have any questions..

Thanks,

Naren

Read only

0 Likes
1,112

Thanks Naren.

I have a question why you used TABLES: SSCRFIELDS and PARAMETER: P_DUMMY TYPE XFELD.?

Pleae do not mind I am new to ABAP.

Sara.

Read only

Former Member
0 Likes
1,112

I just used P_DUMMY just to separate the one set of radio buttons and second set of radio buttons..You can ignore the parameter...

And regarding SSCRFIELDS..you can use if you want to check the user command...You can remove that one also...

Sorry if it had confused you..

THanks,

Naren

Read only

0 Likes
1,112

Thanks Naren. I appreciate your helping nature.

Read only

Former Member
0 Likes
1,112

Please close the thread if you have got the answers..

Thanks

Naren