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: 

GUI_UPLOAD and Unicode

Former Member
0 Kudos
3,226

Hi,

I want to use GUI_UPLOAD to load an ASCII file with Czech Characters. I try to save my file in .txt format UTF-8. If i read the file with notepad then i have all my characters but when i load in SAP I lost some characters - Who have a solution - I'm in 4.6C - I put in SAPlogon page code 1404 and language CS .

DATA: BEGIN OF f1 OCCURS 0,

altkn(10) TYPE c,

bldat(10) TYPE c, "tt.mm.jj

rart(15) TYPE c,

  • insert michel

zuonr(18),

*

xblnr(20) TYPE c,

  • name1(40) TYPE c,

waers(5) TYPE c,

brutt(13) TYPE c,

fwbtr(13) TYPE c,

faedt(10) TYPE c,

zterm(4) TYPE c,

kunnr(10) TYPE c,

sgtxt(49) TYPE c, => i can find VANĚK

....

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = pcfil

  • FILETYPE = 'BIN'

has_field_separator = fsepa

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

  • DAT_MODE = ' '

CODEPAGE = 'UTF8'

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

CHECK_BOM = 'X'

IMPORTING

filelength = rc

  • HEADER =

TABLES

data_tab = f1

EXCEPTIONS

file_open_error = 1

....

Thanks

1 ACCEPTED SOLUTION

sridhar_k1
Active Contributor
0 Kudos
509

Do not use UTF-8 when saving in notepad, do u have a non unicode option in notepad, we have ANSI in US english.

is ur PC system language also czech?

Regards

Sridhar

6 REPLIES 6

sridhar_k1
Active Contributor
0 Kudos
510

Do not use UTF-8 when saving in notepad, do u have a non unicode option in notepad, we have ANSI in US english.

is ur PC system language also czech?

Regards

Sridhar

0 Kudos
509

My Pc is in French Language.

I try - saving Excel File in unicode - Opening this file with notepad and saving in ANSI - Result : It's the best until now, I does not lose the character in its entirety, only certain accent. we are touching the solution - have you something else ?

Former Member
0 Kudos
509

Hi,

Try Saving the notepad file in Unicode Encoding..

I guess that should solve the problem..

Hope that helps

Regards,

Tanveer.

<b>Please mark helpful answers</b>

Former Member
0 Kudos
509

u have to uplaod the font of Czech Characters

into ur local pc.

1)At the Operating system level install the Czech language.[Control panel - >Regional and language Option - >language Tab - > Click on Install Files for Czech languages] If these language already installed then click on Detail and add the Czech languages 2) At SAP level click on Customizing of Local layout[Alt+F12] and click on options.Go to tab I18N and click on Activate the multi-byte functionalities to support check box.

0 Kudos
509

Same problem - To keep all the accents, i must save in UTF-8 and i have the same problem with gui_upload.I've just seen that my function GUI_UPLOAD in this system (4.6C) is not the same than in 4.7 - Only these parameters for export -

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME =

  • FILETYPE = 'ASC'

  • HAS_FIELD_SEPARATOR = ' '

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

  • DAT_MODE = ' '

I don't have the possibility to choose the codepage. Perhaps it's the reason ?

0 Kudos
509

Are you using windows XP?

In the PC regional settings, go to advanced tab and change Language for non-unicode programs to Czech. You might need to restart the system.

If you are using SAPGUI 6.2 and above, keep the logon pad language settings default.

save the file in notepad using default first, if all characters are not showing up, try ansi.

What code page is your 4.6c appserver is using for language CS?

Regards

Sridhar