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: 

Non English Charaters in Flat file(Note pad)

Former Member
0 Kudos

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.

7 REPLIES 7

Former Member
0 Kudos

If you are using GUI_UPLOAD, try passing '1100' in the codepage parameter.

Vikranth

0 Kudos

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

andreas_mann3
Active Contributor
0 Kudos

use F1 for abap command :

OPEN DATASET - encoding

A.

0 Kudos

HI, the file is from Presentation server not from APplication server.

Former Member
0 Kudos

Hi, Can anybody help on this issue?

Former Member
0 Kudos

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.

0 Kudos

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.