Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Export ALV Grid Header to spread sheet

Former Member
0 Likes
976

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.

2 REPLIES 2
Read only

ananthula_sumanth
Participant
0 Likes
560

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.

Read only

Former Member
0 Likes
560

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.