cancel
Showing results for 
Search instead for 
Did you mean: 

BigDecimal is not properly displayed in table, when the output is from RFC

Former Member
0 Kudos

Hi Experts,

I am having a Bigdecimal field, where we are using this field to display the price.

This Price field comes from a RFC, the data type is BPREI.

When I execute the RFC in the ABAP system and through Webdynpro, the Output is shown as

RFC WebDynpro

11,72 11.72

362,00 362

1.191,30 1,191.3

I am using the same context to display the values.

When I checked for the Datatype in Webdynpro also, it is of the same data type.

Please let me know,why there is change in the Format of the output field when displayed in webdynpro.

Thanks in advance.

Regards,

Palani

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member185086
Active Contributor
0 Kudos

Hi,

Use setScale method to set the decimals of BigDecimal in Java.

BigDecimal b_dec = new BigDecimal(10232.33);

BigDecimal b = b_dec.setScale(3,BigDecimal.ROUND_UP);

Here we have set the scale of BigDecimal, so b value is 10232.330

Regards,

Satish Kumar

p330068
Active Contributor
0 Kudos

Hi

Please check this /thread/1528553 [original link is broken]

Regards,

Arun

Former Member
0 Kudos

Hi,

Please have a look at this thread

Regards

Saravanan K