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
WRITE
statement 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
3000000
and you write it with currencyUSD
the result will be30.000,00
.I suggest you read the F1 help information on the
WRITE
statement, because there are a lot more options besides this one.--
Removing leading zeroes is done by using a conversion routine. The
CONVERSION_EXIT_ALPHA_INPUT
will add leading zeroes andCONVERSION_EXIT_ALPHA_OUTPUT
will remove them. It is possible to add these routines to a Domain in the dictionary, so the conversion will be done automatically. For example theMATNR
type:This will output
129
because the DomainMATNR
has 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_OUTPUT
routine to achieve the output without leading zeroes: