Tema: Duda en ALV.
Ver Mensaje Individual
  #4  
Viejo 26/10/06, 20:30:10
Garces Garces is offline
Senior Member
 
Fecha de Ingreso: ago 2006
Localización: Lima - Perú
Mensajes: 321
Wink ALV - Título en 2 renglones

Lo que puedes hacer es trabajar con el evento TOP_OF_PAGE de la siguiente manera:

**********************************************************
* FORM TOP_OF_PAGE
**********************************************************
form TOP_OF_PAGE.

data:
t_titulo type slis_t_listheader,
s_titulo type slis_listheader,

s_titulo-typ = 'H'.
s_titulo-info = 'Línea 1 del título'.
append s_titulo to t_titulo.
clear s_titulo.

s_titulo-typ = 'H'.
s_titulo-info = 'Línea 2 del título'.
append s_titulo to t_titulo.
clear s_titulo.

* Puedes agregar tantas líneas como desees...

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = t_titulo.

endform. "TOP_OF_PAGE


**********************************************************
Luego, en la llamada a 'REUSE_ALV_GRID_DISPLAY' le pones en el parámetro I_CALLBACK_TOP_OF_PAGE el nombre del form que usaste para armar tu título, de la siguiente manera:
**********************************************************
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
IS_LAYOUT = <la estructura que tengas para el layout>
IT_FIELDCAT = <la tabla con los campos que vas a mostrar de tu tabla>
TABLES
T_OUTTAB = <la tabla con los datos de salida>
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.


Espero ser de ayuda
Saludos...
__________________
Miguel Ángel Garcés Ramírez
Responder Con Cita