‎2010 Jan 31 11:51 AM
Hi,
I am having four select-options and a check box in my selection screen. My requirement is to check/ Tick the check box only if values for the select-option two is provided. Else the check box should not be checked. All the select-options and check-box are in the same screen. Please suggest a way to achieve this requirement.
Thanks in advance,
Aravindan.
‎2010 Jan 31 3:55 PM
Hi, Anbalagan
you can use the following Logic
" IN AT SELECTION SCREEN EVENT Write following CODE
IF seopt2[] IS NOT INITIAL.
cbox = 'X'.
ELSE.
cbox = ''.
END IF.@Santosh: I think there is no need for using MODIFY ID. Please Correct me if wrong
Best Regards,
Faisal
‎2010 Jan 31 2:26 PM
Hi,
use modif id for parameters
and put it into if condition
regards
Santosh
‎2010 Jan 31 3:55 PM
Hi, Anbalagan
you can use the following Logic
" IN AT SELECTION SCREEN EVENT Write following CODE
IF seopt2[] IS NOT INITIAL.
cbox = 'X'.
ELSE.
cbox = ''.
END IF.@Santosh: I think there is no need for using MODIFY ID. Please Correct me if wrong
Best Regards,
Faisal
‎2010 Feb 01 7:03 AM
hi
you have to write the code in the event AT SELECTION-SCREEN OUTPUT.
IF s_option2[] IS NOT INITIAL.
checkbox = 'X'.
ELSE.
checkbox = ' '.
END IF.
‎2010 Feb 01 7:10 AM
Hi Aravindan,
You can write follwoing code for check-box validation.
at selection-screen on p_checkbox.
if not p_checkbox is initial.
if s_opt2[] is initial.
message e208(00) with 'Checkbox can not be selected with s_opt2.'
endif.
endif.
Hope this will help you.
Regards,
Anil Salekar
‎2010 Feb 01 8:12 AM
Hi Aravindan,
You can write follwoing code for check-box validation.
at selection-screen on p_check.
if s_opt1[] is initial and
not s_opt2[] is initial and
s_opt3[] is initial and
s_opt[] is initial.
" can tick the checkbox
else.
" cannot tick the checkbox
endif.
Hope this will help you.
Regards,
Abhijit G. Borkar
‎2010 Feb 01 10:06 AM
Hi,
Try this way.
Thanks
Venkat.O
REPORT ztest_notepad.
TABLES:nbew.
SELECT-OPTIONS:
einri FOR nbew-einri,
falnr FOR nbew-falnr,
lfdnr FOR nbew-lfdnr,
bewty FOR nbew-bewty.
PARAMETERS:p_check AS CHECKBOX.
DATA:msg TYPE string.
AT SELECTION-SCREEN.
IF falnr[] IS NOT INITIAL.
msg = 'Checkbox should be checked.'.
MESSAGE msg TYPE 'E'.
ENDIF.
START-OF-SELECTION.
WRITE 'Venkat'.
‎2010 Feb 02 6:31 AM
HI,
TRY THIS CODE...
tables: mara,vbak,marc.
select-OPTIONS matnr for mara-matnr.
select-OPTIONS werks FOR marc-werks.
SELECT-OPTIONS vbeln for vbak-vbeln.
SELECT-OPTIONS matkl FOR mara-matkl.
PARAMETERS: c1 as CHECKBOX USER-COMMAND CHK1.
PARAMETERS: c2 as CHECKBOX USER-COMMAND CHK2.
PARAMETERS: c3 as CHECKBOX USER-COMMAND CHK3.
PARAMETERS: c4 as CHECKBOX USER-COMMAND CHK4.
AT SELECTION-SCREEN.
CASE sy-ucomm.
WHEN 'CHK1' OR 'CHK2' OR 'CHK3' OR 'CHK4'.
IF MATNR-HIGH IS INITIAL OR MATNR-LOW IS INITIAL OR WERKS-HIGH IS INITIAL OR WERKS-LOW IS INITIAL
OR VBELN-HIGH IS INITIAL OR VBELN-LOW IS INITIAL OR MATKL-HIGH IS INITIAL OR MATKL-LOW IS INITIAL.
MESSAGE 'FILL REQUIRED ENTRIES' TYPE 'I'.
CLEAR: C1,C2,C3,C4.
ENDIF.
ENDCASE.