Skip to Content
0
Former Member
May 21, 2010 at 10:38 AM

How to upload file containing Japanese characters in AL11

314 Views

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.