Skip to Content
avatar image
Former Member

Rounding off the value with only logic script

Hi BPC experts,

I would like to round off the values to 2 decimals when running a currency translation or consolidation (which also requires a currency translation).

My logic script is the following :

for currency translation :

for consolidation (the screenshot only displays the currency translation part) :

These logic scripts work as for having only 2 decimals but it does not always round off the values in the right way :

For instance, I have 723337,19207 euros without the rounding process. Once it is rounded, it shows 723337,20 euros.

Normally, it should round to 723337,19 euros.

A second example is 164744,739327 euros but when rounded, it displays 164744,73 euros. Normally, it should display 164744,74 euros.

Therefore, is there something to add to this logic script ? Or is there another solution for rounding off the values ?

I also tried the BADI in the How to Guide but it did not work at all. I ran /CPMB/DEFAULT_FORMULAS and linked this package to the logic script defined in the guide but there was 0 record.

Please, help me out.

Thank in you in advance,

Dat

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 15, 2015 at 06:29 PM

    Hi Dat,

    Please read Inline ROUNDING in REC expression

    In my tests the rounding was fine.

    Please test it in UJKT for some fixed value!

    By the way looks like 723337,19207 is some parent node, and the rounding is done for base members...

    Test for base member result!

    Vadim

    P.S. We are using write back badi with the ROUND property in account dimension - works fine with ABAP calculation engine!

    Add comment
    10|10000 characters needed characters exceeded

    • In the rounding scripts please limit scope to the single base member intersection using *XDIM_MEMBERSET...

      Like (for all dimensions in the model):

      *XDIM_MEMBERSET ACCOUNT=CALU70600000

      *XDIM_MEMBERSET TIME=2014.12

      *XDIM_MEMBERSET CATEGORY=ACTUAL

      *XDIM_MEMBERSET FLOW=...

      ...

      I want to be 100% sure that you are working with a single intersection!

  • avatar image
    Former Member
    Oct 20, 2015 at 01:31 PM

    Hi Dat,

    I have a question for you. If you use the rounding, how do you plan to deal with rounding differences that occur on currency conversion and consolidation?

    Thanks,

    Arnold

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Vadim Kalinin

      Hi Vadim,

      it's not big, but an auditor won't like a balance sheet that is even out by 1 pence. And it can easily be above 50 pence in which case you would see it on a EUR level (replace with any other currency).

      BR,

      Arnold