2015 Sep 14 3:43 PM
Hi All,
I have a problem with refreshing an ALV tree after deleting a particular node.
I have a delete button at application tool bar which actually gives me a pop up and deletes the selected node on alv tree.
After that, I'm unable to refresh the tree, the page is not getting refreshed after deleting.
I searched sdn and found a way that I can delete the entire tree and rebuild it again by calling the screen. I used 'delete_all_nodes' and called the screen.
But it is not working. tree is nor getting deleted when I checked it in debugging mode but at the output, I see all the nodes are deleted.
Could you please help me with this.
ELSE.
READ TABLE i_pnode INTO w_pnode WITH KEY key_node = l_selected_node.
MOVE w_pnode-zslifnr TO w_zbi_saleshier1-zslifnr.
* CALL SCREEN 0100.
DELETE zbi_saleshier FROM w_zbi_saleshier1.
DELETE i_pnode WHERE key_node = l_selected_node.
DATA: l_change TYPE c,
l_dref_calc_line TYPE REF TO data.
CALL METHOD tree1->delete_all_nodes.
CALL SCREEN 9000.
Hi All,
I have a problem with refreshing an ALV tree after deleting a particular node.
I have a delete button at application tool bar which actually gives me a pop up and deletes the selected node on alv tree.
After that, I'm unable to refresh the tree, the page is not getting refreshed after deleting.
I searched sdn and found a way that I can delete the entire tree and rebuild it again by calling the screen. I used 'delete_all_nodes' and called the screen.
But it is not working. tree is nor getting deleted when I checked it in debugging mode but at the output, I see all the nodes are deleted.
Could you please help me with this.
ELSE.
READ TABLE i_pnode INTO w_pnode WITH KEY key_node = l_selected_node.
MOVE w_pnode-zslifnr TO w_zbi_saleshier1-zslifnr.
* CALL SCREEN 0100.
DELETE zbi_saleshier FROM w_zbi_saleshier1.
DELETE i_pnode WHERE key_node = l_selected_node.
DATA: l_change TYPE c,
l_dref_calc_line TYPE REF TO data.
CALL METHOD tree1->delete_all_nodes.
CALL SCREEN 9000.
2015 Sep 14 3:50 PM
Hi
Try to use the method FRONTEND_UPDATE after changing ALV tree
Max
2015 Sep 14 3:56 PM
Hi Max,
Yes I did use the frontend update. But I tree is not rebuilding
CALL METHOD tree1->delete_all_nodes.
CALL METHOD tree1->frontend_update.
CALL SCREEN 9000.
2015 Sep 14 4:07 PM
Hi
you don't have to call the dynpro again, your method for deleting the node should be in PAI of 9000
try to check program demo BCALV_TREE_DEMO
Max
2015 Sep 14 4:23 PM
Thanks Max.
I tried exporting the selected node.
CALL METHOD tree1->delete_subtree
EXPORTING i_node_key = l_selected_node.
It worked.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |