Depending on the configuration in the user master record, numbers with type P or I are formatted with decimal comma and thousands point (Continental Europe) or with decimal point and thousands comma (North America). Other forms of number formatting are not directly supported.
The above formats are the most widely used.
Any other forms must be programmed by the customer.
Example 1: No thousands separator.
MOVE Number TO String. " Always format with decimal point
TRANSLATE String USING '.,'. " Decimal point -> Decimal comma
As of Release 4.0:
WRITE Number TO String NO-GROUPING.
Example 2: Apostrophe instead of thousands point
WRITE Number TO String.
TRANSLATE String USING '.'''.
Example 3: You already know how large the number will be.
WRITE Number USING EDIT MASK ...
If numbers from certain DDIC tables should always be formatted in the same way, we recommend writing an appropriate conversion exit and entering it in the corresponding domains. If this is done properly, the numbers will be converted automatically for both WRITE statements and for screen I/O.
Additional key words
Single quotation mark, Apostrophe
No comments:
Post a Comment