Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Processing Internal Data →  Assignments →  Assignment and Conversion Rules 

System Classes for Converting Character Sets and Number Formats

The system classes described below enable the conversion of text data between different code pages and of numeric data between different number representations.

Among other things, these classes are a replacement for the language elements TRANSLATE ... CODE PAGE ... and TRANSLATE ... NUMBER FORMAT ..., the use of which is only allowed in obsolete non-Unicode programs.

Data that is not available in ABAP format (that is, text data that is not in the system code page format, or numeric data that is not in the byte order used on the current application server) can be saved in binary form in an x field or in an xstring.

  • When converting to ABAP format from another format, data is read from a byte sequence and written to an ABAP data object.
  • When converting from ABAP format to another format, data is read from an ABAP data object and written as a byte sequence.

This is done using the following classes:

  • CL_ABAP_CONV_IN_CE
Extracts other formats to ABAP data objects (reads a binary input stream).
  • CL_ABAP_CONV_OUT_CE
Exports ABAP data objects to another format (writes to a binary output stream).
  • CL_ABAP_CONV_X2X_CE
Extracts data from any format and exports data to any other format (reads from a binary input stream and writes to a binary output stream).

Other versions: 7.31 | 7.40 | 7.54


Note

The class CL_ABAP_CODEPAGE wraps the classes above to make it easier to handle code pages when processing character and byte strings.