Demystifying ABAP Code Page in SAP ( Tables and BAPI )

ABAP Code page determines how the systeme interprets data and display the data.
In ABAP, you have to set the code page in order to handle the special characters. (For exemple, in French , , , , , , , , , , , don’t exist in English keyboard.).

In this post, you will find the standard function to replace characters (the easy way ), then learn to get the Target ABAP Code Page for the country and a platform. Last thing is the standard CCC ABAP Conversion Classes.

Replace Caracters for non ABAP Code Page

You can simply remplace this special characters with the correspondant characters
with this function module SCP_REPLACE_STRANGE_CHARS
For exemple: -> e .

Get targetABAP Code Page Conversion

Or you can handle the specific the ABAP code page of the connection language and the country.
Actuallay, there is a SAP table TCP0C matching the platform, the language, the country and the right code page.
Code Page table,abap code page

It is extremely helpfull if you manage file or text in non-EN language.

This sample abap code let you calculate the right code page to use:

Standart CCC Converter CL_ABAP_CONV_*

Since 6.10, you can also use the standard CCC converter classes CL_ABAP_CONV_*.
A good sample code can be find in this link.

  • CL_ABAP_CONV_IN_CE: converts bytes representing characters in a given codepage into a character or string variable
  • CL_ABAP_CONV_OUT_CE: converts a character or string variable into bytes representing characters in a given codepage
  • CL_ABAP_CONV_X2X_CE: converts bytes representing characters in a given codepage, into bytes representing characters in another given codepag

SAP and SAP logo are registered trademarks of SAP AG. is not associated with SAP AG.
We have made every effort to make sure provide relevant search results, use the content on this site at your own risk.

We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to and affiliated sites.