07-19-2010 1:30 PM
Hello all,
Thanks everyone whoever helped me with the idea of displaying Header and footer in ALV grid using CL_DD_DOCUMENT
FORM HTML_TOP_OF_PAGE USING DOCUMENT TYPE REF TO CL_DD_DOCUMENT.
DATA: TEXT TYPE SDYDO_TEXT_ELEMENT.
CALL METHOD DOCUMENT->ADD_GAP
EXPORTING
WIDTH = 100.
TEXT = 'ALV HEADER'.
CALL METHOD DOCUMENT->ADD_TEXT
EXPORTING
TEXT = TEXT
SAP_STYLE = 'HEADING'.
ENDFORM. "HTML_TOP_OF_PAGE
I now have both Header and footer for the ALV perfectly.
But I am not able to print them. When i check Print Preview then it shows the normal report without header/footer.
Why is that? How to acheive it?
Thanks.
07-20-2010 9:03 AM
07-20-2010 9:57 AM
Thanks Marcin.
But i am looking to print the Header and footer as shown in my ScreenShot here and not the one that we write using WRITE statements.
http://img833.imageshack.us/img833/2443/printalvheader.jpg
I am using ALV Grid with HTML TOP OF PAGE & HTML END OF LIST
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = 'WRITE_HEADING_ALIGNED'
I_CALLBACK_HTML_END_OF_LIST = 'WRITE_FOOTER_ALIGNED'
IS_LAYOUT = LAYOUT
IT_FIELDCAT = I_FIELDCAT
IT_EVENTS = LT_EVENTS
IS_PRINT = GD_PRNTPARAMS
TABLES
T_OUTTAB = ITAB
.
ENDFORM. "ALV_GRID_DISPLAY
Can someone please tell me how to print them ?
Thanks.
07-21-2010 6:54 AM
Hi friend,
Simplify check sample report BCALV_TEST_FULLSCREEN_HTML
Regards,
07-21-2010 7:36 AM
Hi Thien Pham Minh ,
I already got that output on screen. But while printing using a printer, then i cant get that Html header and footer.
My question was how to print them on paper. If we can display on screen then we should be able to print them too. Isnt?
Thanks.
07-21-2010 8:24 AM