Skip to Content
Former Member
Nov 11, 2008 at 11:49 AM

CL_SALV_TREE; CL_SALV_NODES Problem with p_node_key


Hello Community,

I have a serious Problem with the p_node_key value while using it in u201Cread table with index p_node_key.u201D

During the run of a program the content of the data-table with is used for the tree changes. Because he does not show the data correctly a rebuild of the nodes is necessary.

I read all nodes treenodes = tree->get_nodes( ). Then delete them treenodes ->delete_all.

Then add the nodes based on the current data-table

node = nodes->add_node( related_node = u2026

data_row = u2026

row_style = u2026

relationship = cl_gui_column_tree=>relat_last_child )

Unfortunately p_node_key counts endlessly and does not restart with one.

Example: Datatable with 50 rows.

In the first run reading the table with index p_node_key works fine.

Second run the table still has 50 rows but the p_node_key now starts with 51 so he will select an emty row while reading the table with index p_node_key.

How do I reset the p_node_key for every rebuild of the tree?