on 12-11-2007 4:41 PM
I loop over all elements of a context node, and change some attributes.
The code looks like this:
LOOP AT lt_element_list INTO lo_el_element.
lo_el_element->get_static_attributes( IMPORTING static_attributes = ls_element ).
ls_element-created_by_name = get_user_name( iv_user_id = ls_element-created_by ).
ls_element-changed_by_name = get_user_name( iv_user_id = ls_element-changed_by ).
lo_el_element->set_static_attributes( EXPORTING static_attributes = ls_element ).
ENDLOOP.
This coding seems to change the the lead selection of the context node, which leads to problems somewhere else.
Why does it change the lead selection and how can I prevent it?
hi daniel.....
i dont think there is a need for looping in this manner.
you just get all the values of a node into an internal table.
and then loop the internal table an make changes in it.
then clear the node and pass this currently changed internal table into the node.
the lead selection changes because you are setting the attribute and it might be stored in index 1 or the to the index where the lead selection is referred to. this might be your problem.
---regards,
alex b justin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi daniel.......
one sugestion for you:
before reading the table, first read the lead selection,
then loop the internal table and before passing it to the node make sure that the lead selection is set to the previously selected value.
generally lead selection, by default, is set for the first row.
---regards,
alex b justin
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.