Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding list having Check Boxes

Former Member
0 Likes
828

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

5 REPLIES 5
Read only

Former Member
0 Likes
810

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'.

Read only

Former Member
0 Likes
810

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

Read only

Former Member
0 Likes
810
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.
Read only

suresh_datti
Active Contributor
0 Likes
810

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

Read only

Former Member
0 Likes
810

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.