‎2008 Aug 28 4:20 PM
hi ,
i have one requirement that , two check boxes are there if i check one check box then one parameter should come and another check box should be disable. i.e. should not give permission to check that. So how can i do please guide me.
thank you,
regards
raghu
‎2008 Aug 28 4:25 PM
Hi,
You can use the LOOP AT SCREEN to disable the checkbox..Please check this sample code..
PARAMETERS: p_check1 TYPE xfeld AS CHECKBOX USER-COMMAND c1,
p_check2 TYPE xfeld AS CHECKBOX USER-COMMAND c2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_check1 = 'X' AND screen-name = 'P_CHECK2'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.Thanks
Naren
‎2008 Aug 28 4:25 PM
Check this sample code.
REPORT ztest_check.
parameters: p1(10),
c1 as checkbox user-command aaa,
c2 as checkbox.
at selection-screen output.
loop at screen.
if c1 = 'X'.
if screen-name = 'C2'.
screen-input = 0.
modify screen.
endif.
endif.
endloop.
‎2008 Aug 28 4:25 PM
Hi,
You can use the LOOP AT SCREEN to disable the checkbox..Please check this sample code..
PARAMETERS: p_check1 TYPE xfeld AS CHECKBOX USER-COMMAND c1,
p_check2 TYPE xfeld AS CHECKBOX USER-COMMAND c2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_check1 = 'X' AND screen-name = 'P_CHECK2'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.Thanks
Naren
‎2008 Aug 28 4:27 PM
Try with event AT SELECTION-SCREEN check_field , loop SCREEN itab and set disable field with 'X' when fieldname = other parameter
Edited by: Sebastian Celestino on Aug 28, 2008 5:27 PM
‎2008 Aug 28 4:28 PM
hi look at this one..
report ztests .
parameters:p_chk1 as checkbox,
p_chk2 as checkbox .
at selection-screen output.
loop at screen .
if p_chk1 = 'X'.
if screen-name = 'P_CHK2'.
screen-input = 0.
modify screen.
endif.
endif.
endloop.
‎2008 Aug 28 4:31 PM
Try this code:
Parameters:
chk1 as checkbox user-command com,
chk2 as checkbox,
Char1(5) type c,
char2(5) type c.
At selection-screen output.
if chk1 eq 'X'.
loop at screen.
if screen-name CS 'CHK2'.
screen-input = 0.
modify screen.
endif.
endloop.
elseif chk2 eq 'X'.
loop at screen.
if screen-name CS 'CHK1'.
screen-input = 0.
modify screen.
endif.
endloop.
endif.With luck,
Pritam.