Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Mar 18, 2010 at 01:47 PM

    Hi,

    Please have a look at this thread

    number-formatting-problem-in-table

    Regards

    Saravanan K

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 19, 2010 at 08:06 AM

    Hi

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

    Regards,

    Arun

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 19, 2010 at 10:45 AM

    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

    Add comment
    10|10000 characters needed characters exceeded