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

conversion error in transfer statement

Former Member
0 Likes
1,864

hi experts!

Conversion error happens  with exception CX_sy_conversion_codepage at statement: TRANSFER <fs> to file. The error only happens at a certain line (61 of the table beeing looped on). Any ideas are appreciated. Thanks.

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,417

Could you check what is the code page of your system (transaction SNLS), in which code page is opened your text file (what is the exact OPEN DATASET statement), and which hexadecimal value contains <fs> when the dump occurs (provided in the short dump).

4 REPLIES 4
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,418

Could you check what is the code page of your system (transaction SNLS), in which code page is opened your text file (what is the exact OPEN DATASET statement), and which hexadecimal value contains <fs> when the dump occurs (provided in the short dump).

Read only

0 Likes
1,417

Code page for database is Unicode, and the statement OPEN DATASET filename FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE. The hexadec of that line seems similar to previous.

Read only

0 Likes
1,417

As said in the ABAP documentation, using NON-UNICODE is using the code page depending on the "text environment", i.e. the code page in table TCP0C depending on the session language (and possibly country). If it's English, then the code page is ASCII-like. Consequently, any non-ASCII character will generate an exception.

So the question is : why did you choose NON-UNICODE rather than DEFAULT?

Read only

0 Likes
1,417

the problem was that input file was type unicode but the program not outputting in unicode. Thanks Sandra.