on 08-07-2018 1:36 PM
Hi,
we are working on SAP Upgrade, so as is known TRANSLATE statement is obsolete in Unicode. The code that was being used in non-unicode is:
data: line(500).
open dataset i_file for input in text mode.
if sy-subrc <> 0.
raise i_file_not_found.
endif.
open dataset o_file for output in text mode.
if sy-subrc <> 0.
raise o_file_not_found.
endif.
do.
read dataset i_file into line.
if sy-subrc <> 0.
exit.
else.
translate line from code page '1504' to code page '1500'.
replace ';' with ',' into line.
transfer line to o_file.
endif.
enddo.
close dataset i_file.
close dataset o_file.
Now I need to put ENCODING for the dataset statement and also change the translate statement. My question is which encoding should I use and which code pages. (now our system is 4103 and code page on front-end 4110). If somebody has had this type of problem during upgrade, please help me.
Thanks! 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
but as I can see, when I read the data in the Unicode system is already converted, all the characters are right, but the problem is transferring into the output file in AL11, when I open it, it has #, not the converterted data. I think that my problem is in this statement
open dataset o_file for output in textmode.
Now as encoding I have NON-Unicode, but it's not shown good.
Exactly: check your help and see the various options on Encoding.
Hint: DEFAULT IGNORING CONVERSION ERRORS.
Hi, simone.milesi ,
open dataset o_file for output in text mode encoding default ignoring conversion errors.
is the right solution for my problem. Thank you again!
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.