天天看點

OO ALV事件清單

例示了OO ALV所有的事件清單及方法所需的參數,作為字典查找。

    METHODS handle_right_click                  " RIGHT_CLICK
        FOR EVENT right_click OF cl_gui_alv_grid.
    METHODS handle_left_click_design            " LEFT_CLICK_DESIGN
        FOR EVENT left_click_design OF cl_gui_alv_grid.
    METHODS handle_move_control                 " MOVE_CONTROL
        FOR EVENT move_control OF cl_gui_alv_grid.
    METHODS handle_size_control                 " SIZE_CONTROL
        FOR EVENT size_control OF cl_gui_alv_grid.
    METHODS handle_left_click_run               " LEFT_CLICK_RUN
        FOR EVENT left_click_run OF cl_gui_alv_grid.
    METHODS handle_onf1                                     " ONF1
      FOR EVENT onf1 OF cl_gui_alv_grid
      IMPORTING
        e_fieldname
        es_row_no
        er_event_data.
    METHODS handle_onf4                                     " ONF4
      FOR EVENT onf4 OF cl_gui_alv_grid
      IMPORTING
        e_fieldname
        e_fieldvalue
        es_row_no
        er_event_data
        et_bad_cells
        e_display.
    METHODS handle_data_changed                 " DATA_CHANGED
      FOR EVENT data_changed OF cl_gui_alv_grid
      IMPORTING
        er_data_changed
        e_onf4
        e_onf4_before
        e_onf4_after
        e_ucomm.
    METHODS handle_ondropgetflavor              " ONDROPGETFLAVOR
      FOR EVENT ondropgetflavor OF cl_gui_alv_grid
      IMPORTING
        e_row
        e_column
        es_row_no
        e_dragdropobj
        e_flavors.
    METHODS handle_ondrag                       " ONDRAG
      FOR EVENT ondrag OF cl_gui_alv_grid
      IMPORTING
        e_row
        e_column
        es_row_no
        e_dragdropobj.
    METHODS handle_ondrop                       " ONDROP
      FOR EVENT ondrop OF cl_gui_alv_grid
      IMPORTING
        e_row
        e_column
        es_row_no
        e_dragdropobj.
    METHODS handle_ondropcomplete               " ONDROPCOMPLETE
      FOR EVENT ondropcomplete OF cl_gui_alv_grid
      IMPORTING
        e_row
        e_column
        es_row_no
        e_dragdropobj.
    METHODS handle_subtotal_text                " SUBTOTAL_TEXT
      FOR EVENT subtotal_text OF cl_gui_alv_grid
      IMPORTING
        es_subtottxt_info
        ep_subtot_line
        e_event_data.
    METHODS handle_before_user_command          " BEFORE_USER_COMMAND
      FOR EVENT before_user_command OF cl_gui_alv_grid
      IMPORTING
        e_ucomm.
    METHODS handle_user_command                 " USER_COMMAND
      FOR EVENT user_command OF cl_gui_alv_grid
      IMPORTING
        e_ucomm.
    METHODS handle_after_user_command           " AFTER_USER_COMMAND
      FOR EVENT after_user_command OF cl_gui_alv_grid
      IMPORTING
        e_ucomm
        e_not_processed.
    METHODS handle_double_click                 " DOUBLE_CLICK
      FOR EVENT double_click OF cl_gui_alv_grid
      IMPORTING
        e_row
        e_column
        es_row_no.
    METHODS handle_delayed_callback             " DELAYED_CALLBACK
        FOR EVENT delayed_callback OF cl_gui_alv_grid.
    METHODS handle_delayed_changed_sel_cal " DELAYED_CHANGED_SEL_CALLBACK
        FOR EVENT delayed_changed_sel_callback OF cl_gui_alv_grid.
    METHODS handle_print_top_of_page            " PRINT_TOP_OF_PAGE
      FOR EVENT print_top_of_page OF cl_gui_alv_grid
      IMPORTING
        table_index.
    METHODS handle_print_top_of_list            " PRINT_TOP_OF_LIST
        FOR EVENT print_top_of_list OF cl_gui_alv_grid.
    METHODS handle_print_end_of_page            " PRINT_END_OF_PAGE
        FOR EVENT print_end_of_page OF cl_gui_alv_grid.
    METHODS handle_print_end_of_list            " PRINT_END_OF_LIST
        FOR EVENT print_end_of_list OF cl_gui_alv_grid.
    METHODS handle_top_of_page                  " TOP_OF_PAGE
      FOR EVENT top_of_page OF cl_gui_alv_grid
      IMPORTING
        e_dyndoc_id
        table_index.
    METHODS handle_context_menu_request         " CONTEXT_MENU_REQUEST
      FOR EVENT context_menu_request OF cl_gui_alv_grid
      IMPORTING
        e_object.
    METHODS handle_menu_button                  " MENU_BUTTON
      FOR EVENT menu_button OF cl_gui_alv_grid
      IMPORTING
        e_object
        e_ucomm.
    METHODS handle_toolbar                      " TOOLBAR
      FOR EVENT toolbar OF cl_gui_alv_grid
      IMPORTING
        e_object
        e_interactive.
    METHODS handle_hotspot_click                " HOTSPOT_CLICK
      FOR EVENT hotspot_click OF cl_gui_alv_grid
      IMPORTING
        e_row_id
        e_column_id.
    METHODS handle_end_of_list                  " END_OF_LIST
      FOR EVENT end_of_list OF cl_gui_alv_grid
      IMPORTING
        e_dyndoc_id.
    METHODS handle_after_refresh                " AFTER_REFRESH
        FOR EVENT after_refresh OF cl_gui_alv_grid.
    METHODS handle_button_click                 " BUTTON_CLICK
      FOR EVENT button_click OF cl_gui_alv_grid
      IMPORTING
        es_col_id
        es_row_no.
    METHODS handle_data_changed_finished        " DATA_CHANGED_FINISHED
      FOR EVENT data_changed_finished OF cl_gui_alv_grid
      IMPORTING
        e_modified
        et_good_cells.
