Ansicht
Dokumentation

ABENTEXT_ENVIRONMENT - TEXT ENVIRONMENT

ABENTEXT_ENVIRONMENT - TEXT ENVIRONMENT

CPI1466 during Backup   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

Text Environment Language and Text Environment

Text Environment Language

The text environment language is part of the language settings of an ABAP program and determines its text environment. It is valid during an internal session.

  • It can also be set to a different language for the current internal session using the statement SET LOCALE LANGUAGE.

The current text environment language can be determined using the method GET_LANGUAGE of the class CL_ABAP_SYST or using the statement GET LOCALE LANGUAGE, and is the nominal content of the system field sy-langu. The possible single-character abbreviations for the text environment language are stored as language keys in the column SPRAS of the database table T002.

Example

Assurance that the system field sy-langu contains the current text environment language, An exception is raised if the system field is overwritten in the program.

Text Environment

All programs in an internal session work in a shared text environment that is determined by the text environment language and which can also be set using the statement SET LOCALE LANGUAGE. As well as the language, the text environment includes:

  • A code page
The code page of the text environment is always the system code page UTF-16 of the of a Unicode system and cannot be changed. The current release supports Unicode systems only. Text environments with other code pages are no longer supported. There is a special feature in which the non-Unicode code page that is used for conversions is the one that would be assigned to the current text environment in a non-Unicode system. This only applies to specific statements, such as reading and writing legacy files using the ABAP file interface.
  • A locale
The locale properties that belong to the text environment language and country are defined in an ICU (International Components for Unicode) library. This library is made available for AS ABAP and is independent of the operating system of the host computer of the .

The main purpose of the text environment it to handle texts in character-like data objects:

  • The code page of the text environment affects all operations that depend on the current character set, such as
  • Casting character-like data objects to byte-like types

  • The locale of the text environment affects all statements that sort character-like data objects as text, such as

  • In addition, the text environment language, and not the logon language, is used in the following cases:

  • If a language is not specified explicitly in the statement SUBMIT VIA JOB, the logon language of the background session is set implicitly to the current text environment language.

  • The texts on selection screens are determined by the current text environment language.

Any further frameworks based on the nominal value of the system field sy-langu access the current text environment language and not the logon language.

Notes

  • The ABAP programming language supports a subset covered by UCS-2 and not the full scope of UTF-16. This contains all UTF characters except those in the surrogate area. ABAP interprets a character from the surrogate area as two characters.
  • In the non-Unicode single code page systems supported before release , the code page of the text environment was always the non-Unicode system code page of the current . It was possible to configure different system code pages for the code page of the text environment of a system only in the MDMP systems supported before Release 7.0.

Example

Setting the text environment explicitly before an aRFC. The function module DEMO_RFM_CALL_TRANSACTION calls a transaction using a transaction code passed to it. The logon language of the RFC session is always English, regardless of the logon language of the current session. Afterwards, the text environment language is set back to its previous value.






CL_GUI_FRONTEND_SERVICES - Frontend Services   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 9940 Date: 20240423 Time: 194718     sap01-206 ( 113 ms )