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

check box

Former Member
0 Kudos
267

Hi All,

In my internal table i have check box fileld when i display the report should display by default all the check boxes should be selected. how to do this.

Thanks.

Ramu.

8 REPLIES 8
Read only

Former Member
0 Kudos
244

Hi...,

while declaration itself u give them initial values.. as 'X'.

like

<b>data

begin of itab occurs 0,

field1 type c value 'X',

field2 type i,

field3 type i,

end of itab.

and when u populate the table also , u can pass this value..</b>

Check this sample code..

******************************************

data :

begin of itab occurs 0,

field1 type c value 'X',

field2 type i,

field3 type i,

end of itab.

do 5 times.

<i>(** u can add this also itab-field1 = 'X'.**)</i>

itab-field2 = sy-index.

itab-field3 = sy-index ** 2.

append itab.

enddo.

loop at itab.

write : / itab-field1 as checkbox,

itab-field2, itab-field3.

endloop.

************************************

reward all helpful answers,,

sai ramesh

Read only

Former Member
0 Kudos
244

hi,

modify the check box field value in the internal table to 'X' before displaying.

Read only

0 Kudos
244

Hi ,

am getting all selected check boxes. in that list user can deselect some checkboxes how to capture this un selected and selected ones.

Please help.

Thanks&Regards.

Ramu

Read only

Former Member
0 Kudos
244

THE SYNTAX FOR THIS IS

LOOP AT ITAB.

ITAB-CHKBOX ='X'.

MODIFY ITAB.

ENDLOOP.

REGARDS

NAVJOT

REWARD POINTS

Read only

Former Member
0 Kudos
244

hi,

u can read the check box value on the list by using the <b>read line</b> statement.

READ LINE LW_LINENO

FIELD VALUE W_CHECKBOX INTO W_CHECKBOX

Read only

0 Kudos
244

in the list he deselect some records. how to delete the check box value for deseleted records.

Thanks.

Ramu.

Read only

0 Kudos
244

at user-command.

case sy-ucomm.

when 'DESL'.

loop at itab.

itab-chk = ''.

modify itab.

endloop.

endcase.

regards

shiba dutta

Read only

Former Member
0 Kudos
244

Value of the deselected check boxes will be ' ' and for selected boxes it will be 'X',

so, no need to delete the value, just u have to read the check box value from the list for further processing