Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Refresh ALV tree after deleting the node.

Former Member
0 Likes
2,384

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.

4 REPLIES 4
Read only

Former Member
0 Likes
1,112

Hi

Try to use the method FRONTEND_UPDATE after changing ALV tree

Max

Read only

0 Likes
1,112

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.

Read only

0 Likes
1,112

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

Read only

0 Likes
1,112

Thanks Max.

I tried exporting the selected node.

CALL METHOD tree1->delete_subtree

         EXPORTING i_node_key = l_selected_node.


It worked.