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

ST22 CONVT_CODEPAGE

former_member201275
Active Contributor
0 Likes
3,716

In my program i have:

OPEN DATASET s_file FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE.

When I try and transfer to this file i get the following dump:

When converting a text from code page '4102' to code page '1100', either
- characters are detected that cannot be displayed in one of the two code pages or
- the conversion could not be carried out for another reason

Should I use cl_abap_con_x2x_ce to convert the string from 4102 to 1100?

If the answer to the previous question is 'yes', then what happens when the file coming in isn't codepage 4102?

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
0 Likes
3,460

So, I guess you want to save the file in code page ISO-8859-1 also known as Latin 1 (SAP code page 1100).

Then, if it fails, it's because you try to transfer characters that don't exist in code page 1100. You have the option to substitute invalid characters with any character you want by using:

OPEN DATASET ... REPLACEMENT CHARACTER '?' ...

For more information, read the ABAP documentation.

In "Młodość", the three characters

ł
ś
ć

don't exist in iso-8859-1.

In my program i have:

OPEN DATASET s_file FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE.

When I try and transfer to this file i get the following dump:

When converting a text from code page '4102' to code page '1100', either
- characters are detected that cannot be displayed in one of the two code pages or
- the conversion could not be carried out for another reason

Should I use cl_abap_con_x2x_ce to convert the string from 4102 to 1100?

If the answer to the previous question is 'yes', then what happens when the file coming in isn't codepage 4102?

8 REPLIES 8
Read only

Sandra_Rossi
Active Contributor
3,460

So, I guess you want to save the file in code page ISO-8859-1 also known as Latin 1 (SAP code page 1100).

Then, if it fails, it's because you try to transfer characters that don't exist in code page 1100. You have the option to substitute invalid characters with any character you want by using:

OPEN DATASET ... REPLACEMENT CHARACTER '?' ...

For more information, read the ABAP documentation.

I don't answer your two questions because they are not relevant. Please clarify what you want to do and what issue you have.

Read only

former_member201275
Active Contributor
0 Likes
3,460

Hi Sandra,

Thank you for your answer. (I am not sure if i should click on 'comment' to reply, or 'answer')!

I have a program that runs in batch every evening and it has been working without issue sine 06.2019 until today. It resulted in an abort on 30.05.2020, but every evening before and after this date it is fine.

The error is convt_codepage.

My program derives a list from a sap standard program RSSCD100_PFCG and then copies the list result to AL11. At the point in my program where it Transfers the data it fell over once i.e. on 30.05.2020.

I don't know how to find the character that caused the dump, but will delve deeper.

Read only

former_member201275
Active Contributor
0 Likes
3,460

The problem are the following Polish characters:

Młodość

How can I handle these?
Read only

0 Likes
3,460

Please use the COMMENT button for comments, questions, adding details, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area.

Read only

Sandra_Rossi
Active Contributor
0 Likes
3,460

The next time there's a character not part of iso-8859-1, that will produce a run time error. Use for instance the character Σ to reproduce the error. Correct your program. Ask the customer what replacement character they want.

NB: copy/paste my hyperlinked name sandra.rossi so that I'm informed of your message.

NB: it's easy to see that you shouldn't post an "answer", see the SAP legend: "You should only submit an answer when you are proposing a solution to the poster's problem."

Read only

Sandra_Rossi
Active Contributor
0 Likes
3,460

In "Młodość", the three characters

ł 
ś
ć

don't exist in iso-8859-1.

Is there something in my previous comments that I should clarify?

Read only

former_member201275
Active Contributor
3,460

Thank you sandra.rossi

i got replacement character from client as you suggested and now it works.

I cannot accept your answer as you have a 'comment' and not 'answer'

Read only

Sandra_Rossi
Active Contributor
0 Likes
3,461

So, I guess you want to save the file in code page ISO-8859-1 also known as Latin 1 (SAP code page 1100).

Then, if it fails, it's because you try to transfer characters that don't exist in code page 1100. You have the option to substitute invalid characters with any character you want by using:

OPEN DATASET ... REPLACEMENT CHARACTER '?' ...

For more information, read the ABAP documentation.

In "Młodość", the three characters

ł
ś
ć

don't exist in iso-8859-1.