#1
|
|||
|
|||
Reporte ALV OO con cabecera y PDF
Hola amigos, tengo un problema, espero me puedan ayudar,.
Resulta que tengo un reporte alv oo con cabecera, y el reporte esta bien muestra la información y hasta ahí todo ok, el problema se provoca cuando quiero generarlo como pdf, es decir, agregue un botos a la botonera, pero no se como hacerlo para que el reporte se imprima en pdf, con cabecera y la data...he logrado hacer que cuando presione el botón de imprimir, al usuario le pida la ruta y la impresora, pero no se como recorrer la estructura de salida del alv y después poder imprimirlo en pdf, si alguien tiene algún ejemplo de recorrer la tabla de salida y imprimirlo...de ante mano gracias |
#2
|
|||
|
|||
Hola, puedes controlar la impresión con estos eventos:
print_end_of_list Define output text to be printed at the end of the entire list print_top_of_list Define output text to be printed at the beginning of the entire list print_end_of_page Define output text to be printed at the end of each page print_top_of_page Define output text to be printed at the beginning of each page Un saludo. |
#3
|
|||
|
|||
gracias jtristan por responder, tienes algún ejemplo de como hacer los que me dices...
gracias |
#4
|
|||
|
|||
Hola,
encontré la solución en "An Easy Reference for ALV GRID CONTROL". Es fácil encontrarlo. En el apartado sobre impresión tienes lo siguiente: D.8. About printing There are some events that you can utilize about printing. You simply write what is to be output in methods handling these events. Here is the list of events in this context. print_end_of_list Define output text to be printed at the end of the entire list print_top_of_list Define output text to be printed at the beginning of the entire list print_end_of_page Define output text to be printed at the end of each page print_top_of_page Define output text to be printed at the beginning of each page To utilize one of the events above, let’s proceed with the standard procedure since we did not add this event in our general scheme at section D.1. First add a handler method in your handler class definition as: e.g. METHOD handle_print_top_of_list FOR EVENT print_top_of_list OF cl_gui_alv_grid . Then implement the method in the implementation part of your local class. e.g. METHOD handle_print_top_of_list . WRITE:/ 'Flights Made on ', sy-datum . ENDMETHOD . And register this method as the handler. e.g. SET HANDLER gr_event_handler->handle_print_top_of_list FOR gr_alvgrid . The output of these events can be examined at the print preview or in the printing. Es decir, te declaras una clase para controlar enventos. CLASS lcl_event_receiver DEFINITION DEFERRED. data: event_receiver type ref to lcl_event_receiver. "Creas la definición y la implementación. class lcl_event_receiver definition. public section. methods: handle_print_top_of_list for print_top_of_list of cl_gui_alv_grid. private section. endclass. *** IMPLEMENTACIÓN *** class lcl_event_receiver implementation. method handle_print_top_of_list. WRITE:/ 'Flights Made on ', sy-datum . "aquí podrías escribir cualquier cosa que quieras a nivel de cabecera. endmethod. endclass. Luego en el dynpro en el PBO ya creas el objeto y le asignas el evento. set handler event_receiver->handle_print_top_of_list for grid. No sé si me he explicado muy bien. |
#5
|
|||
|
|||
hola lo he intentando pero sin resultados aun...asi por el momento la cabecera del reporte...a la espera...pero ahora tengo este problema...encontre la forma de enviar al spool el alv 00 pero no me cambia la orientacion de la impresion en sap..y le estoy pasando todos los datos de la impresora..
bueno el alv cuenta con 26 columnas, y quiero que se impriman las 26 columnas...y no lo hace necesito ayuda urgente...estoy ocupando la funcion REUSE_ALV_LIST_DISPLAY y en el is_print le paso los parametros de la impresora que se seteo anteriormente por el user en 65x255... |
Herramientas | Buscar en Tema |
Desplegado | |
|
|