Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

File transfer Open dataset CSV file Problem

Former Member
0 Likes
1,380

Hi Experts,

I have an issue in transferring Korean characters to a .CSV file using open dataset.

data : c_file(200) TYPE c value '
INTERFACES\In\test8.CSV'.

I have tried

open dataset c_file for output LEGACY TEXT MODE CODE PAGE '4103'.

open dataset c_file for output in TEXT MODE ENCODING NON-UNICODE.

open dataset c_file for output in TEXT MODE ENCODING Default.

Nothing is working.

But to download to the presentation server the below code is working. How can the same be achieved for uploading the file to application server.

CALL METHOD cl_gui_frontend_services=>gui_download

EXPORTING

filename = 'D:/test123.xls'

filetype = 'ASC'

write_field_separator = 'X'

dat_mode = 'X'

codepage = '4103'

write_bom = 'X'

CHANGING

data_tab = t_tab

EXCEPTIONS

file_write_error = 1

no_batch = 2

gui_refuse_filetransfer = 3

invalid_type = 4

no_authority = 5

unknown_error = 6

header_not_allowed = 7

separator_not_allowed = 8

filesize_not_allowed = 9

header_too_long = 10

dp_error_create = 11

dp_error_send = 12

dp_error_write = 13

unknown_dp_error = 14

access_denied = 15

dp_out_of_memory = 16

disk_full = 17

dp_timeout = 18

file_not_found = 19

dataprovider_exception = 20

control_flush_error = 21

not_supported_by_gui = 22

error_no_gui = 23

OTHERS = 24.

Hi Experts,

I have an issue in transferring Korean characters to a .CSV file using open dataset.

data : c_file(200) TYPE c value '
INTERFACES\In\test8.CSV'.

I have tried

open dataset c_file for output LEGACY TEXT MODE CODE PAGE '4103'.

open dataset c_file for output in TEXT MODE ENCODING NON-UNICODE.

open dataset c_file for output in TEXT MODE ENCODING Default.

Nothing is working.

But to download to the presentation server the below code is working. How can the same be achieved for uploading the file to application server.

CALL METHOD cl_gui_frontend_services=>gui_download

EXPORTING

filename = 'D:/test123.xls'

filetype = 'ASC'

write_field_separator = 'X'

dat_mode = 'X'

codepage = '4103'

write_bom = 'X'

CHANGING

data_tab = t_tab

EXCEPTIONS

file_write_error = 1

no_batch = 2

gui_refuse_filetransfer = 3

invalid_type = 4

no_authority = 5

unknown_error = 6

header_not_allowed = 7

separator_not_allowed = 8

filesize_not_allowed = 9

header_too_long = 10

dp_error_create = 11

dp_error_send = 12

dp_error_write = 13

unknown_dp_error = 14

access_denied = 15

dp_out_of_memory = 16

disk_full = 17

dp_timeout = 18

file_not_found = 19

dataprovider_exception = 20

control_flush_error = 21

not_supported_by_gui = 22

error_no_gui = 23

OTHERS = 24.

1 REPLY 1
Read only

nils_buerckel
Product and Topic Expert
Product and Topic Expert
0 Likes
651

Hi,

I would recommend to use OPEN DATASET ... ENCODING UTF-8 ...

If your excel version is unable to open this format, you can convert from 4110 to 4103 with report RSCP_CONVERT_FILE.

Please also have a look at

Best regards,

Nils Buerckel