ENDCLASS.                    "cl_event_receiver DEFINITION
*----------------------------------------------------------------------*
*       CLASS cl_event_receiver IMPLEMENTATION
*----------------------------------------------------------------------*
CLASS cl_event_receiver IMPLEMENTATION.
  METHOD handle_right_click.
    BREAK-POINT.
  ENDMETHOD.                    "handle_right_click
  METHOD handle_left_click_design.
    BREAK-POINT.
  ENDMETHOD.                    "handle_left_click_design
  METHOD handle_move_control.
    BREAK-POINT.
  ENDMETHOD.                    "handle_move_control
  METHOD handle_size_control.
    BREAK-POINT.
  ENDMETHOD.                    "handle_size_control
  METHOD handle_left_click_run.
    BREAK-POINT.
  ENDMETHOD.                    "handle_left_click_run
  METHOD handle_onf1.
    BREAK-POINT.
  ENDMETHOD.                    "handle_onf1
  METHOD handle_onf4.
    BREAK-POINT.
  ENDMETHOD.                    "handle_onf4
  METHOD handle_data_changed.
    BREAK-POINT.
  ENDMETHOD.                    "handle_data_changed
  METHOD handle_ondropgetflavor.
    BREAK-POINT.
  ENDMETHOD.                    "handle_ondropgetflavor
  METHOD handle_ondrag.
    BREAK-POINT.
  ENDMETHOD.                    "handle_ondrag
  METHOD handle_ondrop.
    BREAK-POINT.
  ENDMETHOD.                    "handle_ondrop
  METHOD handle_ondropcomplete.
    BREAK-POINT.
  ENDMETHOD.                    "handle_ondropcomplete
  METHOD handle_subtotal_text.
    BREAK-POINT.
  ENDMETHOD.                    "handle_subtotal_text
  METHOD handle_before_user_command.
    BREAK-POINT.
  ENDMETHOD.                    "handle_before_user_command
  METHOD handle_user_command.
    BREAK-POINT.
  ENDMETHOD.                    "handle_user_command
  METHOD handle_after_user_command.
    BREAK-POINT.
  ENDMETHOD.                    "handle_after_user_command
  METHOD handle_double_click.
    BREAK-POINT.
  ENDMETHOD.                    "handle_double_click
  METHOD handle_delayed_callback.
    BREAK-POINT.
  ENDMETHOD.                    "handle_delayed_callback
  METHOD handle_delayed_changed_sel_cal.
    BREAK-POINT.
  ENDMETHOD.                    "handle_delayed_changed_sel_cal
  METHOD handle_print_top_of_page.
    BREAK-POINT.
  ENDMETHOD.                    "handle_print_top_of_page
  METHOD handle_print_top_of_list.
    BREAK-POINT.
  ENDMETHOD.                    "handle_print_top_of_list
  METHOD handle_print_end_of_page.
    BREAK-POINT.
  ENDMETHOD.                    "handle_print_end_of_page
  METHOD handle_print_end_of_list.
    BREAK-POINT.
  ENDMETHOD.                    "handle_print_end_of_list
  METHOD handle_top_of_page.
    BREAK-POINT.
  ENDMETHOD.                    "handle_top_of_page
  METHOD handle_context_menu_request.
    BREAK-POINT.
  ENDMETHOD.                    "handle_context_menu_request
  METHOD handle_menu_button.
    BREAK-POINT.
  ENDMETHOD.                    "handle_menu_button
  METHOD handle_toolbar.
    BREAK-POINT.
  ENDMETHOD.                    "handle_toolbar
  METHOD handle_hotspot_click.
    BREAK-POINT.
  ENDMETHOD.                    "handle_hotspot_click
  METHOD handle_end_of_list.
    BREAK-POINT.
  ENDMETHOD.                    "handle_end_of_list
  METHOD handle_after_refresh.
    BREAK-POINT.
  ENDMETHOD.                    "handle_after_refresh
  METHOD handle_button_click.
    BREAK-POINT.
  ENDMETHOD.                    "handle_button_click
  METHOD handle_data_changed_finished.
    BREAK-POINT.
  ENDMETHOD.                    "handle_data_changed_finished
