Skip to Content
avatar image
Former Member

Display decimals in Formula variable

Hello Experts,

I have a CHAR field(Say A) which has only numbers coming in such as 10.85 , 12.78 etc . Now I have created a Formula variable (Say B) in Bex so that I could use this in some calculations . The formula variable is defined on this CHAR field with following properties : Replacement on A , Dimensions to Number.

When I run the report , I get values rounded in B as 11 , 13 instead of 10.85 and 12.78 . I checked the display properties of formula variable ,made it to 3 decimals...but still the out put remains rounded values.

Appreciate for any help,

Jb

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jun 22, 2010 at 11:33 PM

    Hi JB:

    I think you need to change the definition of InfoObject "A" to use "Key Figure" Type instead of "CHAR".

    Take a look at the document below, it might help.

    >"How to... Calculate with Attributes"

    >http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/72f4a790-0201-0010-5b89-a42a32223ffc?quicklink=index&overridelayout=true

    >Page 2.

    "...KHMAT2 has defined an attribute KHPRICE (u201CPriceu201D), of type Key Figure..."

    Regards,

    Francisco Milán.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 23, 2010 at 04:17 AM

    Hi,

    Check the InfoObject Level Properties, you can find BEx Tab in that You can have Display option i.e. Decimals ect... so set it and activate the Infoobejct and see.

    Thanks

    Reddy

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 23, 2010 at 05:08 AM

    Hi,

    I would suggest, Create another formula variable.

    Use your existing formula variable in that and muliply it by "1". Set display properties to 3 decimal points for new variable and get that displayed.

    I hope it will work as per your requiremnt.

    S

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you for all your repsonses,

      The issue still remains ,but any how the business got back saying they can live with out formula variable.

      I think the below solution might work,

      if we map the CHAR to Key figure(type:number) in the backend,that way it may preserve the decimals in front end. Again , we have to make sure that the CHAR values has numbers only at all times (which in my case is) to avoid any load failures.

      Thanks

      JB