cancel
Showing results for 
Search instead for 
Did you mean: 

BigDecimal Default Value

Former Member
0 Kudos

Hi,

1). I have a big decimal input field, which I need to make it to default to blank (not even zeros).

2).And also I have another big decimal field, when I am doing calculation, I get 93,00076575678678687678678678236 like that. How do I set that field only to take 93,000 ?.

Thanks,

Sunita.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

sunita,

If you are using type BigDecimal, then its default value is null (it is object, not primitive type), so you get [1] automatically.

For second, check API for BigDecimal, method http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html#setScale(int, int)

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hi Valery,

The problem is coming when I need to refresh the values in between different views.

Can u please tell, how to set it using Simple Type(I think this is the only way). Please send any simpleTypes URLs/Docs.

Thanks and I appreciate your help.

Sunita

Former Member
0 Kudos

Hi Sunita,

For a documentation on simple types, you can go through <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/08/ed5ceef6604b41bbacee5dcd153a7b/frameset.htm">this</a>.

In your case, create a simple type and make the "Built-In Type" as decimal. For the property category "Length Constraints", specify the "Total Digits" and "Fraction Digits" properties.

Regards,

Satyajit.