cancel
Showing results for 
Search instead for 
Did you mean: 

Display decimals in Formula variable

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member188011
Active Contributor
0 Kudos

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-a42a32223...

>Page 2.

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

Regards,

Francisco Milán.

Answers (3)

Answers (3)

hadi_jafari
Explorer
0 Kudos

This is my workaround solution:

1. Edit your Formula Variable

2. Go to Currency/Unit tab

Dimensions = Amount ; Currency = <Choose one of the options>

Now you have the decimals.

If you don't wish to have the specified currency, you can use the NODIM function in your Calculated Key Figure to remove it.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

former_member181964
Active Contributor
0 Kudos

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