Skip to Content
0
Dec 26, 2018 at 11:40 AM

Getting Error : - Dynamic type conflict when assigning references

113 Views

Code in main 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_input_field.
 DATA lv_path TYPE string.
"Get table reference
 lo_table ?= view->get_element('TABLE_2'). " 'LT_IT_PA0021').
 "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.
 ENDLOOP.
 ENDIF.
 "For each column and its editor, set the read only property
 LOOP AT lt_cols INTO ls_cols.
 " get the cell editor,
 lo_inp ?= ls_cols->get_table_cell_editor( ).     "      WHERE GETTING Error 
 IF lo_inp IS BOUND.
 lv_path = lo_inp->bound__primary_property( ).
 CONCATENATE lv_path 'READ_ONLY' INTO lv_path SEPARATED BY ':'.
 "bind the read_only property to the attributes property
 lo_inp->bind_read_only( path = lv_path ).
 ENDIF.
 ENDLOOP.
 ENDIF.