Forum Stats

  • 3,767,750 Users
  • 2,252,713 Discussions
  • 7,874,327 Comments

Discussions

Consolidation getting error

JanGLi
JanGLi Member Posts: 649 Bronze Badge
edited Jul 6, 2017 9:05AM in Financial Consolidation

Hi,

My HFM version is 11.1.2.4.200

It's a classic application.

We have created a business rule and deployed it under calculate. After that when we run consolidation we are getting error. When we undeploy these business rules i am able to perform the consolidation.

These are the errors:

pastedImage_1.png


My business rule is wrong i know but my questions is why business rule is getting executed when i consolidate even though i have deployed it under calculate not under consolidation?

Regards

KiranTR-Oracle3384345

Answers

  • KostasN.
    KostasN. Member Posts: 547 Silver Badge
    edited Jul 5, 2017 10:58AM

    Hi,

    Calculation rules are normally executed many times during consolidation. In fact, for each entity under the consolidating parent, calculations are executed for all the following value members: <Entity Currency>, <Entity Curr Adjs>, <Parent Currency>, <Parent Curr Adjs>, [Parent Adjs], [Proportion], [Elimination], [Contribution Adjs]. It is the responsibility of the rules author to prevent specific calculations from executing for specific value members, if no control code is in the calculation section, all rules are executed at all value levels.

    Regards,

    Kostas

    KiranTR-Oracle
  • JanGLi
    JanGLi Member Posts: 649 Bronze Badge
    edited Jul 5, 2017 3:40PM

    Thanks for help.

    Just to be clear...

    When i execute consolidation all of my rules will run? regardless if they are created under calculate or allocate or consolidation? Unless i prevent them from execution?

    Regards

  • KostasN.
    KostasN. Member Posts: 547 Silver Badge
    edited Jul 6, 2017 3:38AM

    Hi,

    Yes, calculation is executed many times during consolidation, once for each value member that I mentioned above. In fact, consolidation can run only on "clean" data, in terms of status. If for example you run consolidation and the calculation status of Entity 100 intersection with Value member <Entity Currency> is not "OK", it means that calculations for <Entity Currency> have not executed therefore, data is not valid for consolidation and calculations will execute automatically in order for consolidation to roll-up "correct" numbers. Further, if <Entity Currency> status is not "OK" then all subsequent value member statuses won't be "OK" as well, therefore the Calculate() routine will execute for all those value members as well.

    Therefore Calculation of different members of the value dimension is prerequisite for consolidation to run. Code in the Consolidate() section of the rules file runs during the transition of data from [Parent Total] to [Proportion] and [Elimination]. If you have consolidation rules enabled and there is nothing in the Consolidate() routine, nothing goes up to [Proportion] and [Elimination]. So using code in the Consolidate() routine you control which numbers roll-up to [Proportion] and [Elimination]. Beware, that after Consolidate() runs, Calculate() runs again on [Proportion] and [Elimination].

    You can avoid running Calculate() at various levels, by using control statements like this (imagine for example your code needs to run only for <Entity Currency>):

         If HS.Value.Member() = "<Entity Currency>" Then

              ... do your magic here ...

         End If

    The above block of code will prevent Calculate() from running on all applicable value members. You can also include other value members to the above "If" statement, just bear in mind that the condition is a little different especially for <Parent Currency> and <Parent Curr Adjs> in this specific case you have to use HS.IsTransCur() and HS.IsTransCurAdj() instead of comparing with <Parent Currency> (which does not work).

    Kostas

  • 3384345
    3384345 Member Posts: 37
    edited Jul 6, 2017 7:06AM

    Hi Kostas,

    As you mentioned that if statement does not recognized value member <Parent Currency> i just check rule file and did not found any but some rules returns with select case statement and look likes this

    Select Case HS.Entity.IsBase("", "")

        Case True

            ' For base entities

            Select Case pov_Value

            Case "<Entity Currency>", "<Entity Curr Adjs>", "<Parent Curr Adjs>", "[Elimination]", "[Parent Adjs]", "[Contribution Adjs]"

    so it means we can do control <Parent Currency> and <Parent Curr Adjs> with select case statement?

    Thanks,

    Eshant

  • KostasN.
    KostasN. Member Posts: 547 Silver Badge
    edited Jul 6, 2017 8:29AM

    No, you cannot compare against "<Parent Currency>" and "<Parent Curr Adjs>" therefore if you write something like the above, the code will never execute on those members. In addition I'm not sure you can write many members in one "Case". It should actually read as:

    Select Case pov_Value

         Case "<Entity Currency>"

              ...

         Case "<Entity Curr Adjs>"

              ...

    But still, select case is not going to work with Parent Currency and its Adjs, therefore the code should use If .. Else If .. etc.

    The reason for this, is that during execution, <Parent Currency> resolve to some thing like "US" or "EUR" or whatever the parent entity's default currency. So, it does not match. The same of course applies for <Parent Curr Adjs> which resolves to "US Adjs" or "EUR Adjs" etc.

    Instead you must use:

         If HS.IsTransCur() Or HS.IsTransCurAdj() Then

              ... magic here ...

         End If

    Kostas

    3384345
  • KostasN.
    KostasN. Member Posts: 547 Silver Badge
    edited Jul 6, 2017 9:05AM

    One more detail I should add: I have assumed above that the entity's default currency is different from that of its parent, which is the generic case. If however an Entity has the same default currency as its parent then the <Entity Currency> and <Parent Currency> (and the corresponding adjs) are the same member. In that case, Calculate() executes only once for <Entity Currency> and once for <Entity Curr Adjs>.

    <Entity Currency> and <Parent Currency> are "pointers" to actual currency members -e.g. USD or EUR. They have no real meaning on themselves, it's like instructing HFM to use the proper currency, given that the parent.entity combination that we choose completely define the specific currencies to use.

    Kostas

    3384345
This discussion has been closed.