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

Radiobuttons in Selection-Screen

Former Member
0 Likes
906

Hello!

I have a radiobutton group 'radi' with 7 Radiobuttons.

Now I want to check, which one was marked in AT SELECTION-SCREEN.

How can I do that?

Regards Michael

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
884

Hi

You can use CASE/ENDCASE statament:

CASE 'X'.

WHEN P_R1.

WHEN P_R2.

........

WHEN P_R7.

ENDCASE.

max

6 REPLIES 6
Read only

Former Member
0 Likes
885

Hi

You can use CASE/ENDCASE statament:

CASE 'X'.

WHEN P_R1.

WHEN P_R2.

........

WHEN P_R7.

ENDCASE.

max

Read only

Former Member
0 Likes
884

hi michael,

just execute the code

regards,

vikky.

REPORT zp6 .

DATA m TYPE c.

PARAMETERS: p1 RADIOBUTTON GROUP radi,

p2 RADIOBUTTON GROUP radi,

p3 RADIOBUTTON GROUP radi,

p4 RADIOBUTTON GROUP radi,

p5 RADIOBUTTON GROUP radi,

p6 RADIOBUTTON GROUP radi,

p7 RADIOBUTTON GROUP radi.

AT SELECTION-SCREEN.

START-OF-SELECTION.

CASE 'X'.

WHEN p1.

m = 'X'.

WRITE 'Radio button p1 is selected' .

WHEN p2.

m = 'X'.

WRITE 'Radio button p2 is selected' .

WHEN p3.

m = 'X'.

WRITE 'Radio button p3 is selected' .

WHEN p4.

m = 'X'.

WRITE 'Radio button p4 is selected' .

WHEN p5.

m = 'X'.

WRITE 'Radio button p5 is selected' .

WHEN p6.

m = 'X'.

WRITE 'Radio button p6 is selected' .

WHEN p7.

m = 'X'.

WRITE 'Radio button p7 is selected' .

ENDCASE.

Read only

Former Member
0 Likes
884

parameters : RB1 RADIOBUTTON GROUP GRP1 DEFAULT 'X' USER-COMMAND UC1,

RB2 RADIOBUTTON GROUP GRP1,

RB3 RADIOBUTTON GROUP GRP1.

here RB1/RB2/RB3 holds either '' or 'X'. if it is 'X' it is ticked, else it means other radiobotton is ticked.

Hope it helps,

Regards,

Bikash

Read only

Former Member
0 Likes
884

Ok thank You! I have thought, I have to check ucomm, but it had always the same content....

Thanks!

Read only

0 Likes
884

What do you need to do?

The SY-UCOMM don't change if you press a radiobutton.

If you need to raise the AT SELECTION-SCREEN event when a radiobutton is selected you have to use USER-COMMAND option.

PARAMETERS: P_RAD1 RADIOBUTTON GROUP R1 USER-COMMAND RAD,

P_RAD1 RADIOBUTTON GROUP R1,

...........................

P_RAD7 RADIOBUTTON GROUP R1.

Max

Read only

Former Member
0 Likes
884

Hi Michael ,

below is the code , X is a status whether which one is triggered . you can use case statement either.

Do reward points if found useful.

IF r1 = 'X'.

IF p_gjahr = ' '.

SET CURSOR FIELD 'P_GJAHR'.

MESSAGE e000(zutsc) with text-004.

ENDIF.

ENDIF.

IF r2 = 'X'.

IF p_gjahr1 = ' '.

SET CURSOR FIELD 'P_GJAHR1'.

MESSAGE e000(zutsc) with text-004.

ENDIF.

ENDIF.