Skip to Content
0
Former Member
Nov 02, 2009 at 09:09 AM

Unable to download data into .csv from internal table

16 Views

Hi Experts,

Am trying to download data from a internal table to .csv file.

The function am using is

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = filename

filetype = 'ASC'

APPEND = ' '

write_field_separator = 'X'

HEADER = '00'

TRUNC_TRAILING_BLANKS = ' '

WRITE_LF = 'X'

COL_SELECT = ' '

COL_SELECT_MASK = ' '

DAT_MODE = ' '

TABLES

data_tab = wa

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

no_authority = 10

OTHERS = 11.

data msg(50) type c .

concatenate 'Data downloaded successfully at ' filename into msg .

write sy-subrc.

IF sy-subrc = 0.

MESSAGE : msg TYPE 'S'.

ENDIF.

Though there is no error in the program. Its just create a file with the filename with 0 Kb data.

Can anyone suggest why is this happening?

Regards,

R Manoj