Codepage Conversion Error (CONVT - CODEPAGE) While Executing OPEN DATASET Statement

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

SAP Knowledge Base Article

1731360 - Codepage conversion error (CONVT_CODEPAGE) while executing OPEN


DATASET statement
Component: BC-I18 (Internationalization (I18N)), Version: 3, Released On: 02.08.2017

Symptom
At the conversion of a text from codepage '4110' to codepage '4103'
At the conversion of a text from codepage '4110' to codepage '4102'
ABAP statement OPEN DATASET processed wrong encoding
Conversion error
A character set conversion is not possible
A character was found that cannot be displayed in one of the two codepages
It was detected that this conversion is not supported

Environment
All Unicode SAP releases

Cause
The OPEN DATASET statement expects a file converted in Unicode, but the processed data are converted with another
codepage.
Example: "open dataset <full_name> for input in text mode encoding default"
If you choose ENCODING DEFAULT then the file is processed with codepage 4110 (UTF-8) in a Unicode system. In many
cases the provided file is non-Unicode encoded.

Resolution
There are two ways to avoid this conversion error.
1. Provide a file with Unicode encoding (UTF-8, codepage 4110)
There are two ways to convert the file:
a. Report RSCP_CONVERT_FILE

This report asks for a source and a target codepage. Some more information are given in SAP Note 747615 - "Tool for
converting files from one code page to another".

b. Command SAPICONV

This command is used from operating system level. Please find a more detailed description in SAP Note 752859 -
"sapiconv - a tool for converting the encoding of files".

2. Change the coding to the format of the provided file


The second option to avoid this conversion error is to change the statement to a valid one. There are three ways to proceed.
a. "in text mode encoding non-unicode"

This option requires a file with a non-unicode encoding as defined as SY-LANGU.

b. "in text mode encoding unicode"

This option requires a file in UTF-8.

c. "in legacy text mode code page xxxx"

This option requires a file with specific encoding. "xxxx" is a placeholder for the necessary codepage.
See Also
More information about encoding is given in SAP Note 27 - "Recommendations for the ABAP file interface".

Keywords
CX_SY_CONVERSION_CODEPAGE, Latin-1, Latin-2, 1100, 1401, Konvertierung, Konvertierungsfehler,
CONVT_CODEPAGE, OPEN DATASET, conversion

Attributes
Key Value

Other Components BC-I18-UNI (Unicode)

This document is referenced by


SAP Note/KBA Title

2688729 CONVT_CODEPAGE CX_SY_CONVERSION_CODEPAGE dump when using SXDA_TOOLS

2095273 Dump CX_SY_CONVERSION_CODEPAGE when attaching files to SRM documents (SRM 5)

You might also like