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

PROBLEM WITH FM GUI_UPLOAD

Former Member
0 Likes
1,529

THIS IS THE OUTPUT OF FM GUI_UPLOAD:

WHY THIS ERROR?

THANKS

THIS IS THE OUTPUT OF FM GUI_UPLOAD:

WHY THIS ERROR?

THANKS

4 REPLIES 4
Read only

former_member1716
Active Contributor
1,366

Hello luca treva,

Please be clear on what you ask.

What did you do from your end to get this screen?

Also please explain your requirement in detail.

Regards!

Read only

0 Likes
1,366

check your CODEPAGE parameter, should be Unicode (codepage = 4110?) for most cases.

Read only

0 Likes
1,366

NOT WORKING, I HAVE TRY WITH CODEPAGE= '4110' AND '4103'

THIS IS MY FM:

CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lv_dir
FILETYPE = 'ASC'
* HAS_FIELD_SEPARATOR = ' '
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
CODEPAGE = '4110'
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* CHECK_BOM = ' '
* VIRUS_SCAN_PROFILE =
* NO_AUTH_CHECK = ' '
* IMPORTING
* FILELENGTH =
* HEADER =
tables
data_tab = GT_OUT
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

Read only

Sandra_Rossi
Active Contributor
1,366

What kind of data does this file contain?

If it's a pure text file, you may detect the code page by running the program Z_CSR_FILE_DETECTOR (you need to first install abapgit as explained here: https://blogs.sap.com/2019/11/04/abap-csr-custom-tool-for-character-set-and-language-recognition/)