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

GUI_DOWNLOAD problem

Former Member
0 Likes
860

Hi experts,

i met a weird problem: i need to download some data to local file. the file line length is 401, so i used GUI_DOWNLOAD and it worked fine in the past. and now, i change the line length to 512, other parameters not changed. the download file is encoding in a mess. i change file type from 'ASC' to 'DAT', but error remains. if i comment the third parameter 'trunc_trailing_blanks_eol', the output file encoding fine but the blank space for the last column is removed(which those space should be keeped).

who can help me?

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = 'D:\file.txt'

filetype = 'DAT' "'ASC'

trunc_trailing_blanks_eol = ' ' "keep blank space for last column

TABLES

data_tab = i_data

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
803

hi,

please see this link

thanks

Hi experts,

i met a weird problem: i need to download some data to local file. the file line length is 401, so i used GUI_DOWNLOAD and it worked fine in the past. and now, i change the line length to 512, other parameters not changed. the download file is encoding in a mess. i change file type from 'ASC' to 'DAT', but error remains. if i comment the third parameter 'trunc_trailing_blanks_eol', the output file encoding fine but the blank space for the last column is removed(which those space should be keeped).

who can help me?

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = 'D:\file.txt'

filetype = 'DAT' "'ASC'

trunc_trailing_blanks_eol = ' ' "keep blank space for last column

TABLES

data_tab = i_data

5 REPLIES 5
Read only

Former Member
0 Likes
803

Try declaring it as String.

Read only

0 Likes
803

failed. if define it as string, the trailing blanks will be removed automatically!

Read only

Former Member
0 Likes
804

hi,

please see this link

thanks

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
803

>

> i met a weird problem: i need to download some data to local file. the file line length is 401, so i used GUI_DOWNLOAD and it worked fine in the past. and now, i change the line length to 512, other parameters not changed. the download file is encoding in a mess. i change file type from 'ASC' to 'DAT', but error remains.

Hello Wei,

What do you mean by "file line length"? If you have the file line length you can try dwonloading using 'BIN' file type.

Why are you using "DAT" file-type?

BR,

Suhas

Read only

dev_parbutteea
Active Contributor
0 Likes
803

Hi,

try setting the WRITE_FIELD_SEPARATOR parameter.

Regards.