ENDCLASS.                    "cl_event_receiver IMPLEMENTATION
*----------------------------------------------------------------------*
*       CLASS cl_base_event_receiver DEFINITION
*----------------------------------------------------------------------*
CLASS cl_base_event_receiver DEFINITION INHERITING FROM cl_gui_alv_grid_base.
  PUBLIC SECTION.
    METHODS set_protected_handlers.
  PROTECTED SECTION.
    METHODS handle_toolbar_menubutton_clk     " TOOLBAR_MENUBUTTON_CLICK
        FOR EVENT toolbar_menubutton_click OF cl_gui_alv_grid_base.
    METHODS handle_click_col_header             " CLICK_COL_HEADER
      FOR EVENT click_col_header OF cl_gui_alv_grid_base
      IMPORTING
        col_id.
    METHODS handle_delayed_move_curr_cell    " DELAYED_MOVE_CURRENT_CELL
        FOR EVENT delayed_move_current_cell OF cl_gui_alv_grid_base.
    METHODS handle_f1                           " F1
        FOR EVENT f1 OF cl_gui_alv_grid_base.
    METHODS handle_dblclick_row_col             " DBLCLICK_ROW_COL
      FOR EVENT dblclick_row_col OF cl_gui_alv_grid_base
      IMPORTING
        row_id
        col_id.
    METHODS handle_click_row_col                " CLICK_ROW_COL
      FOR EVENT click_row_col OF cl_gui_alv_grid_base
      IMPORTING
        row_id
        col_id.
    METHODS handle_toolbar_button_click         " TOOLBAR_BUTTON_CLICK
        FOR EVENT toolbar_button_click OF cl_gui_alv_grid_base.
    METHODS handle_double_click_col_sep   " DOUBLE_CLICK_COL_SEPARATOR
      FOR EVENT double_click_col_separator OF cl_gui_alv_grid_base
      IMPORTING
        col_id.
    METHODS handle_delayed_change_select     " DELAYED_CHANGE_SELECTION
        FOR EVENT delayed_change_selection OF cl_gui_alv_grid_base.
    METHODS handle_context_menu                 " CONTEXT_MENU
        FOR EVENT context_menu OF cl_gui_alv_grid_base.
    METHODS handle_total_click_row_col          " TOTAL_CLICK_ROW_COL
      FOR EVENT total_click_row_col OF cl_gui_alv_grid_base
      IMPORTING
        row_id
        col_id.
    METHODS handle_context_menu_selected        " CONTEXT_MENU_SELECTED
      FOR EVENT context_menu_selected  OF cl_gui_alv_grid_base
      IMPORTING
        fcode.
    METHODS handle_toolbar_menu_selected        " TOOLBAR_MENU_SELECTED
      FOR EVENT toolbar_menu_selected OF cl_gui_alv_grid_base
      IMPORTING
        fcode.
