2009 Sep 16 12:12 PM
Hi , I tried to find out how to disable one checkbox at runtime in forums but I could not understand ..so tell me how to do this.
Parameters : check1 as checkbox modif id CH1,
check2 as checkbox modif id CH2.
now when I check one checkbox the otherone has to disable.
2009 Sep 16 12:18 PM
HI Bachi
Parameters : check1 as checkbox modif id CH1 USER COMMAND u1,
check2 as checkbox modif id CH2 USER COMMAND u2.
LOOP AT SCREEN.
IF screen-group1 = 'CH1' AND check2 IS NOT INITIAL.
screen-active = 0.
endif.
.
.
.
ENDLOOP.
Pushpraj
Here after checking one check box with out executing the program the other one check box has to disable.
dynamically it has to change
Like Radio Button Mechanism
Edited by: Bachi Reddy on Sep 16, 2009 1:25 PM
Edited by: Bachi Reddy on Sep 16, 2009 1:26 PM
2009 Sep 16 12:18 PM
Hi,
There is nothing hard to understand in this. Have alook at this
Parameters : check1 as checkbox modif id CH1,
check2 as checkbox modif id CH2.
AT SELECTION-SCREEN OUTPUT. " The event where disable option can be used
LOOP AT SCREEN.
IF check1 = 'X'. " Checking if check1 is checked
IF screen-group1 = 'CH2' . "assigning the field with the modif value ch2 to identify check2
screen-active = 0. " making the field disabled
MODIFY SCREEN. " modifying the screen
ENDIF.
ENDIF.
ENDLOOP.
Hope you are clear now
Regards,
Vikranth
2009 Sep 16 12:24 PM
Here after checking one check box with out executing the program the other one check box has to disable.
dynamically it has to change
Like Radio Button Mechanism
Edited by: Bachi Reddy on Sep 16, 2009 1:25 PM
Edited by: Bachi Reddy on Sep 16, 2009 1:26 PM
2009 Sep 16 12:30 PM
2009 Sep 16 12:32 PM
Hi
Use the same code
Parameters : check1 as checkbox modif id CH1 USER COMMAND u1,
check2 as checkbox modif id CH2 USER COMMAND u2.
LOOP AT SCREEN.
IF screen-group1 = 'CH1' AND check2 IS NOT INITIAL.
screen-active = 0.
endif.
.
.
.
ENDLOOP.
But at
INITILIZATION level
give check1 = 'X'.
Regards,
Sreeram
2009 Sep 16 12:18 PM
HI Bachi
Parameters : check1 as checkbox modif id CH1 USER COMMAND u1,
check2 as checkbox modif id CH2 USER COMMAND u2.
LOOP AT SCREEN.
IF screen-group1 = 'CH1' AND check2 IS NOT INITIAL.
screen-active = 0.
endif.
.
.
.
ENDLOOP.
Pushpraj
2009 Sep 16 12:19 PM
add a user command to the parameter (check the online help on PARAMETERS for more info)
This will trigger the AT-SELECTION-SCREEN event, this you can then uses loop at screen and disable / hide, or whatever you want to do with the hceckbox.
Kind regards, Rob Dielemans
2009 Sep 16 12:22 PM
Hi,
Try like below code
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-024.
s_asn FOR zgr-zasn
MODIF ID aa,
PARAMETER : cb_test AS CHECKBOX DEFAULT 'X'
USER-COMMAND u1. " Test run
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN OUTPUT.
* Do not display asn field when test run
* checkbox is not checked
LOOP AT SCREEN.
IF cb_test = space AND screen-group1 = c_aa.
screen-output = 0.
screen-active = 0.
screen-input = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Regards,
Nandha
2009 Sep 16 12:38 PM
Parameters : check1 as checkbox modif id CH1 USER-COMMAND u1,
check2 as checkbox modif id CH2 USER-COMMAND u2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'CH1' AND check2 IS NOT INITIAL.
screen-active = 1.
screen-input = 0.
endif.
modify screen.
IF screen-group1 = 'CH2' AND check1 IS NOT INITIAL.
screen-active = 1.
screen-input = 0.
endif.
modify screen.
ENDLOOP.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |