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

ALV Tree drop down not working

Former Member
0 Likes
849

This is an ALV Tree.

When I press the drop down(red circle), nothing happen.

I did a test on my program.

When I take off Register_Event, it works fine.

Please advice.

*Register events for alv tree
     PERFORM REGISTER_EVENT.

Thanks,

Wong

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
786

Problem solved.

Solution in this link

http://scn.sap.com/thread/1331711

Thanks,

Wong

This is an ALV Tree.

When I press the drop down(red circle), nothing happen.

I did a test on my program.

When I take off Register_Event, it works fine.

Please advice.

*Register events for alv tree
     PERFORM REGISTER_EVENT.

Thanks,

Wong

3 REPLIES 3
Read only

Former Member
0 Likes
786

Hi Wong,

what does register_event do? I'd guess it registers the event that is executed when a node is expanded and you are not handling that event in your code or something similar.

Regards

   Adi

Read only

0 Likes
786

This is my Register_event.

Basically, register a item double click event. So when there is double click event, it will pass to

another place to catch the nodekey and the fieldname.

form REGISTER_EVENT .

*Define local variables
   DATA: lt_events        TYPE cntl_simple_events,
         l_event          TYPE cntl_simple_event.

*Frontend registration: add additional event ids
   l_event-eventid = cl_gui_column_tree=>eventid_item_double_click.
   append l_event to lt_events.

*Frontend registration:provide new event table to alv tree
call method g_alv_tree->set_registered_events
     exporting
       events = lt_events
     exceptions
       cntl_error                = 1
       cntl_system_error         = 2
       illegal_event_combination = 3.
   if sy-subrc <> 0.
     message x208(00) with 'ERROR'.                       "#EC NOTEXT
   endif.


data: l_event_receiver type ref to lcl_tree_event_receiver.
   create object l_event_receiver.

    set handler l_event_receiver->handle_item_double_click
                                                         for g_alv_tree.

endform.                    " FM_REGISTER_EVENT

Thanks,

Wong

Read only

Former Member
0 Likes
787

Problem solved.

Solution in this link

http://scn.sap.com/thread/1331711

Thanks,

Wong