2006 Mar 21 12:23 PM
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
2006 Mar 21 12:24 PM
Hi
You can use CASE/ENDCASE statament:
CASE 'X'.
WHEN P_R1.
WHEN P_R2.
........
WHEN P_R7.
ENDCASE.
max
2006 Mar 21 12:24 PM
Hi
You can use CASE/ENDCASE statament:
CASE 'X'.
WHEN P_R1.
WHEN P_R2.
........
WHEN P_R7.
ENDCASE.
max
2006 Mar 21 12:36 PM
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.
2006 Mar 21 12:37 PM
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
2006 Mar 21 12:40 PM
Ok thank You! I have thought, I have to check ucomm, but it had always the same content....
Thanks!
2006 Mar 21 12:46 PM
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
2006 Mar 21 12:45 PM
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.