Skip to Content
Former Member
Jun 01, 2010 at 01:41 PM

rounding issue when the number is a whole number


Hi guys,

I have a UDF (type is units and totals, price) which I named U_BILLPRICE. Since SAP has some issues in rounding results of formatted searches, I have inserted this query in my quantity column:

Select CONVERT (CHAR(19),(CAST((ROUND($[$38.U_UPINVTUM.number] / $[$38.U_UMCONV.number], 5)) as decimal (16,5))))

The query works if my U_BILLPRICE has decimal for example 24,030.20. It works fine. But if my U_BILLPRICE is a whole number for example 24,030. It disregards the decimal places.

example: U_BILLPRICE = 24,030/100 is equal to 240.30 but using the above query it just gives me 240.

Please help.

Thank you,