cancel
Showing results for 
Search instead for 
Did you mean: 

CheckBox in Grid

Former Member
0 Kudos

Hi,

I have the status field in my table .it contains 0 and 1.

I bpund the table into grid in my view and chnage that column to CheckBox.

but its showing always checked.

I dont want to do any coding for this.

I am ready to change my column datatype.

so please let me know which datatype is sutable for bind correct

data into Checkbox column.

Regards,

Kumar K

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You might have taken char1 as datatype.

Initillay on what basis this column shuld be checked/unchecked.

for ex: if the status is 1 you want to check the checkbox, if the status is 0 then uncheck the checkbobx.

On what basis/column value you want the checkbobx to be shown initially.

When you bind the table you need to set this CHECKBOX column.

Regards,

Lekha.

Former Member
0 Kudos

Yaah,

my field size is CHAR(1).

and im stroeing 0->false and 1->true.

but im getting all checkboxes are true while binding it to grid.

Please let me know how to solve this issue..

Regards,

Kumar K

Former Member
0 Kudos

Hi,

If you want the checkobxes to be unchekd then use this code before binding-

Pass the values space(abap_false) or X(abap_true).

X means checked, space means unchecked.

Loop at lt_table into ls_table
ls_table-flag = space .
modify table....
endloop....
lr_node->bind_table( lt_table ).

flag is char(1).

this flag is a context attribute that is inside the node to which the table is bound.

Regards,

Lekha.

Answers (1)

Answers (1)

Former Member
0 Kudos

You can use Boolean for checkboxes.

Radhika.