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

Code Conversion Error

colin_cheong
Contributor
0 Likes
625

Before UNICODE conversion, my Z program is able to output the article description onto a text file in my UNIX system.

After Unicode conversion, it seems that there are some hex.value recognized by the current unicode codepage 4102 but cannot be found in codepage 8400 (my output in Unix).

I wanted to create a program to read in the description and check if it can be convertible to code page 8400.

If it cannot, then I would dump a report and get my admin to modify the description.

My question is,

Is there a standard SAP function whereby I could passed in the text, codepage_from and codepage_To and it would be able to throw an error if it is not convertible.

Thanks

Bye

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
552

Hello,

You may have a look at the function module SCP_TRANSLATE_CHARS and check if that helps by filling in the incode and outcode paramters with the respective code pages. If this function module raises a exception you can assume that the translation cannot take place.

Vikranth

3 REPLIES 3
Read only

deepak_dhamat
Active Contributor
0 Likes
552

Hi ,

Will you please Explain clearly , yes unicode Conversion creates problem while reading File content so

as per that we have to use some other code as per ecc 6.0 .

such as while reading.txt file in which there is TAB generated Symbol which cannot be recognised due to hexadecimals value so in that case you have to use cl_abap_char_utilities=> tab_horizontal .

will you explain what you are doing .

Regards

Deepak.

Read only

Former Member
0 Likes
553

Hello,

You may have a look at the function module SCP_TRANSLATE_CHARS and check if that helps by filling in the incode and outcode paramters with the respective code pages. If this function module raises a exception you can assume that the translation cannot take place.

Vikranth

Read only

colin_cheong
Contributor
0 Likes
552

Thanks