cancel
Showing results for 
Search instead for 
Did you mean: 

exception TYPE_NOT_FOUND on alv configuration

Former Member
0 Kudos

Hi guys,

I'm in a misery. I need to solve following issue:

having a table with some columns, each columns might hava a value. for each column the user should get a second column which is empty and editable so he may porpose a new value.

I have the structure in the context as a node, with all possible cols (but without the "porposed value" columns) being rendered with ALV component

To get the proposed value columns at runtime I change the context node and add some attributes. So far so good. I can see the table has twice the columns than before. (I just copy the attribute info and add it to the node info)

Alas when I change the cell editor of the table column I get an exception:

Exception condition "TYPE_NOT_FOUND" raised.

in class CL_ABAP_TYPEDESCR=============CP

I get the exception late, its not happening in my code though

I've played around with the attribute info type but it's not behaving any different.

I can change the cell editor of the original static attribute columns without exception.

here some excerpts

copying the attribute

DATA lo_nd_ups_info TYPE REF TO if_wd_context_node_info.
  DATA lv_attr_info TYPE wdr_context_attribute_info.
  DATA lv_attr_info_temp TYPE wdr_context_attribute_info.
  DATA lt_ups_attributes TYPE wdr_context_attr_info_map.

  lo_nd_ups_info = lo_nd_ups->get_node_info( ).
  lt_ups_attributes = lo_nd_ups_info->get_attributes( ).
  LOOP AT lt_ups_attributes INTO lv_attr_info.
    lv_attr_info_temp = lv_attr_info.
    lv_attr_info_temp = lo_nd_ups_info->get_attribute( name = lv_attr_info-name ).
    CONCATENATE lv_attr_info_temp-name '_PROP' INTO lv_attr_info_temp-name.
    lo_nd_ups_info->add_attribute( attribute_info = lv_attr_info_temp ).
  ENDLOOP.

trying to set cell editor


DATA lo_cell_editor TYPE REF TO cl_salv_wd_uie_input_field.

some loop...
      IF lv_prop_name EQ 'ONECAEICNR_PROP'.
      clear lo_cell_editor.
       CREATE OBJECT lo_cell_editor
         EXPORTING
           value_fieldname = lv_prop_name.
       lo_col = lo_config_table->if_salv_wd_column_settings~get_column( id = lv_prop_name ).
       lo_col->set_cell_editor( value = lo_cell_editor ).

any ideas?

regards

Stefan

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi guys

solved it myself, unfortunately it wasn't helpful to copy the original column, I chose another col as prototype with a different type, probably the type did not fit into the ALVs category of usable

Stefan

uday_gubbala2
Active Contributor
0 Kudos

Hi Stefan,

Am not sure about this as I haven't tried it out ever but just a wild guess as how you had said you are creating your columns dynamically... You must be coding something like:

data: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
        lt_columns         TYPE        salv_wd_t_column_ref.

lt_columns = lr_column_settings->get_columns( ).

So may be you don't get the column references for the newly created ones returned by this method. So when you try to change the cell editor by looping through the different columns then the system raises an error coz it doesn't manage to find this particular reference. (I mean the newly created column reference) May be just try check in debugging mode if get_columns( ) is even returning back the references for the dynamically created columns.

Am sorry if this isn't the reason behind the error. I haven't ever tried out a similar thing & it was a just a wild guess from my side

Regards,

Uday

Former Member
0 Kudos

Stefan,

did you check the st22 trace.

try to debug the code and see where exactly error is coming

Thanks

Bala Duvvuri