‎2008 Mar 31 11:37 AM
Hi All,
I have a requirement like I need to have two check boxes on selection screen when ever I check one the other should be cleared with out pressing enter or any thing on selection screen just like radio button, all helpful answers are rewarded
Thanks
Giridhar
‎2008 Mar 31 12:11 PM
Hi,
Check the below code.
parameters: p_chk1 as checkbox user-command ucomm,
p_chk2 as checkbox user-command ucomm.
at selection-screen output.
if sy-curow = 1.
if p_chk2 = 'X'.
p_chk2 = ' '.
endif.
elseif sy-curow = 2.
if p_chk1 = 'X'.
p_chk1 = ' '.
endif.
endif.
Note: But you need to consider the rows.
‎2008 Mar 31 11:45 AM
Hi,
Without Press Enter or doing anu other Event u cant trigger anything in SAP.
Regards,
Morris Bond.
‎2008 Mar 31 11:48 AM
Hi Giridhar,
In that case why don't you take a Radio Button it self ... Because the selection screen will not get refreshed untill you press enter or any other action for meeting your functionality ..
Regards,
Santosh
‎2008 Mar 31 11:52 AM
parameters : v_check as checkbox user-command USR1.
parameters : v_check1 as checkbox user-command USR1.
at selection-screen .
if v_check = 'X'.
clear : v_check1.
elseif v_check1 = 'X'.
clear : v_check.
endif.
‎2008 Mar 31 11:56 AM
Check this code
report test.
parameters:
p_cb1 TYPE C as checkbox user-command TS1,
p_cb2 TYPE C as checkbox user-command TS2.
AT SELECTION-SCREEN.
IF sy-ucomm eq 'TS1'.
if p_cb2 EQ 'X'.
clear p_cb2.
ENDIF.
ELSEIF sy-ucomm eq 'TS2'.
if p_cb1 EQ 'X'.
clear p_cb1.
ENDIF. ENDIF.
START-OF-SELECTION.
WRITE:p_cb1.
‎2008 Mar 31 12:11 PM
Hi,
Check the below code.
parameters: p_chk1 as checkbox user-command ucomm,
p_chk2 as checkbox user-command ucomm.
at selection-screen output.
if sy-curow = 1.
if p_chk2 = 'X'.
p_chk2 = ' '.
endif.
elseif sy-curow = 2.
if p_chk1 = 'X'.
p_chk1 = ' '.
endif.
endif.
Note: But you need to consider the rows.
‎2008 Mar 31 6:10 PM
Hi Karnam Giridhar,
Try thee following code.
PARAMETERS: test1 RADIOBUTTON GROUP sc1 DEFAULT 'X' user-command u1,
test2 RADIOBUTTON GROUP sc1.
PARAMETERS : p_file TYPE rlgrap-filename.
AT SELECTION-SCREEN OUTPUT.
if test2 is initial.
loop at screen.
if screen-name EQ 'P_FILE'.
P_FILE = ''.
screen-input = '0'.
modify screen.
endif.
endloop.
endif.
AT selection-screen.
if not test2 is initial.
loop at screen.
if screen-name EQ 'P_FILE'.
if screen-input eq '0'.
screen-input = '1'.
modify screen.
endif.
endif.
endloop.
endif.
Regards
Raj