#1
|
|||
|
|||
Cabecera De Alv
Hola a todos, tengo que poner una cabecera en un ALV. No lo he hecho nunca y buscando por estos foros lo que veo no me resuelve la duda. Mi ALV es orientado a objetos y utilizo la siguiente llamada a metodo para mostrarlo:
CALL METHOD gr_alvgrid->set_table_for_first_display EXPORTING * I_BUFFER_ACTIVE = * I_CONSISTENCY_CHECK = * I_STRUCTURE_NAME = 'ZAS_BLOQAGENDAS_ALV' is_variant = gs_variant i_save = 'A' * I_DEFAULT = on is_layout = gs_layout * IS_PRINT = * IT_SPECIAL_GROUPS = * it_toolbar_excluding = pt_exclude * IT_HYPERLINK = CHANGING it_outtab = lt_datalv[] it_fieldcatalog = gt_fieldcat * it_sort = pt_sort * IT_FILTER = Para los eventos utilizo: CLASS lcl_event_handler . No se si en esta clase hay algo para coger el evento de mostrar una cabecera, como he visto en otros ejemplos utilizando: FORM alv_events . DATA: ls_event TYPE slis_alv_event. CLEAR gt_events. REFRESH gt_events. CLEAR ls_event. ls_event-name = slis_ev_top_of_page. ls_event-form = 'TOP-OF-PAGE'. APPEND ls_event TO gt_events. ENDFORM. " alv_events FORM top-of-page . CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE' EXPORTING it_list_commentary = gt_header_top i_logo = 'ENJOYSAP_LOGO' * I_END_OF_LIST_GRID = * I_ALV_FORM = . ENDFORM. " top-of-page Donde pongo yo gt_events en mi ALV??????. Sabeis como se haría en HTML?? Úlima edición por chelisse fecha: 21/09/07 a las 09:25:33. |
#2
|
|||
|
|||
Hay un pequeño truco para hacerlo con objetos:
1 Creas un custom container para almacenar la cabecera 2 Te creas un objeto type ref to cl_gui_alv_tree_simple 3 Rellenas las estrucutras necesarias y invocas al metodo create_report_header |
#3
|
|||
|
|||
gracias, por tu respuesta, eso ya lo intenté y no quedó muy bién. Al final lo he resuelto poniendo en la dynpro campos de texto directamente, justo encima del alv
|
#4
|
||||
|
||||
El título se pone en un atributo del layout del alv.
Tienes 2 opciones, usar el atributo 'title' o si quieres un texto más pequeño igualas a 'X' el atributo 'smalltitle'. Ejemplo: it_layout-title = 'Título del ALV'. it_layout-smalltitle = 'X'. Espero que te sea de ayuda. Saludos, David. |
#5
|
|||
|
|||
esto ultimo es para el título, yo preguntaba por una cabecera del alv. Gracias de todas formas por molestarte en responder. Como ya he dicho lo he resuelto.
|
Herramientas | Buscar en Tema |
Desplegado | |
|
|