12-10-2009 4:44 PM
Hi to all,
I've built an ALV TREE model going by the class cl_gui_alv_tree, with a simple two level items hierarchy and several columns,
The double click method has been activated in it;
Clicking wherever on one of this lines, I get thorugh over into another dynpro.
In this dynpro next I bring up operations that may affect the structure of my first alv tree where in I double clicked, such as deleting or even adding lines,
So going back again I'm due to delete alv tree hirarchy and build it up once again as is the only way to get all changes always proper delivered and visible, and it's working, very slowly, but it's working,
Now may issue is:
It happens the alv tree list comes often long, and my be I get to double click a line or a node stayng at the very botton which I could reach only by deep scrolling down the alv,
Which is exactly the best method I could use when I come back from the second screen after double clicking, to reposition the alv somehow on the same line or at least on the same node where I clicked?
As I get the alv fiirst destroyied and then build again to be shown with all the new changes, by now I can only have it started and positioned from the first line, how endeed woluld I mark and choose exactly the line where I want the list start to be shown?
Beside I tried some method such as SELECT_ITEM or SET_SELECTED_ITEM before displaying the alv tree again but it's not working,
Counld anyone please provide me some suggestion or code sample?
Thankyou in advance for your help,
Sergio,
12-14-2009 1:00 PM
12-14-2009 1:00 PM
01-11-2010 3:44 PM
12-14-2009 2:05 PM
Hi Sergio,
You can try standard EXPAND/COLLAPSE NODES option in ALV toolbar.
You select that node and click expand or collapse.
Regards,
Nisha Vengal.
12-14-2009 2:09 PM
Hi Sergio,
You can use the below code to expand the nodes on first display of ALV.
CALL METHOD go_alv_tree->expand_node
EXPORTING
i_node_key = w_node_key "node key
i_expand_subtree = c_x "whether to expand sub nodes
EXCEPTIONS
failed = 1
illegal_level_count = 2
cntl_system_error = 3
node_not_found = 4
cannot_expand_leaf = 5
OTHERS = 6.
Regards,
Nisha Vengal.
01-11-2010 3:59 PM
Hi Vengal,
Thankyou for your advices, I had nodes already all expanded in this case , beside I turned the alv tree in an alv grid normal and then I could use some other method to set row and focus on this row the moment I had to show up again the list coming back from second screen,
Thanks a lot,
Sergio,