2006 Mar 17 11:28 AM
Hello All,
I have a doubt regarding list having check boxes.
I have a table having five values in rows.How to display that list having those 5 values along with check boxes.
And i need to select only one particular check box.
Please reply as soon as possible
Hello All,
I have a doubt regarding list having check boxes.
I have a table having five values in rows.How to display that list having those 5 values along with check boxes.
And i need to select only one particular check box.
Please reply as soon as possible
2006 Mar 17 11:32 AM
Hi,
YOu can use the write statement with as check box addition.
Write v_cb as checkbox. "Here v_cb must be 1 char field (Of length 1).
REPORT test NO STANDARD PAGE HEADING.
DATA: check1 TYPE c VALUE 'X',
check2 TYPE c VALUE ' '.
START-OF-SELECTION.
WRITE: / check1 AS CHECKBOX, 'Checkbox 1',
/ check2 AS CHECKBOX, 'Checkbox 2'.
2006 Mar 17 11:33 AM
Hi Suganya,
Refer this link...hope it helps...
<a href="http://help.sap.com/saphelp_bw30b/helpdata/en/9f/db9e6435c111d1829f0000e829fbfe/content.htm">Writing checkboxes in output</a>
Regards,
Raj
2006 Mar 17 11:33 AM
data: begin of itab occurs 0,
chk(1),
field1 like ztab-field1,
field2 like ztab-field2,
field3 like ztab-field3,
field4 like ztab-field4,
end of itab.
loop at itab.
write :/ itab-chk as checkbox.
write : itab-field1.
write : itab-field2.
write : itab-field3.
write : itab-field4.
endloop.
loop at itab.
if itab-chk = 'X'.
count = count + 1.
endif.
if count GT 1.
*write message that only one record to be selected
endif.
endloop.
2006 Mar 17 11:34 AM
Hi,
try this approach while writing your list in the program..
DATA: flag1(1) TYPE c VALUE 'X',
flag2(1) TYPE c ,
flag3(5) TYPE c.
WRITE: / 'Flag 1 ', flag1 AS CHECKBOX,
/ 'Flag 2 ', flag2 AS CHECKBOX,
/ 'Flag 3 ', flag3 AS CHECKBOX.
Regards,
Suresh Datti
2006 Mar 17 11:35 AM
hi there,
check this code.
REPORT ZP5 no standard page heading.
tables mara.
*data: mark1 type c.
data: begin of itab occurs 0,
mark1(1),
matnr like mara-matnr,
werks like marc-werks,
end of itab.
select-options :so_matnr for mara-matnr.
start-of-selection.
select matnr
werks
from marc
into corresponding fields of table itab
up to 10 rows
where matnr in so_matnr
order by matnr .
loop at itab.
write:/ itab-mark1 as checkbox,
itab-matnr,
itab-werks.
endloop.
regards,
vikky.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |