‎2007 Apr 26 10:31 AM
Hi,
i want to display 2 check boxes on the screen. If a user checks first box then it should get value 'X' and put it in variable check1.
i am providing sample code which is not working
**************************************************************************************************
DATA: check1 TYPE c VALUE 'X',
check2 TYPE c VALUE ' '.
START-OF-SELECTION.
WRITE: / check1 AS CHECKBOX, 'Checkbox 1',
/ check2 AS CHECKBOX, 'Checkbox 2'.
AT LINE-SELECTION.
READ: LINE 1 FIELD VALUE check1,
LINE 2 FIELD VALUE check2.
**************************************************************************************************
i dont get any value if i heck either of them. Please i dont want to use SELECTION_SCREEN. I want to do it on List.
Thanks in advance to all people.
Kind Regards,
Muhammad Usman Malik
ABAP Consultant
Siemens.
usman.malik.sap@gmail.com
‎2007 Apr 26 10:41 AM
Hi,
What u are doing is correct buit add some codes in at line-selection.
at line-selection.
if sy-lisel(1) = 'X'. "Hope chk box is on first column.
"Chk box is selected.
endif.
This is hint, also use sy-lsind so that u can get line index.
Jogdand M B
‎2007 Apr 26 10:38 AM
Hi..
write check1.
this is any how contains the value 'X' as u r selecting it and double clicking on it.
add this line...
<b>modify line 2 field value check2 from check1.</b>
‎2007 Apr 26 10:40 AM
hi,
Check the program <b>DEMO_LIST_READ_LINE</b>
Regards
Sailaja.
‎2007 Apr 26 10:40 AM
Hi,
i think value for check box 1 is in line2 and for check box 2 is in line 3.
So Please try likr this.
START-OF-SELECTION.
WRITE: / check1 AS CHECKBOX, 'Checkbox 1',
/ check2 AS CHECKBOX, 'Checkbox 2'.
AT LINE-SELECTION.
READ: LINE 2 FIELD VALUE check1,
LINE 3 FIELD VALUE check2.
‎2007 Apr 26 10:53 AM
Hi
The solution from Vigneswaran S is almost right.
The problem is that the line number counting starts from the header.
I think that correct code for your example could also be
READ: LINE 3 FIELD VALUE check1,
LINE 4 FIELD VALUE check2.
This code would be correct if you have 1 header line followed bu 1 underline followed by the 2 lines with checkboxes.
best regards
Thomas
PS the solution from Rammohan Nagam is absolutly nonsense.
‎2007 Apr 26 11:11 AM
Hi Usman,
If You are declaring the Report statement with NO STANDARD PAGE HEADING, then first line in the list would be ur check box check1.Otherwise it would be Report header.So try to find the line no and then read the value for the check box.
‎2007 Apr 26 10:41 AM
Hi,
What u are doing is correct buit add some codes in at line-selection.
at line-selection.
if sy-lisel(1) = 'X'. "Hope chk box is on first column.
"Chk box is selected.
endif.
This is hint, also use sy-lsind so that u can get line index.
Jogdand M B
‎2007 Apr 26 11:14 AM
Hi,
Use "NO standard page heading" addition in the REPORT statement and try again.
Regards,
Suresh
null