2007 Oct 04 8:03 PM
Hi,
I have scenario where I have 4check boxes in my selection screen.. P_PRI, P_QUA, P_NEW and P_INV.
<b>P_PRI, P_QUA, P_NEW</b> will be selected(X) by default.
I have a requirement like when I select the fourth Checkbox <b>P_INV</b>, the two check boxes P_QUA and P_NEW should be unchecked and should be disabled(uneditable mode) and at the same time I have to generate some warning message(Later it will display the output after showing the warning message).
Is it possible to disable a checkbox..? If so, please tell me how to do that.
Can anyone provide me the sample code how to do this.
This is the selection screen logic I was talking about.
***********************************************************************************
SELECTION-SCREEN BEGIN OF BLOCK CHOOSE WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) TEXT-002.
SELECTION-SCREEN POSITION 18.
PARAMETERS: P_PRI AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 31(15) TEXT-003.
SELECTION-SCREEN POSITION 48.
PARAMETERS: P_QUA AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 61(15) TEXT-004.
SELECTION-SCREEN POSITION 78.
PARAMETERS: P_NEW AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK CHOOSE.
SELECTION-SCREEN BEGIN OF BLOCK PRICE WITH FRAME TITLE TEXT-006.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) TEXT-007.
SELECTION-SCREEN POSITION 18.
PARAMETERS: P_INV AS CHECKBOX.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK PRICE.
***********************************************************************************
Thanks in advance.
regards,
Paddu.
2007 Oct 04 8:19 PM
Hi Paddu,
Check this out...I didn't include Warning message but once you are satisfied with this code...we can add it easily
SELECTION-SCREEN BEGIN OF BLOCK CHOOSE WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) TEXT-002.
SELECTION-SCREEN POSITION 18.
PARAMETERS: P_PRI AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 31(15) TEXT-003.
SELECTION-SCREEN POSITION 48.
PARAMETERS: P_QUA AS CHECKBOX MODIF ID m1 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 61(15) TEXT-004.
SELECTION-SCREEN POSITION 78.
PARAMETERS: P_NEW AS CHECKBOX MODIF ID m1 DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK CHOOSE.
SELECTION-SCREEN BEGIN OF BLOCK PRICE WITH FRAME TITLE TEXT-006.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) TEXT-007.
SELECTION-SCREEN POSITION 18.
PARAMETERS: P_INV AS CHECKBOX USER-COMMAND P_INV.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK PRICE.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_inv = 'X' AND screen-group1 = 'M1'.
p_qua = ''.
p_new = ''.
screen-input = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Regards,
Vivek
2007 Oct 04 8:17 PM
2007 Oct 04 8:19 PM
Hi Paddu,
Check this out...I didn't include Warning message but once you are satisfied with this code...we can add it easily
SELECTION-SCREEN BEGIN OF BLOCK CHOOSE WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) TEXT-002.
SELECTION-SCREEN POSITION 18.
PARAMETERS: P_PRI AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 31(15) TEXT-003.
SELECTION-SCREEN POSITION 48.
PARAMETERS: P_QUA AS CHECKBOX MODIF ID m1 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 61(15) TEXT-004.
SELECTION-SCREEN POSITION 78.
PARAMETERS: P_NEW AS CHECKBOX MODIF ID m1 DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK CHOOSE.
SELECTION-SCREEN BEGIN OF BLOCK PRICE WITH FRAME TITLE TEXT-006.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) TEXT-007.
SELECTION-SCREEN POSITION 18.
PARAMETERS: P_INV AS CHECKBOX USER-COMMAND P_INV.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK PRICE.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_inv = 'X' AND screen-group1 = 'M1'.
p_qua = ''.
p_new = ''.
screen-input = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Regards,
Vivek