05-21-2010 11:38 AM
Hi All,
I'm trying to modify a program that extracts a text file from local drive then upload the file to sap directory. The input text file contains Japanese characters. When I view the file created, it looks like the one below:
#º#®#~#^#ì#q ¼ÓÔ¼·Ï·º
#ì#ç#ß#q ÐÅÐÁÂÞº
The code that I am fixing is below:
open dataset pv_name for output in text mode encoding non-unicode
ignoring conversion errors.
open dataset pv_name for output in legacy text mode code page '8000' ignoring conversion errors.
*OPEN DATASET pv_name FOR OUTPUT IN TEXT MODE ENCODING UTF-8 WITH BYTE-ORDER MARK.
if sy-subrc = 0.
LOOP AT pt_input.
TRANSFER pt_input TO pv_name.
IF SY-SUBRC NE 0.
WRITE:/ 'Error writing file'(011), pv_name.
STOP.
ENDIF.
ENDLOOP.
endif.
Close dataset
CLOSE DATASET pv_name.
Any suggestions on how to resolve this one?
Thanks a lot in advance.
05-21-2010 12:04 PM
05-21-2010 12:09 PM
I removed the 'ignoring conversion error' and still the output is the same:
#º#®#~#^#ì#q ¼ÓÔ¼·Ï·º
#ì#ç#ß#q ÐÅÐÁÂÞº
µ¶ÞÜ Åµº #¬#ì#@#¼#q
05-21-2010 12:18 PM
I didnt said that this will resolve your errors. But using this is the same of ignoring comiler errors....
As you didnt said anything about codepages you're using no help is possible, you didnt mentioned if your SAP system is Unicode, Non-Unicode or even a MDMP system.
You need to figure out which codepage the file has on the presentation server and which codepage your SAP system is using. And it can be that no conversion is possible cause both systems do not have any character in common.
05-21-2010 12:43 PM
Our SAP system have Unicode and West European character set checked. Im not sure if this is the codepage you are referring to. If this is not, can you help me out where or what to do to check this codepage.
Thanks.
05-21-2010 12:54 PM
05-21-2010 12:58 PM
check in transaction I18N -> Trouble Shooting --> I18N System Configuration --> F8 - somewhere in the list there's the codepage mentioned ...
05-21-2010 2:17 PM
This is what i saw in the transaction. Dont know if this is correct:
Profile parameters
Application servers Profile val.
<wp> : CODEPAGE
All 4103
As for the presentation server codepage, where will I check it?