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

BDC : Function Module to Upload Unicode text file

Former Member
0 Likes
1,362

Hi Friends,

Can anyone tell me how to upload data to internal table by taking it from unicode text file ?

at present i'm using FM - GUI_UPLOAD which do not support Unicode text file.

Sonal

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,040

It supports unicode.(i mean that file will be uploded correctly if written as unicode file)

Your problem is probably that in one text file you can use only one CODE PAGE.

BR, Jacek

Message was edited by: Jacek S³owikowski

8 REPLIES 8
Read only

Former Member
0 Likes
1,041

It supports unicode.(i mean that file will be uploded correctly if written as unicode file)

Your problem is probably that in one text file you can use only one CODE PAGE.

BR, Jacek

Message was edited by: Jacek S³owikowski

Read only

0 Likes
1,040

Thanks Jacek ,

Then in this case how to proceed ??

Sonal

Read only

0 Likes
1,040

what exacly you have on your file ??.

could you support me with example ?

Read only

0 Likes
1,040

I have some text and descriptions in Russian language , when i copy it from excel to notepad it comes as ?????

sonal

Read only

0 Likes
1,040

OK.

So. ..don't copy excel to text file.

in excel file plese use save as....then text unicode and all will be ok

BR, JAcek.

P>S please reward if it was helpful

Message was edited by: Jacek S³owikowski

Read only

Former Member
0 Likes
1,040

Hi,

Check This out

The new function modules, GUI_UPLOAD and GUI_DOWNLOAD, have an interface that also allows you to write Unicode format to the local hard drive. For a description of these interfaces, refer to the documentation for each function module, available under SAP Easy Access>Development>Function Builder>Goto>Documentation.

Instead of using the function modules, you can use the static methods GUI_UPLOAD and GUI_DOWNLOAD of the global class CL_GUI_FRONTEND_SERVICES.

Read only

Former Member
0 Likes
1,040

Hi,

U Have to use CodePage Parameter to upload the data.

Check the Description

Character Representation for Output

Description

Use parameter CODEPAGE to specify the desired source codepage. If this parameter is not set, the codepage of the SAP GUI is used as the source codepage.

Value range

4-digit number of the SAP codepage. The function module SCP_CODEPAGE_BY_EXTERNAL_NAME provides the SAP codepage number for an external character set name, for example, "iso-8859-1". The function module NLS_GET_FRONTEND_CP provides the respective non-Unicode frontend codepage for a language.

The desired codepage can be determined interactively, if the parameter with_encoding of method file_open_dialog is set by cl_gui_frontend_services.

If the specified codepage is not suited for the Byte Order Mark of the file, an exception is triggered.

SPACE: Codepage of the frontend operating system

Default

SPACE

Read only

0 Likes
1,040

with not set codepage it should work ok too.

I have polish front end and no problem with uploading russian text (different code page) to sap, without code page parameter set.

BR, JAcek