‎2009 Oct 30 7:59 AM
Hi all,
I need to process such a scenario:
1,when I double click open project, which is a link in CL_GUI_SIMPLE_TREE.
then this will trigger the node double click operation, which will call the node double click handling method.
2,And when I do a another operation such as create project, after the creation, how can I trigger the node double click event in order to call the node double click handling method?
the double click handling method can not be called directly.(I just try to call the method, but found that the result is not what I want)
could I just add an event by code?
Thank you all very much!
Best Regards,
Zhengyong
‎2009 Oct 30 8:04 AM
Hi Zhengyong,
in order to get the handler for event doubleclick triggered, you can
- define the handler method as handler for event doubleclick of tree class
- register the handler at the class
If you want it triggered without doubleclick you can just call the method.
See sample programs BTREE
Regards,
Clemens
‎2009 Oct 30 8:04 AM
Hi Zhengyong,
in order to get the handler for event doubleclick triggered, you can
- define the handler method as handler for event doubleclick of tree class
- register the handler at the class
If you want it triggered without doubleclick you can just call the method.
See sample programs BTREE
Regards,
Clemens
‎2009 Oct 30 8:38 AM
Hi Clemens,
thank you!
I just do call the method.
but this can not work, maybe there are some other problems,
in the double click handling method, I do this:
"first some code to update the LT_WS.
call method LIST_VIEWER->SET_TABLE_FOR_FIRST_DISPLAY
exporting I_STRUCTURE_NAME = 'bct_s_ws'
IS_LAYOUT = LIST_LAYOUT
changing IT_OUTTAB = LT_WS
it_fieldcatalog = me->lt_fcat.
the LT_WS is a content table, even the content is new, but the list viewer didn't reflect this change.
the LIST_VIEWER refer to CL_GUI_ALV_GRID.
maybe this is the problem of CL_GUI_ALV_GRID.
and I even use the refresh method, but it does not work. LIST_VIEWER->refresh_table_display( ).
Thanks you for you kind help
best Regards,
Zhengyong
Edited by: Zhengyong Zhang on Oct 30, 2009 9:40 AM
‎2009 Oct 30 8:50 AM
Clemens pointed you, according to your first post, to the right sample programs (alv TREE!!). But now you are coming back with a reference to alv GRID???
Please be a bit (actually a LOT) more precise about your requirement.
‎2009 Oct 30 9:01 AM
Sorry for making you confused,
the real thing I want to do is:
I need to update the alv Grid by manual node double click.
the code is very long, it's not possible to list all the code.
Thanks for all the kindness from all of you!
Thank you!
Best Regards,
Zhengyong
‎2009 Oct 30 10:06 AM
Sorry to say, but this only adds to the confusion. Do you want to display an ALV tree (on the left) and an ALV grid (on the right). And when one double clicks on a certain node of the ALV Tree, it should update the data from that particular node, in the (corresponding) ALV row? Is that what you want, then you should have a look a transaction SE83 (reuse library). In here you will find some interesting examples for the ALV tree control.
If this is not what you want, please explain (not by coding, but in words) exactly what it is that you want.
‎2009 Nov 05 3:00 AM
Hi Micky,
Thanks for you detailing explaination.
this problem has been fixed, and it was caused by the wrong declaration of ALV grid, in the previcious code, everytime the double click happen, the creation of ALV grid will be done, but it seems that the ALV grid controler doesn't allow this, so the data flush in the ALV grid will failed.
if the ALV grid is defined as a global variable, this will be avoided, which is the current way to solve this problem.
Thanks for all of you.
Best Regards,
Zhengyong
‎2009 Oct 30 8:33 AM
BCALV_TREE_02 ALV Tree Control: Event Handling
Regards,
Srinivas