‎2008 Feb 13 9:11 AM
Hi again.
I've got the following issue.
I have a table with data (in which i have char fields and decimal fields) and when i try to download this data to a local file, either using WS_DOWNLOAD or CL_GUI_FRONTEND_SERVICES=>DOWNLOAD, the generated file doesn't have the correct format (i've got strange characters instead of the decimal fields and i don't know why)
Should i use a different FM instead?
Thanks again.
Regards.
‎2008 Feb 13 9:15 AM
First of all whats the extension of the file...
try with GUI_DOWNLOAD instead of WS_UPLOAD.
Regards,
Amit
‎2008 Feb 13 9:17 AM
The downloaded file is a .txt file.
GUI_DOWNLOAD is not working either.
Edited by: Javier Suárez Zapico on Feb 13, 2008 10:20 AM
‎2008 Feb 13 11:00 AM
Hi
I finally made it work, by storing the decimal fields in char fields an using any of these functions.
‎2008 Feb 13 12:02 PM
Hello Javier Suárez Zapico ,
Instead of using the Wa_download Please use the Following function.
In the file name define your own format what you want to be.
call function 'GUI_DOWNLOAD'
exporting
BIN_FILESIZE =
filename = 'C:SAPTEST_DATA2.xls'
FILETYPE = 'ASC'
APPEND = 'A'
WRITE_FIELD_SEPARATOR = ','
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = 'X'
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
IMPORTING
FILELENGTH =
tables
data_tab = ITAB
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.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Regards
Swati ....