As the ABAP documentation of Formatting Settings explains:
The formatting settings are set as follows:
At the start of an internal session they are determined by the related default settings in the fixed values in the user master record of the current user.
Using the statement SET COUNTRY, this default setting for the current internal session can be overwritten using country-specific formats.
But as the ABAP documentation of SET COUNTRY
makes clear, there is no way to query what's actually been set with this statement:
Do not confuse the statement SET COUNTRY with the obsolete addition COUNTRY of the statement SET LOCALE LANGUAGE, used for setting the text environment. In particular, it does not have a corresponding GET COUNTRY statement.
Indeed, the ABAP documentation of GET LOCALE
- obsolete parameters mentions:
The addition COUNTRY was intended for reading the country key of the current text environment explicitly. cntry expects a character-like data object. The function of this addition was not implemented in full and the result is undefined.
The addition COUNTRY of the statement GET LOCALE does not extract the formatting setting that can be set using SET COUNTRY.
Which leaves me with a bit of a conundrum. I could determine my user defaults with FM SUSR_GET_USER_DEFAULTS
. I could figure out the setting for the country from table T005X
. But I have no way of figuring out which specific country format was set, or even if one was set in the active session!
How do I determine which formatting settings are currently active?
Bonus question: is there a way to figure this out in the Debugger?
SET COUNTRY
while some will rely on the user defaults. – Lilienthal