I want to know how to do
- digit grouping
when I have value for money for example 3000000 ( 3million) i want to print 3.000.000 on the screen (there is a dot every three character from the last character)
- Remove zeroes in front of value
when I select a value from table and print it on the screen, the value get padded with zeroes automatically: e.g. 129 becomes 0000129
The
WRITEstatement allows you to specify a currency. Example:Note that this does not interpret the number itself, but just adds commas and dots at certain positions depending on the currency you specify. So in the event you have an integer with the value of
3000000and you write it with currencyUSDthe result will be30.000,00.I suggest you read the F1 help information on the
WRITEstatement, because there are a lot more options besides this one.--
Removing leading zeroes is done by using a conversion routine. The
CONVERSION_EXIT_ALPHA_INPUTwill add leading zeroes andCONVERSION_EXIT_ALPHA_OUTPUTwill remove them. It is possible to add these routines to a Domain in the dictionary, so the conversion will be done automatically. For example theMATNRtype:This will output
129because the DomainMATNRhas a conversion routine specified.In the case of a type which does not have this, for example:
The output will be
0000129. You can call theCONVERSION_EXIT_ALPHA_OUTPUTroutine to achieve the output without leading zeroes: