Skip to Content
0
Jul 29, 2009 at 08:21 PM

How Export to CSV format from WDA

253 Views

Hi masters!

i need to export an ALV table to CSV fromart

i use the following code

CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'

EXPORTING

i_field_seperator = ';'

TABLES

i_tab_sap_data = lt_t_book

CHANGING

i_tab_converted_data = lt_t_book_cvs

EXCEPTIONS

conversion_failed = 1

OTHERS = 2.

IF sy-subrc = 0.

"Download data using GUI_DOWNLOAD

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = 'C:\Documents and Settings\lucas.mena\Desktop\csv_test.txt'

filetype = 'ASC'

CODEPAGE = LC_1160

TABLES

data_tab = lt_t_book_cvs.

ENDIF.

as a result, i have received the following error message: Error in Control Framework

thanks,

Lucas