Skip to Content
0
Former Member
Feb 27, 2007 at 07:48 PM

download data to excel sheet

166 Views

Hi can anyone tell me as to how to download the data to excel sheet along with header.

i have a program that's using ws_download and its downloading fine but iam looking similar tghing with FM gui_download

help me out in this regard

This is my previous code

data : v_repid type syrepid,

d_file type string,

p_file like rlgrap-filename .

concatenate p_file '.xls' into p_file.

d_file = p_file.

call function 'WS_DOWNLOAD'

exporting

  • BIN_FILESIZE = ' '

  • CODEPAGE = ' '

filename = p_file

filetype = 'DBF'

  • mode = ' '

  • WK1_N_FORMAT = ' '

  • WK1_N_SIZE = ' '

  • WK1_T_FORMAT = ' '

  • WK1_T_SIZE = ' '

  • COL_SELECT = ' '

  • COL_SELECTMASK = ' '

  • NO_AUTH_CHECK = ' '

  • IMPORTING

  • FILELENGTH =

tables

data_tab = it_data

fieldnames = it_header

exceptions

file_open_error = 1

file_write_error = 2

invalid_filesize = 3

invalid_type = 4

no_batch = 5

unknown_error = 6

invalid_table_width = 7

gui_refuse_filetransfer = 8

customer_error = 9

others = 10

.

if sy-subrc eq 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

i have to replace this FM with gui_download

in the gui_downlaod tell me where i have to pass the header info

Thanks