SET COUNTRY


Basic form 7

SET COUNTRY f.

Effect

Displays the decimal point and date in all subsequent output ( WRITE ) according to the settings specified in the table T005X for the country ID f .

The return code value is set as follows:


SY-SUBRC = 0 The statement was successful.
SY_SUBRC = 4 The country ID was not found in table T005X .

Notes

The country must exist in table T005X . Otherwise, the formats used are "." for the decimal point and "MM/DD/YYYY" for the date.
The special form SET COUNTRY SPACE (or f contains SPACE ) resets the decimal point and date display formats to the setting contained in the current user's master record. In this case, table T005X is not read and the return code value is always 0.
The effect of SET COUNTRY is not restricted to the current program, but applies at once to all programs in the current roll area.

Example

When outputting documents, display the decimal point and date in the format specified for the country of the recipient:
DATA: RECEIVER_COUNTRY LIKE T005X-LAND, DATE LIKE SY-DATUM, AMOUNT TYPE P DECIMALS 2. ... SET COUNTRY RECEIVER_COUNTRY. IF SY-SUBRC = 4. WRITE: / RECEIVER COUNTRY, ' is unknown'. ENDIF. WRITE: / DATE, AMOUNT.

Then, you can say
SET COUNTRY SPACE.

to display the decimal point and date according to the specification for the user again.

Index
© SAP AG 1996