*----------------------------------------------------------------------* * DECLARATIONS * *----------------------------------------------------------------------* CLASS lcl_event_receiver DEFINITION DEFERRED. DATA: go_custom_c TYPE REF TO CL_GUI_CUSTOM_CONTAINER, go_split1 TYPE REF TO CL_GUI_EASY_SPLITTER_CONTAINER, go_split2 TYPE REF TO CL_GUI_EASY_SPLITTER_CONTAINER, go_grid1 TYPE REF TO CL_GUI_ALV_GRID, go_grid2 TYPE REF TO CL_GUI_ALV_GRID, go_event_receiver TYPE REF TO LCL_EVENT_RECEIVER. *----------------------------------------------------------------------* * MODULE STATUS_0100 OUTPUT * *----------------------------------------------------------------------* MODULE status_0100 OUTPUT. DATA: ls_layout TYPE LVC_S_LAYO, lt_fieldcat1 TYPE LVC_T_FCAT, lt_fieldcat2 TYPE LVC_T_FCAT. SET PF-STATUS 'ZPF01'. SET TITLEBAR 'ZTITLE01'. IF go_custom_c IS INITIAL. * Creo il container CREATE OBJECT go_custom_c EXPORTING CONTAINER_NAME = 'CONTAINER'. * Lo divido in tre CREATE OBJECT go_split1 EXPORTING PARENT = go_custom_c ORIENTATION = CL_GUI_EASY_SPLITTER_CONTAINER=>ORIENTATION_VERTICAL SASH_POSITION = 12. CREATE OBJECT go_split2 EXPORTING PARENT = go_split1->bottom_right_container ORIENTATION = CL_GUI_EASY_SPLITTER_CONTAINER=>ORIENTATION_HORIZONTAL SASH_POSITION = 55. PERFORM top_of_page USING 0 0 0. PERFORM exclude_tb_func. PERFORM build_fielcat CHANGING lt_fieldcat1 lt_fieldcat2. * ALV Grid di sinistra - note di credito CREATE OBJECT go_grid1 EXPORTING I_PARENT = go_split2->top_left_container. ls_layout-stylefname = 'STYLE'. ls_layout-grid_title = 'Note di credito'. CALL METHOD go_grid1->set_table_for_first_display EXPORTING IS_LAYOUT = ls_layout IT_TOOLBAR_EXCLUDING = gt_excl_func CHANGING IT_FIELDCATALOG = lt_fieldcat1 IT_OUTTAB = gt_noteb. * ALV Grid di destra - partite CREATE OBJECT go_grid2 EXPORTING I_PARENT = go_split2->bottom_right_container. ls_layout-grid_title = 'Partite aperte'. CALL METHOD go_grid2->set_table_for_first_display EXPORTING IS_LAYOUT = ls_layout IT_TOOLBAR_EXCLUDING = gt_excl_func CHANGING IT_FIELDCATALOG = lt_fieldcat2 IT_OUTTAB = gt_fattb. CREATE OBJECT go_event_receiver. SET HANDLER go_event_receiver->handle_button_click go_event_receiver->handle_data_changed_finished go_event_receiver->handle_double_click go_event_receiver->handle_hotspot_click go_event_receiver->handle_toolbar go_event_receiver->handle_user_command FOR go_grid1. SET HANDLER go_event_receiver->handle_button_click go_event_receiver->handle_data_changed_finished go_event_receiver->handle_double_click go_event_receiver->handle_hotspot_click go_event_receiver->handle_toolbar go_event_receiver->handle_user_command FOR go_grid2. * Imposto la toolbar personalizzata CALL METHOD go_grid1->set_toolbar_interactive. CALL METHOD go_grid2->set_toolbar_interactive. * Registro l'evento Enter che mi serve per gli importi manuali CALL METHOD go_grid1->register_edit_event EXPORTING I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER. CALL METHOD go_grid2->register_edit_event EXPORTING I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER. ENDIF. ENDMODULE. "status_0100 OUTPUT
giovedì 14 maggio 2015
Dividere un Custom Container in tre parti
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento