cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to convert String value to java.lang.BigDecimal

Former Member

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Likes

Use BigDecimal("StringValue") constructor. Here string value should represent a valid number

example 

BigDecimal myBigNum = new BigDecimal("123654789654");

Former Member
0 Likes

I had a timestamp (DEC 21,7) field which is mapped as a BigDecimal and used the following

To represent 28th Dec 2005, 10:11:12 am:

BigDecimal x = new BigDecimal("20051228101112");

To add

 new BigDecimal("..").add( new BigDecimal(" .." );

Can you clarify on what do you mean on using it with context attributes ?

Former Member
0 Likes

new BigDecimal(String value)

Armin

Former Member
0 Likes

Thanks but how to :

1)Add 2 Bigdecimal values

2)Use this with context attributes.

Please help

Thanks

Ananda

Former Member
0 Likes

Read the javadoc for java.math.BigDecimal.

The Web Dynpro table tutorial shows how to use BigDecimal in a Web Dynpro application.

Armin