SET COUNTRY cntry.
cntry expects a character-like data object that either contains a value from the column LAND of the database table T005X or is initial.
cntrycontains a value from the table T005X, the number format, date format, and time format are set to a country-specific format in accordance with the entries in columns XDEZP, DATFM, and TIMEFM.
cntryis initial (contains a space in the first position), the formatting is set in accordance with the fixed values in the user master record.
If the content of
cntry cannot be found in the table T005X and does not have a space in the first position,
sy-subrc is set to 4 and the following settings are made:
- The decimal separator is a decimal point and the thousands separator is a comma.
- Date in the form "mm/dd/yyyy"
Time in 24-hour format
|0||The specified country key was found in the database table T005X or a space was specified.|
|4||The specified country key was not found in database table T005X.|
As long as the statement
SET COUNTRYis not executed in an internal session, the formatting corresponds to the fixed values in the user master record.
If certain formatting settings are only required for one or a few formattings, the formatting option
countrycan be used for embedded expressions in string templates instead of
Do not confuse the statement
SET COUNTRYwith the obsolete addition
COUNTRYof the statement
SET LOCALE LANGUAGE, used for setting the text environment. In particular, it does not have a corresponding