I need to calculate currency exchange rate from currency factor of sales header.
CurrExchRate := 1/Currency Factor;
I need to get CurrExchRate variable with four decimal places. But it doesn’t come. it alway round up to one decimal placs.
then I used round function as follows.
CurrExchRate := ROUND((1/Currency Factor),0.0001,’>’);
But same problem existing.
I am not sure how you are checking the value but some analytical steps might help you to zero in the problem.
Display the value of ROUND((1/Currency Factor),0.0001,’>’) directly into a message and see whether the desired result is being displayed or not.
If you viewing the value of CurrExchRate in a TextBox then check the property DecimalPlaces of that textbox.
Display the value of 1/Currency factor directly into the message and see whether the value has more than one decimal place or not.
I tried it now. But it is not working. same problem.
More information would be required to do analysis. However did you try all the steps I mentioned ? Can you update the details like currency factor value and the result getting displayed in each of the steps mentioned ?
You should check the display length property of the extended Data Type oy your variable CurrExchRate, see also the display properties of your field
Hope it helps
Data type of ‘CurrExchRate’ variable is decimal. How can i access its properties. when i go properties window it shows only ‘ID’ and ‘Dimension’ Properties.
I tried all the steps u mentioned.
Currency factor = 0.009115770282589
(1/Currency factor) show the result of 109.7. I need the result with four decimal places.