Code: Alles auswählen.
data ianla like anla occurs 1.
select * from anla into corresponding fields of table ianla
where bukrs = '0003'.
concatenate p_path 'ANLA.DAT'
into filen.
perform download tables ianla.
form download tables p_itab.
call function 'WS_DOWNLOAD'
exporting
filename = filen
filetype = 'DAT'
fieldnames = 'DAT'
tables
data_tab = p_itab
exceptions
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_table_width = 4
invalid_type = 5
no_batch = 6
unknown_error = 7
gui_refuse_filetransfer = 8
others = 9.
endform.