cancel
Showing results for 
Search instead for 
Did you mean: 

Hide Checkbox from alv cell..?

former_member186020
Participant
0 Kudos

Hi All,

I have a requirnment in which i need to show checkboxes at different cell of a avl column..

I have created a new column in alv in which i set the visibility of the checkboxes shown in a alv column and here is the way i am binding it in WDDOMODIFY..

IF ls_col-id CS 'BOX'.

SPLIT ls_col-id AT 'BOX_' INTO lv_head lv_tail.

CONCATENATE 'CHK_VISIBLE_' lv_tail INTO lv_temp.

CONDENSE lv_temp NO-GAPS.

lr_column = ls_col-r_column.

CREATE OBJECT lr_checkbox

EXPORTING

checked_fieldname = ls_col-id.

lr_checkbox->set_visible_fieldname( lv_temp ).

lr_column->set_cell_editor( lr_checkbox ).

ENDIF.

But for some reason the checkbox visibility is not getting set as i have strored in column..

Any Idea..??

Thanks in advance

Vishesh.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Create one more attribute for visibility lv_visible as WDUI_VISIBILITY in the node to which ALV is bound.

When you create that checkbox instance, there will be corresponding method for visibilty using fieldname like SET_VISIBLE_FIELD_NAME, then pass this feildname for visibiity.

Then based on the check boxclick, you have to modify the internal table to update this attribute.

Example code -

loop at it_table into wa_table.
if lv_check eq 'X".
lv_visible = abap_false.
else.
lv_visible = abap_true.
endif.
modify it_table from wa_table transporting lv_visible.
endloop