2008 Dec 29 7:15 AM
Hi,
I created ALV report using OO ABAP where i splitted the container into 3 parts , one for header , one for Grid and the other for Footer. When i export it to a spred sheet , i could not able to get the header and footer into the Spread sheet. I want the header and the footer to be exported to the spred sheet. Can any one of you help me out in this.
Thanks,
Kishore.
Hi,
I created ALV report using OO ABAP where i splitted the container into 3 parts , one for header , one for Grid and the other for Footer. When i export it to a spred sheet , i could not able to get the header and footer into the Spread sheet. I want the header and the footer to be exported to the spred sheet. Can any one of you help me out in this.
Thanks,
Kishore.
2008 Dec 29 10:10 AM
Use the events PRINT_TOP_OF_PAGE and PRINT_END_OF_PAGE for printing the Header and Footer.
Sample routine for the method PRINT_TOP_OF_PAGE is given below:
METHOD M_HANDLE_TOP_OF_PAGE.
*Local variables declaration
DATA:
V_TEXT TYPE SDYDO_TEXT_ELEMENT, " Text
V_DATE TYPE CHAR10, " Date
V_TIME TYPE CHAR10, " Time
V_TEXT2 TYPE CHAR30.
*To display Current Date
WRITE SY-DATUM TO V_DATE.
WRITE SY-UZEIT TO V_TIME.
CONCATENATE 'Current Date :'(076)
V_DATE
V_TIME
INTO V_TEXT2 SEPARATED BY SPACE.
WRITE:/ V_TEXT2.
*To print Report Date
CLEAR: V_DATE, V_TEXT2.
WRITE P_CURDT TO V_DATE.
CONCATENATE 'Report Date :'(077)
V_DATE
INTO V_TEXT2 SEPARATED BY SPACE.
WRITE:/ V_TEXT2.
*
ENDMETHOD. " M_HANDLE_TOP_OF_PAGE
If you are satisfied, please give points to my reply.
Regards,
Sumanth.
2008 Dec 29 10:13 AM
HI,
You cannot export the data from container to one excel sheet using ALV download options. For this You need to write your own code adding the download functionality to EXCEL.