Show TOC

Converting DataLocate this document in the navigation structure

Converting Data

These classes are used to convert ABAP data from the system format to external formats and vice versa. During this conversion process, character-type data may be converted to another character set, while numeric-type data may be converted to another byte order (or endian format). You must use a container of type X or XSTRING for data in an external format.

Character sets and endian formats are also converted by the file interface (OPEN DATASET with new additions), RFCs, and the function modules GUI_DOWNLOAD and GUI_UPLOAD. The classes described below are available for those special cases where the possibilities offered by conversion are insufficient. Since these classes work with containers of types X and XSTRING, these containers can be copied unconverted by the file interface (OPEN DATASET with new additions), RFCs, and the function modules GUI_DOWNLOAD and GUI_UPLOAD. These classes replace the following two statements:

TRANSLATE c ...FROM CODE PAGE     g1 ... TO CODE PAGE     g2

TRANSLATE f ...FROM NUMBER FORMAT n1 ... TO NUMBER FORMAT n2

For a detailed description, see the class documentation in the Class Builder. The following classes are available:

  • CL_ABAP_CONV_IN_CE

Reads data from a container and converts it to the system format. You can also fill structures with data.

  • CL_ABAP_CONV_OUT_CE

Converts data from the system format to an external format and writes it to a container.

  • CL_ABAP_CONV_X2X_CE

Converts data from one external format to another.