ENDCLASS.                    "cl_base_event_receiver DEFINITION
*----------------------------------------------------------------------*
*       CLASS cl_base_event_receiver IMPLEMENTATION
*----------------------------------------------------------------------*
CLASS cl_base_event_receiver IMPLEMENTATION.
  METHOD set_protected_handlers.
    SET HANDLER me->handle_toolbar_menubutton_clk     FOR go_grid.
    SET HANDLER me->handle_click_col_header           FOR go_grid.
    SET HANDLER me->handle_delayed_move_curr_cell     FOR go_grid.
    SET HANDLER me->handle_f1                         FOR go_grid.
    SET HANDLER me->handle_dblclick_row_col           FOR go_grid.
    SET HANDLER me->handle_click_row_col              FOR go_grid.
    SET HANDLER me->handle_toolbar_button_click       FOR go_grid.
    SET HANDLER me->handle_double_click_col_sep       FOR go_grid.
    SET HANDLER me->handle_delayed_change_select      FOR go_grid.
    SET HANDLER me->handle_context_menu               FOR go_grid.
    SET HANDLER me->handle_total_click_row_col        FOR go_grid.
    SET HANDLER me->handle_context_menu_selected      FOR go_grid.
    SET HANDLER me->handle_toolbar_menu_selected      FOR go_grid.
  ENDMETHOD.                    "set_protected_handlers
  METHOD handle_toolbar_menubutton_clk.
    BREAK-POINT.
  ENDMETHOD.                    "handle_toolbar_menubutton_clk
  METHOD handle_click_col_header.
    BREAK-POINT.
  ENDMETHOD.                    "handle_click_col_header
  METHOD handle_delayed_move_curr_cell.
    BREAK-POINT.
  ENDMETHOD.                    "handle_delayed_move_curr_cell
  METHOD handle_f1.
    BREAK-POINT.
  ENDMETHOD.                                                "handle_f1
  METHOD handle_dblclick_row_col.
    BREAK-POINT.
  ENDMETHOD.                    "handle_dblclick_row_col
  METHOD handle_click_row_col.
    BREAK-POINT.
  ENDMETHOD.                    "handle_click_row_col
  METHOD handle_toolbar_button_click.
    BREAK-POINT.
  ENDMETHOD.                    "handle_toolbar_button_click
  METHOD handle_double_click_col_sep.
    BREAK-POINT.
  ENDMETHOD.                    "handle_double_click_col_sep
  METHOD handle_delayed_change_select.
    BREAK-POINT.
  ENDMETHOD.                    "handle_delayed_change_select
  METHOD handle_context_menu.
    BREAK-POINT.
  ENDMETHOD.                    "handle_context_menu
  METHOD handle_total_click_row_col.
    BREAK-POINT.
  ENDMETHOD.                    "handle_total_click_row_col
  METHOD handle_context_menu_selected.
    BREAK-POINT.
  ENDMETHOD.                    "handle_context_menu_selected
  METHOD handle_toolbar_menu_selected.
    BREAK-POINT.
  ENDMETHOD.                    "handle_toolbar_menu_selected
ENDCLASS.                    "cl_base_event_receiver IMPLEMENTATION

繼續閱讀