Application Development 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: 

cl_gui_alv_tree->get_selected_item NOT returning after 1st try.

Former Member
0 Kudos

HI Guys,

I am really puzzled... I have a Tree report (using class cl_gui_alv_tree). Under it, I have two event receiver (namely: tree receiver and a toolbar receiver)... So far very standard.

In the tree receiver, I have recievers for double clicks, and etc. In the method I call

cl_gui_alv_tree->get_selected_item which works perfectly fine.

Now, I added a button to the toolbar, and under the toolbar receiver I added additional code for that... In the method, I also call cl_gui_alv_tree->get_selected_item.

But, it only works the first time... Everytime afterwards that method does not return any value.

Help? I don't know what I did wrong, and I did flush and call frontend_update method after I call call cl_gui_alv_tree->get_selected_item.

Any one has any clue why the call cl_gui_alv_tree object is behaving like this?

Thanks all,

Charlie

1 REPLY 1

Former Member
0 Kudos

I figured out what I was doing wrong....

In the PBO of the screen, I wasn't checking whether the tree was already instaniated before I create the objects... So I was instantiating objects everytime something was done. Which screwed up object pointers.

After I put the check in, everything worked!