Skip to Content
Former Member
Dec 02, 2014 at 06:00 PM

Looking for WD Abstract class for check box for table cell editor


Hi Friends

I am using a check box in a table to make the row read only/editable based on the check box value dynamically.

I am able to achieve that except one of the check box is not getting read only because I am not able to get the associated class.

Code under wddomodifyview

IF first_time EQ abap_true.

DATA lo_table TYPE REF TO cl_wd_table.

DATA lt_grp_cols TYPE cl_wd_abstr_table_column=>tt_abstr_table_column.

DATA ls_grp_cols LIKE LINE OF lt_grp_cols.

DATA lt_cols TYPE cl_wd_table_column=>tt_table_column.

DATA ls_cols LIKE LINE OF lt_cols.

DATA lo_inp TYPE REF TO cl_wd_abstract_input_field.

"Get table reference

lo_table ?= view->get_element('TABLE').

"Get Columns of table

lt_cols = lo_table->get_columns( ).

"Check if no columns found

IF lt_cols[] IS INITIAL.

"get grouped columns list

lt_grp_cols = lo_table->get_grouped_columns( ).

"collect into columns table

LOOP AT lt_grp_cols INTO ls_grp_cols.

ls_cols ?= ls_grp_cols.

APPEND ls_cols TO lt_cols.



"For each column and its editor, set the read only property

LOOP AT lt_cols INTO ls_cols .

lo_inp ?= ls_cols->get_table_cell_editor( ).

Here the code work fine for input field but in case of checkbox in the row I am not getting any class for checkbox .

Kindly suggest.