Hi to all,
i was writing a program to display batch job definitions in an ALV grid. The grid was placed in a docking container. After creating the ALV object, I registered two event handlers like this:
CREATE OBJECT go_handler. CALL METHOD go_alv_list->register_delayed_event EXPORTING i_event_id = cl_gui_alv_grid=>mc_evt_delayed_change_select. SET HANDLER go_handler->job_clicked FOR go_alv_list. SET HANDLER go_handler->angeklickt FOR go_alv_list.
The handler methods are defined like this:
methods job_clicked for EVENT double_click of cl_gui_alv_grid IMPORTING E_ROW E_COLUMN. methods angeklickt for event DELAYED_CHANGED_SEL_CALLBACK of cl_gui_alv_grid.
the coding of method double_click and called modules:
perform usercomm using 'PICK' e_row-index e_column-fieldname. ------------------------------------------------- FORM usercomm USING r_ucomm LIKE sy-ucomm iv_index iv_fieldname. DATA ls_list LIKE LINE OF gt_list. CASE r_ucomm. (...) WHEN 'PICK'. READ TABLE gt_list INTO ls_list INDEX iv_index. CHECK sy-subrc = 0. CALL METHOD zcl_jobc_xbp=>job_sm37_zeigen EXPORTING jobname = ls_list-jobname. call method cl_gui_cfw=>flush. ENDCASE. endform. -------------------------------------------------- method JOB_SM37_ZEIGEN. submit z_jobc_show_sm37 with jobname = jobname and return. endmethod.
The called report contains a call of the function module "BP_JOB_MANAGEMENT" in order to display information about the double-clicked job in the SM37 way.
What the problem is:
when the user quits the SM37-like display, the event double_click is being fired immediately again. The function is called once again. This happens not every time, but in about 60% of all tries.
How do I get the program to exit the function module and return reliable to the main list?
Thanks to all