06-23-2011 4:24 AM
Hi,
I have a small requirement in ALV Tree
left side i get a tree and when i double click on one of it , i'm trying to display the subscreen. even though i am setting the paramaters to the screen but i'm unable to get those values in the subscreen.
example
Name Description subscreen 0101
xyz xyz desc (double click on this) name = XYZ
ABC abs desc descrip = xyz desc
This is what the requirement is:
Please help me out with the solution.
Bhavana
06-23-2011 6:50 AM
Hi Bhavana,
Register your double click event in the ALV Tree program. Then call the respective subscreen using sy-ucomm value.
IF NOT r_ucomm IS INITIAL.
CASE r_ucomm.
WHEN '&F03'.
SET SCREEN 100.
LEAVE SCREEN.
endif.
Refer the below code for setting the registering the event.
CALL METHOD tree->get_registered_events
IMPORTING
events = l_events_s.
l_event-eventid = cl_gui_column_tree=>eventid_item_double_click.
APPEND l_event TO l_events_s.
CALL METHOD tree->set_registered_events
EXPORTING
events = l_events_s
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
illegal_event_combination = 3.
CREATE OBJECT l_events_receiver.
SET HANDLER l_events_receiver->handle_item_click FOR tree.
CLASS lcl_events_receiver DEFINITION. "#EC *
PUBLIC SECTION.
METHODS:
handle_item_click FOR EVENT item_double_click OF cl_gui_alv_tree
IMPORTING node_key fieldname.
ENDCLASS. "lcl_handle_events DEFINITION
CLASS lcl_events_receiver IMPLEMENTATION.
METHOD handle_item_click.
PERFORM employee_data USING node_key fieldname.
CALL SCREEN 300.
ENDMETHOD. "HANDLE_ITEM_DOUBLE_CLICK
ENDCLASS. "lcl_events_receiver IMPLEMENTATION
Thanks.
Ganesh R K
Edited by: Ganesh.rk83 on Jun 23, 2011 11:21 AM
06-23-2011 3:39 PM
Hi Ganesh,
Thanks for your reply, i have done all the registering events etc etc but my problem is to call a subscreen but the example which you showed was for just a Normal Screen . after the perform same thing i want to call a subscreen, please help me with this.
Rest all like registering the events etc etc i have done perfeclty.
bhavana