How can I format a currency for our remote
sites into a format with no decimal point?
GuiXT
calls a function module for purchase requisition and this
function module returns valuation in the following format
"100000.0000". Prior to this new requirement I
formatted this in the following way:
Set
V[x] "&[reqtxt_wa](216-238)" + "0"
Decimals="2"
DecimalSeparator="."
GroupSeparator="," //Valuation price field
Now,
I have had to build some logic so that I can handle this for
different decimal formats:
//Set
the format for this value based on user's decimal setting
if
V[deckey=X]
Set
V[x] "&[reqtxt_wa](216-238)" + "0"
Decimals="2"
DecimalSeparator="."
GroupSeparator="," //Valuation price field
else
if
not V[deckey]
Set
V[x] "&[reqtxt_wa](216-238)" + "0"
Decimals="0"
DecimalSeparator=","
GroupSeparator="." //Valuation price field
endif
if
V[deckey=Y]
Set
V[x] "&[reqtxt_wa](216-238)" + "0"
Deicmals="0"
DecimalSeparator=","
GroupSeparator=" " //Valuation price field
endif
endif
In
the first case (e.g. deckey=X), the previous logic works.
However, in the other cases I am getting some very strange
numbers. If not deckey, produces the following result
"1.000.000.000". Can you provide a solution?
|