10-16-2007 6:22 AM
Hi! Friends,
plz help me.
i need to disable a radiobutton after processing it.
i have done it using AT SELECTION-SCREEN OUTPUT but this makes the two radiobuttons in disable mode.
selection-screen begin of block block1.
parameters: r1 radiobutton group rad1 MODIF ID RR1,
r2 radiobutton group rad1 MODIF ID RR2.
selection-screen end of block block1.
start-of-selection.
if r1 = 'X'.
write: /10 'R1 Selected'.
falg = 'R2'.
else.
write: /10 'R2 Selectred'.
endif.
<b> at selection-screen output.
if flag = 'R2'.
loop at screen.
if screen-group1 = 'RR1'.
screen-input = 0.
elseif screen-group1 = 'RR2'.
screen-input = 1.
endif.
modify screen.
clear screen.
endloop.
endif.</b>
it makes both r1 and r2 INPUT = 0.
but i have to make R1 alone INPUT = 0 after printing "R1 Selected" and after completing both the process both Radiobuttons has to be enabled.
Regards,
Nagulan.
10-16-2007 6:26 AM
Hi,
The AT SELECTION-SCREEN OUTPUT always gets triggered before START-OF-SELECTION.
Hence in ur code for AT SELECTION-SCREEN OUTPUT, the value of flag will not be filled and hence the issue.
Anyways, u have two radiobuttons only and if u disable one on the click of other, then how will u be able to select the other radiobutton if needed
Regards,
Himanshu.
10-16-2007 6:39 AM
Check this sample code.
PARAMETERS : p_c1 RADIOBUTTON GROUP r1 USER-COMMAND m1.
PARAMETERS : p_c2 RADIOBUTTON GROUP r1 DEFAULT 'X'.
PARAMETERS : p_1(10) TYPE c.
PARAMETERS : p_2(10) TYPE c.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_c1 = 'X'.
IF screen-name = 'P_2'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ELSEIF p_c2 = 'X'.
IF screen-name = 'P_1'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
Regards
Gopi
10-16-2007 6:41 AM
Hi
try like this
selection-screen begin of block block1.
parameters: r1 radiobutton group rad1 MODIF ID RR1,
r2 radiobutton group rad1 MODIF ID RR2.
selection-screen end of block block1.
at selection-screen output.
loop at screen.
if screen-group1 = 'RR1'.
screen-input = 0.
modify screen.
clear screen.
endif.
if screen-group1 = 'RR2'.
screen-input = 1.
modify screen.
clear screen.
endif.
endloop.
start-of-selection.
if r1 = 'X'.
write: /10 'R1 Selected'.
falg = 'R2'.
else.
write: /10 'R2 Selectred'.
endif.