This discussion is archived
5 Replies Latest reply: Dec 10, 2012 8:41 AM by PD23 RSS

What is an Opendataunit ?

chandu Explorer
Currently Being Moderated
Hi,

I'm a newbie to HFM rules. The one thing I want to understand is
What is an OpendataUnit? What does it do?
How it impacts the performance of a calc?
Are they any other options available instead of using an opendataunit?

Is there any good documentation on rules to startup with?

Thanks and any help will be greatly appreciated.
  • 1. Re: What is an Opendataunit ?
    PD23 Newbie
    Currently Being Moderated
    There is a function called opendataunit that will open the relevant data subcubes into the HFM Server memory for the relevant intersection
    There is also something called a data unit which is the subset of your subcube (specific entity and period)

    Simply put your server will have a maximum amount of memory that can be used when processing rules ... so the less sub cubes that you have open in memory at any one time the better the performance


    e.g
    The below code will open up a data subcube for anything that has data in C4 OpenBal it will then clear the data if it equals 0.

    Set DataUnit = HS.OpenDataUnit("C4#OpenBal")

    Set DataUnit = Nothing
    lNumItems = 0
    Set DataUnit = HS.OpenDataUnit("C4#OpenBal")
    lNumItems = DataUnit.GetNumItems
    For i = 0 to lNumItems-1
    'Get the next item from the dataunit
    Call DataUnit.GetItem(i, strAccount, strICP, strCustom1, strCustom2, strCustom3, strCustom4, dData)
    If dData = 0 then
    HS.Clear "A#"&strAccount&".I#"&strICP&".C1#"&strCustom1&".C2#"&strCustom2&".C3#"&strCustom3&".C4#"&strCustom4
    End If
    Next

    Try

    http://www.slideshare.net/Ranzal/barbieri-hfm-business-rule-writing-tips-and-techniques-odtug-june-2010 for further tips and techniques

    PD
  • 2. Re: What is an Opendataunit ?
    CJX Journeyer
    Currently Being Moderated
    Hi Chandu,

    The good documentation to start with would be the HFM admin guide.

    Please click the below link and refer to page number 302, which would be helpful to you.

    http://docs.oracle.com/cd/E17236_01/epm.1112/hfm_admin.pdf


    Hope this helps,

    Thank you,
    Charles Babu J
  • 3. Re: What is an Opendataunit ?
    chandu Explorer
    Currently Being Moderated
    Hi,

    Thanks for the reply. I have one issue where for one subroutine , for one entity my consolidation is taking 22mins. I'm trying to optimize this and want to use Opendataunit to the closest subcube as possible. For Ex. Instead of using all accounts , I want to use the base accounts of a particular parent OPER_EXP and CCTRS to 7series. Can I use something as below, let me know if anything is wrong

         PM_ALLOC = HS.Custom2.List("","PM ALLOC")
              Base7CCTR = HS.Custom1.List("C1#700000","[Base]")
              BaseOPERACCT = HS.Account.List("A#OPER_EXP","[Base]")
         
              
         For each OperAcct in BaseOPERACCT

         For each Base7C1 in Base7CCTR

                        For each PA in PM_ALLOC
                                  
                        
              Set vDataUnit = Hs.OpenDataUnit("A#"&OperAcct&".C1#"&Base7C1&".C2#"&PA&".C4#R12")
              vNum = vDataUnit.GetNumItems
                   For i = 0 to vNum-1

    ...........
    .....
    ...

    Next
    Next
    Next

    End Sub

    Your help would be grealty appreciated. Thanks
  • 4. Re: What is an Opendataunit ?
    chandu Explorer
    Currently Being Moderated
    Looking more information
  • 5. Re: What is an Opendataunit ?
    PD23 Newbie
    Currently Being Moderated
    It looks correct
    (Make sure you test in a test environment first)

    you could also put this statement in
    Set vDataUnit = NOTHING ' this statement clears memory ready for next call

    e.g.
    For each PA in PM_ALLOC
    Set vDataUnit = Hs.OpenDataUnit("A#"&OperAcct&".C1#"&Base7C1&".C2#"&PA&".C4#R12")
    vNum = vDataUnit.GetNumItems
    For i = 0 to vNum-1

    ...........
    .....
    ...

    Next
    Set vDataUnit = NOTHING
    Next

    Hope that helps ... Let us know if this helps to improve your consolidation

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points