Buenas tardes a todos, se ha requerido que en una pantalla haya 2 alv para visualizar documentos (cabecera y detalle de documentos), y tambien arriba del primer ALV haya un control box por el cual el usuario filtre los documentos respecto a un cliente. Ya tengo hecho los 2 alv (lo mas fálcil a mi parecer) pero no consigo poner el text control por encima del primer ALV. Adjunto el código de la construcción de los ALV.
Cuando ejecuto el reporte se muestra igual a la siguiente imagen, y como verán el text control se va a la parte derecha.
Espero puedan ayudarme.
Un abrazo a todos,
Código:
Create docking container CREATE OBJECT go_docking EXPORTING parent = cl_gui_container=>screen0 ratio = 90 EXCEPTIONS OTHERS = 6. IF sy-subrc EQ 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. CREATE OBJECT go_splitter EXPORTING parent = go_docking rows = 2 columns = 1 EXCEPTIONS cntl_error = 1 cntl_system_error = 2 OTHERS = 3. IF sy-subrc EQ 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. CALL METHOD go_splitter->get_container EXPORTING row = 1 column = 1 RECEIVING container = go_cell_top. CALL METHOD go_splitter->get_container EXPORTING row = 2 column = 1 RECEIVING container = go_cell_bottom. * Create ALV grids CREATE OBJECT go_grid1 EXPORTING i_parent = go_cell_top EXCEPTIONS OTHERS = 5. IF sy-subrc EQ 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. * Set event handler SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid1. CREATE OBJECT go_grid2 EXPORTING i_parent = go_cell_bottom EXCEPTIONS OTHERS = 5. IF sy-subrc EQ 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. PERFORM excluir_botones. PERFORM fieldcat_top. * Display data CALL METHOD go_grid1->set_table_for_first_display EXPORTING i_structure_name = 'ZTBSD_CABECERA' is_layout = gs_layout it_toolbar_excluding = gt_exclude CHANGING it_fieldcatalog = gt_fieldcatalogTOP it_outtab = gt_alumnos EXCEPTIONS OTHERS = 4. IF sy-subrc EQ 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. PERFORM fieldcat_down. CALL METHOD go_grid2->set_table_for_first_display EXPORTING i_structure_name = 'ZTBST_DETALLE' is_layout = gs_layout it_toolbar_excluding = gt_exclude CHANGING it_fieldcatalog = gt_fieldcatalogDOWN it_outtab = gt_out_down EXCEPTIONS OTHERS = 4. IF sy-subrc EQ 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. CREATE OBJECT events. SET HANDLER events->handle_data_changed FOR go_grid2. SET HANDLER events->handle_data_changed_finished FOR go_grid2. CALL METHOD cl_gui_control=>set_focus EXPORTING control = go_grid2. CALL METHOD go_grid2->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_modified. CALL METHOD go_grid2->refresh_table_display. CALL METHOD go_docking->link EXPORTING repid = syst-repid dynnr = '0100' EXCEPTIONS OTHERS = 4. IF sy-subrc EQ 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. CALL SCREEN '0100'.
Espero puedan ayudarme.
Un abrazo a todos,
Comentario