2006 Jun 30 1:38 PM
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
2006 Jun 30 1:43 PM
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
2006 Jun 30 1:43 PM
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
2006 Jun 30 1:45 PM
2006 Jun 30 1:47 PM
what exacly you have on your file ??.
could you support me with example ?
2006 Jun 30 1:54 PM
I have some text and descriptions in Russian language , when i copy it from excel to notepad it comes as ?????
sonal
2006 Jun 30 1:58 PM
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
2006 Jun 30 1:50 PM
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.
2006 Jun 30 2:02 PM
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
2006 Jun 30 2:04 PM
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