Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

download int table into csv file with each column in separate column in csv

Hi All,

I want to download the data in internal table to CSV file. but each column in the table should come as separate column in csv format.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = GD_FILE

FILETYPE = 'ASC'

WRITE_FIELD_SEPARATOR = 'X'

tables

DATA_TAB = I_LINES_NEW

EXCEPTIONS

FILE_OPEN_ERROR = 1

FILE_READ_ERROR = 2

NO_BATCH = 3

GUI_REFUSE_FILETRANSFER = 4

INVALID_TYPE = 5

NO_AUTHORITY = 6

UNKNOWN_ERROR = 7

BAD_DATA_FORMAT = 8

HEADER_NOT_ALLOWED = 9

SEPARATOR_NOT_ALLOWED = 10

HEADER_TOO_LONG = 11

UNKNOWN_DP_ERROR = 12

ACCESS_DENIED = 13

DP_OUT_OF_MEMORY = 14

DISK_FULL = 15

DP_TIMEOUT = 16

OTHERS = 17.

IF SY-SUBRC NE 0.

WRITE: 'Error ', SY-SUBRC, 'returned from GUI_DOWNLOAD SAP OUTBOUND'.

SKIP.

ENDIF.

with the above values passd , I am getting csv file but all the columns in one column separated by some square symbol.

How to separate them into different columns.

Thanks in advance

rgds,

Madhuri

Tags:
Former Member replied

Can you execute the sample code and check the file contents???

~Eswar

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question