10-02-2009 1:51 PM
Hi friends! I need some help. I made an ALV using function (not OO). IN screen everything is fine, inclusive header with logo, but when I send it to printer, all header don't print! Why my header don't get printed?
Thanks for any help!
10-02-2009 4:09 PM
Thanks again Clemens Li .
I tried like this: (excluding logo)
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listhdr.
But in spool at SP01, header still missing...
10-02-2009 2:47 PM
Hi Fulvio,
printing an ALV grid will convert it to a list. Grid header is HTML, list header is ASCII. It depends on how you create the header, especially the logo will cause trouble.
Online, you should have the print prview (globe) icon. Try this to see what you may get.
Regards,
Clemens
10-02-2009 2:58 PM
Thanks for reply!
I made the header using i_callback_top_of_page = 'TOP_OF_PAGE' parameter in function REUSE_ALV_GRID_DISPLAY and in form TOP_OF_PAGE I have:
CHECK v_header <> 'X'.
w_listhdr-info = ''.
APPEND w_listhdr TO it_listhdr.
w_listhdr-typ = 'H'.
w_listhdr-info = 'Report Fiotec of users '.
APPEND w_listhdr TO it_listhdr.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'FIOTEC_LOGO1'
it_list_commentary = it_listhdr.
v_header = 'X'.
How can I print the header in ASCII? Logo is not really necessary, its just a plus...
10-02-2009 3:46 PM
Hi Fulvio,
just try without LOGO, 'REUSE_ALV_COMMENTARY_WRITE' will convert to list-readable format.
Regards,
Clemens
10-02-2009 4:09 PM
Thanks again Clemens Li .
I tried like this: (excluding logo)
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listhdr.
But in spool at SP01, header still missing...
10-02-2009 11:22 PM
v_header = 'X'.
why is this needed? remove it and try. i guess you are using it to show the top of page only once..
10-03-2009 12:07 AM
Hi Fulvio,
I just tried and it works with this form
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
...
I_CALLBACK_TOP_OF_PAGE = 'TOP'
...
FORM top.
data:
lt_LISTHEADER type SLIS_T_LISTHEADER.
FIELD-SYMBOLS:
<LISTHEADER> type line of SLIS_T_LISTHEADER.
APPEND INITIAL LINE TO lt_LISTHEADER.
APPEND INITIAL LINE TO lt_LISTHEADER ASSIGNING <LISTHEADER>.
<LISTHEADER>-typ = 'H'.
<LISTHEADER>-info = 'Report Fiotec of users '.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
* i_logo = 'FIOTEC_LOGO1'
it_list_commentary = lt_LISTHEADER.
ENDFORM. "top
In the grid, we have big-sized 'Report Fiotec of users ', space line before is ignored.
In print preview as in the spool file, 'Report Fiotec of users ' is output on top in default character size.
You may set a breakpoint in the Form to see if it is called and processed correctly. Possibly it is because you try to create the output only on first page - that mean only once in your case. Better check IF SY-PAGNO = 1 or use the event TOP_OF_LIST.
Regards,
Clemens