on 10-18-2012 5:34 PM
HI all,
I'm creating an ALV with dynamic columns. The creation works fine.
Now, I have a button to add new columns, but I'm doing something wrong, i'm getting a dump after set a cell editor.
This is my code;
* Add a new attribute to the context node;
lo_nd_tabla_alv = wd_context->get_child_node( name = 'TABLA_ALV' ).
lo_nd_tabla_alv_info = lo_nd_tabla_alv->get_node_info( ).
ls_attribute_info-name = 'TEST'.
ls_attribute_info-type_name = 'XFELD'.
** ls_attribute_info-IS_STATIC = 'X'.
CALL METHOD lo_nd_tabla_alv_info->add_attribute
EXPORTING
attribute_info = ls_attribute_info.
* Add a column to the ALV;
lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
lo_model = lo_interfacecontroller->get_model( ).
CALL METHOD lo_model->if_salv_wd_column_settings~create_column
EXPORTING
id = 'TEST'
** POSITION = lv_position
receiving
value = lo_column.
* Until this point works fine, the column is displayed properly if I don't set the cell editor
* but if I try to set a cell editor is dumping !!!
CREATE OBJECT lo_checkbox
EXPORTING
checked_fieldname = 'TEST'.
CALL METHOD lo_column->set_cell_editor
EXPORTING
value = lo_checkbox.
The dump says:
"Could not find attribute TEST "
I can see the attribute TEST in my node info, so I don't know what I'm doing wrong....
Do you know what can be the problem?
Thanks in advance.
Hi,
Please try out with the full path along with the node name.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I tried to replicate your issue.
The first dump that is coming can be resolved.
Use the code like this.
You are getting the first dump because the node changes after the configuration. We need to bind it again.
Try if this works for you.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.