Application Development 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: 

ALV Output in Excel Problem

Former Member
0 Kudos

Hi All,

I used ALV Report - using FM "Reuse_Alv_Grid_Display" .

When I use 'List -> Export->Local file-> Spreadsheet to export the sap outuput into Excel . It will display everything fine , But the first line will be added by default as follows in excel:

System Date Dynamic list display page no .

This one I did't added in my code . I want to suppress this line in Excel sheet.

Pls provide me the solution .

Thanks

Nathan

3 REPLIES 3

former_member404244
Active Contributor
0 Kudos

Hi,

Use the FM inorder to dwonload ur internal table data to excel.Put a button in application tool bar of ur report output and then when user presses on that button,call the function module.

EXCEL_OLE_STANDARD_DAT.

reward if helpful.

Regards,

Nagaraj

Former Member

Former Member
0 Kudos

You can use function module to download in excel sheet

&--Function Module to download report output in Excel sheet format-

call function 'GUI_DOWNLOAD'

exporting

filename = filename

filetype = 'DAT'

tables

data_tab = it_data

fieldnames = it_temp

exceptions

file_write_error = 1

no_batch = 2

gui_refuse_filetransfer = 3

invalid_type = 4

no_authority = 5

unknown_error = 6

header_not_allowed = 7

separator_not_allowed = 8

filesize_not_allowed = 9

header_too_long = 10

dp_error_create = 11

dp_error_send = 12

dp_error_write = 13

unknown_dp_error = 14

access_denied = 15

dp_out_of_memory = 16

disk_full = 17

dp_timeout = 18

file_not_found = 19

dataprovider_exception = 20

control_flush_error = 21

others = 22.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

message 'Error' type 'I'.

endif.