08-05-2010 11:59 AM
Dear Friends,
I have a flat file from presentation server which needs to be uploaded and do some validations on that file based on the data existing.
I have some Russian language words in that file. E.g: "ОЩИ В ПОДГ". If this word exists in the file i need to get some other data from a database table. But when trying to check for the word, these characters are appearing as junk characters like ####&^^.
I tried logging into RU language also, but still not working. And also tried changing the file as type Unicode, ASCII and also not worked.
Please let me know how to get identify these words to see the exact russian words.
Thanks for your help.
Srinivas.
08-05-2010 12:02 PM
If you are using GUI_UPLOAD, try passing '1100' in the codepage parameter.
Vikranth
08-05-2010 12:24 PM
HI Vikrant,
THanks for your help. But the function module(GUI_UPLOAD) exists in a standard report RFEKA400. So, i can't change exactly.
But i tried changing it in debugging and tried, Still the junk Chars are coming.
Thanks for your help,
Yaks
08-05-2010 12:05 PM
08-05-2010 12:21 PM
HI, the file is from Presentation server not from APplication server.
08-05-2010 1:41 PM
08-05-2010 1:49 PM
Hello,
Is your file .txt file.If yes,while saving it gives a pop up for file name.There you have option for encoding, there select encoding as
Unicode and try to upload.
It worked for me.I tried with the data provided by you.
data:begin of it_tab occurs 0,
val type string,
end of it_tab.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'C:\Documents and Settings\xxx\Desktop\SDN1.txt'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ' '
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE = VIRUS_SCAN_PROFILE
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH = FILELENGTH
HEADER = HEADER
TABLES
data_tab = it_tab
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
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks.
Ramya.
08-05-2010 2:39 PM
HI Ramya,
Thanks for your help.
It is working in one way. But the program is doing uploading the file and then downloading also.
At the time of uploading it is fine, but when it is downloading, it wasin non-unicode format using GUI_DOWNLOAD FM.
I have added a parameter ID UCP with value 4110 in my user profile and now it is working fine.
Thanks.