Hallo,
evtl. geht das mit einem kleinen Abap besser, Beispiel
data : itab type mara occurs 0 with header line.
select * into itab
from mara
up to 10 rows.
append itab.
endselect.
data : begin of itab1 occurs 0,
line(50) type c,
end of itab1.
itab1-line = 'field1 description'.
append itab1.
itab1-line = 'field2 desc'.
append itab1.
itab1-line = 'field3 desc'.
append itab1.
call function 'GUI_DOWNLOAD'
exporting
filename = 'c:abc1.xls'
filetype = 'ASC'
write_field_separator = 'X'
* IMPORTING
* FILELENGTH =
tables
data_tab = itab
fieldnames = itab1 <--for headings
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.
endif.
Gruß Wolfgang