‎2007 Feb 10 6:11 AM
Hello Friends,
Iam working on ALV tree.
Iam calling a screen in my program.
On my screen I have an input box and a custom container. I enter a value in the input box and when I press enter, my ALV tree gets populated in the container. If I change the value in the input box,and press enter the ALV tree doesnt get changed. It is the same previous tree. How to refresh my ALV Tree when my input changes and enter is pressed.
regards,
Raju
‎2007 Feb 10 9:07 AM
Hi,
Check the link below:
http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_refresh.htm
It has the sample code that could solve your problem.
Hope this helps.
Reward if helpful.
Regards,
Sipra
‎2007 Feb 10 9:31 AM
Hi,
What you need to do is look at the Standard SAP Programs for the same..
It will give insight on all the various functionalities.
e.g
BCALV_TREE_01 ALV tree control: build up the hierarchy tree
BCALV_TREE_02 ALV tree control: event handling
BCALV_TREE_03 ALV tree control: use an own context menu
BCALV_TREE_04 ALV tree control: add a button to the toolbar
BCALV_TREE_05 ALV tree control: add a menu to the toolbar
BCALV_TREE_06 ALV tree control: Icon column and icon for nodes/items
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_DND ALV tree control: Drag & Drop within a hierarchy tree
BCALV_TREE_DND_MULTIPLE ALV tree control: Drag & Drop within a hierarchy tree
BCALV_TREE_EVENT_RECEIVER Include BCALV_TREE_EVENT_RECEIVER
BCALV_TREE_EVENT_RECEIVER01
BCALV_TREE_ITEMLAYOUT ALV Tree: Change Item Layouts at Runtime
BCALV_TREE_MOVE_NODE_TEST Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO Program BCALV_TREE_SIMPLE_DEMO
BCALV_TREE_VERIFY Verifier for ALV Tree and Simple ALV Tree
Also please check the transaction DWDM This will give info also on trees.
Thanks,
Shankar
‎2011 Jan 29 10:58 AM
Hi Narayana,
I faced the same problem and I think the best solution is as follows :
CALL METHOD WCL_ALV_TREE->DELETE_SUBTREE
EXPORTING I_NODE_KEY = L_TOP_KEY.
*Fetch the data and create the hierarchy
PERFORM CREATE_HIERARCHY.
** update frontend
CALL METHOD WCL_ALV_TREE->FRONTEND_UPDATE.
What this will do - is
(1) Delete all nodes
(2) Create the hierarchy once again (see program BCALV_TREE04 for data selection logic
(3) update the frontend.
One thing to note is that the node count gets changed, so ensure that you are reading your selected nodes using the method - GET_OUTTAB_LINE.
Thanks,
Aditya
‎2011 Jan 30 3:27 PM
Hi,
you can use the method "REFRESH_TABLE_DISPLAY"
you have used the class "CL_GUI_ALV_TREE", you can use the method "REFRESH_TABLE_DISPLAY"
Then update/insert these values in the internal table you have used while calling the method "SET_TABLE_FOR_FIRST_DISPLAY".
Call the method "REFRESH_TABLE_DISPLAY". The tree should automatically reflect the changes.
Edited by: sekharch on Jan 30, 2011 4:28 PM