Application Development 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: 

How to download ANSI coding text file using function GUI_DOWNLOAD?

0 Kudos

Hi All,

Is the coding page of the file created by funtion GUI_DOWNLOAD or WS_DOWNLOAD is ANSI or UTF-8? How to download a text file which's coding page is ANSI please?

Is this correct?

CALL function 'GUI_DOWNLOAD'

exporting

....

codepage = '4110'

importing

1 ACCEPTED SOLUTION

0 Kudos

solved. I found it's related to the front end system. My computer is Chinese simplified version, I use the encoding page 8100.

3 REPLIES 3

Former Member
0 Kudos

This Function Lodule will give the CODE PAGE VALUE

SCP_CODEPAGE_BY_EXTERNAL_NAME ... You have to give type of tht ENcoding like ANSI ..etc

call function 'GUI_DOWNLOAD'

exporting

filename = 'd:\customer_details.txt'

filetype = 'ASC'

CODEPAGE = code

tables

data_tab = t_customer_details

  • FIELDNAMES =

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

others = 22

.

if sy-subrc <> 0.

write : / 'Upload Failed' , sy-subrc.

else.

write : / 'Upload Completed'.

endif.

endif.

Reward if helpful...

0 Kudos

What's the value you filled in variant code and what does the SCP_CODEPAGE_BY_EXTERNAL_NAME mean please?

0 Kudos

solved. I found it's related to the front end system. My computer is Chinese simplified version, I use the encoding page 8100.