ABAP Keyword Documentation → ABAP - Release-Specific Changes → Changes in Release 3.0
Internationalization in Release 3.0
1. SORT ... AS TEXT: Locale-friendly sorting
2. CONVERT TEXT: Conversion of texts to a
locale-specific format
3. SET LOCALE: Explicit setting of the text environment
Other versions: 7.31 | 7.40 | 7.54
Overview
Since Releases 2.1/2.2, ABAP has provided a number of statements to support the internationalization
of programs. SET COUNTRY can be used to define the date and number formatting
for a particular country, while SET LANGUAGE makes it possible to change
the text pool language. TRANSLATE f TO LOWER/UPPER CASE reacts to the locale category LC_CTYPE, and when passing data between
AS Instance and front ends and when passing data using RFC, the system respects the SAP
code page.
In Release
3.0, texts can be sorted in a locale-friendly way (specific to culture). Here, the sort order is determined by the locale category LC_COLLATE.
In addition, the text
environment which (among other things) defines the locale-specific sort rules is set automatically according to the language of the active user when an
internal session is opened.
Finally, the basis for internationalization has been modified. Using the SAP text environment table
TCP0C, text environments are assigned to a four-part key consisting of <PLATFORM, LANGUAGE, COUNTRY, MODIFIER>.
Modification 1
SORT ... AS TEXT: Locale-friendly sorting
The addition
... AS TEXT of the language element SORT enables text data to be sorted in a locale-friendly way.
Modification 2
CONVERT TEXT: Conversion of texts to a locale-specific sortable format
The new CONVERT variant
CONVERT TEXT t INTO SORTABLE CODE sc converts a text to a locale-friendly sortable format.
Modification 3
SET LOCALE: Explicit setting of the text environment
The new SET variant SET LOCALE enables program-driven configuration of the
text environment.