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.
Amongst other things, these classes are a (possible) replacement for the language elements TRANSLATE
... CODE PAGE ... and TRANSLATE ... NUMBER FORMAT ..., which may not be used in Unicode programs.
Concept
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 application
server), is stored in an X field or XSTRING in binary form.
- When converting to an ABAP format from another format, data is read from a byte sequence and written to an ABAP data object.
- When converting from an ABAP format to another format, data is read from an ABAP data object and written as a byte sequence.
Classes
-
CL_ABAP_CONV_IN_CE
-
Converting other formats to ABAP data objects. (Reading a binary input stream).
-
CL_ABAP_CONV_OUT_CE
-
Converting ABAP data objects to another format. (Writing to a binary output stream).
-
CL_ABAP_CONV_X2X_CE
-
Converting data from one format to another. (Reading from a binary input stream and writing to a binary output stream).