0% found this document useful (0 votes)
720 views17 pages

HFM Rules Basics

This document provides an overview of rule types and functions in Financial Management. There are eight types of rules - Calculate, Dynamic, Translate, Allocation, Input, No Input, Consolidate, and Transactions. Rules are placed in separate sub procedures based on their type. The document also describes objects and functions, rule expressions, comments, conditionals, variables, subcubes, arrays, loops, and opening data units to retrieve data for rules.

Uploaded by

nara4all
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
720 views17 pages

HFM Rules Basics

This document provides an overview of rule types and functions in Financial Management. There are eight types of rules - Calculate, Dynamic, Translate, Allocation, Input, No Input, Consolidate, and Transactions. Rules are placed in separate sub procedures based on their type. The document also describes objects and functions, rule expressions, comments, conditionals, variables, subcubes, arrays, loops, and opening data units to retrieve data for rules.

Uploaded by

nara4all
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 17

HFM Rules Basics

Identifying Rule Types:

There are eight types of rules in Financial Management:


Calculate
Dynamic
Translate
Allocation
Input
No Input
Consolidate
Transactions

Routine Executed
Calculate() and Dynamic() -- When you calculate or consolidate
data
Translate() -- When you translate data
Allocate() -- When you use the Allocate option in a data
grid
Input() -- When the application is opened.
NoInput() -- When the application is opened.
Automatically
prevent you from entering data in specific
cells
Transactions() -- When the application is opened.
Consolidate() -- When you run a consolidation.

You place the rules for each type in a separate sub procedure
in the
rules file.
Sub Calculate ()
<All calculate rules are displayed here.>
End Sub
Sub Dynamic ()
<All dynamic rules are displayed here.>
End Sub
Sub Translate ()
<All translate rules are displayed here.>
End Sub
Sub Allocate ()
<All allocation rules are displayed here.>
End Sub
Sub NoInput ()
<All no input rules are displayed here.>
End Sub
Sub Consolidate ()
<All consolidate rules are displayed here.>
End Sub
Sub Input
<All input rules are displayed here.>
End Sub
Sub Transactions ()
<All transactions rules are displayed here.>
End Sub

Describing Objects and Functions:

Describing Objects and Functions:

Object Function

HS : ABSExp
Alloc
CalcStatus
Clear
Con
Exp
Dynamic
GetCell
GetCellNoData
GetCellRealData
GetCellType
GetRate
ImpactStatus
Input
NoInput
NoRound
OpenDataUnit
ReviewStatus
Round
SetData
SetDataWithPOV
Trans
TransPeriodic

Account: AccountType
C1...4 Top
IsBase
IsChild
IsConsolidated
IsDescendant
IsICP
List
NumBase
NumChild
NumDescendant
PlugAccount
SecurityClass
UD1...3
ValidationAccount
XBRLTags

AppSettings: Currency
ICPWeight
PVAForBalance
PVAForFlow
RateForBalance
RateForFlow

Currency: Scale

Custom1:
Custom2:
Custom3:
Custom4: IsBase
IsDescendant
List
NumBase
NumChild
NumDescendant
SecurityClass
SwitchSign
SwitchType
UD1...3

DataUnit: GetItem
GetItemIds2
GetNumItems

Entity: AllowAdjs
AllowAdjsFromChildren
DefCurrency
Holding
IsBase
IsChild
IsDescendant
IsICP
List
Member
NumBase
NumChild
NumDescendant
SecurityAsPartner
SecurityClass
UD1...3

ICP: List

Node: Consol1...3
DOwn
IsBase
IsChild
IsDescendant
List
Method
NumBase
NumChild
NumDescendant
PCon
POwn
Parent: DefCurrency
Holding
IsBase
IsChild
IsDescendant
IsICP
List
Member
NumBase
NumChild
NumDescendant
UD1...3

Period: IsFirst
IsLast
List
Member
NumBase
Number

Scenario: ConsolidateYTD
DefaultFreq
DefaultView
List
Member
NumPeriods
SecurityClass
UD1...3

Value: Currency
IsTransCur
IsTransCurAdj
Member

Year: IsFirst
IsLast
Member

Creating Rules Expressions:


HS.Exp "Destination=Source"

Destination Expressions:

The destination for the Exp function is specified by the Account, Custom, and ICP

members specified on the left side of the equal sign. The destination Entity,
Period, Year,

Value, members are determined by the current point of view (POV) members or
by the

cells selected on the data grid or form. The members for the currently selected
cells on

the grid override the current POV members. The destination View member is the
current

scenario default view, regardless of the currently select POV members.

Source Expressions:

When you use an account expression on the right side of the equal sign with Exp,
you

can specify any dimension member. If you do not specify a Entity, Period, Year, or
Value

dimension member, the current POV member or the current cells selected on the
grid or

data form are used.

Ex: HS.Exp "A#Cash = 50000

HS.Exp A#ALL=100

HS.Exp "A#Sales = A#Units * A#Price"

HS.Exp "A#MiscPast = A#Misc.Y#Cur-2"

HS.Exp "A#AvgSales = A#Sales/HS.Entity.NumBase(USA)"


Account Expressions:

An account expression uses a dimension keyword to specify a value or


a set of values.

A dimension keyword is separated from its values by a pound sign (#).


Ex: A#NetIncome
A#Cash.P#January.E#USA.C1#OpeningBalance

The table lists the dimension keywords that you can use to specify dimension
members:
Period and Year Keywords:

Adding Comments to Rules:


Inserting Line Continuations:

Conditional Statements:
Applying the IfThenElse Statement:

About VB Script Variables:

Variables temporarily store values when your script is running

Ex: Dim vCurPeriod, vCurYear


vCurPeriod=HS.Period.Number
vCurYear=HS.Year.Member
vAcc1=A#NetSales
vSalaryRate=300
Subcubes and Data Retrieval:

Financial Management Subcubes:


Subcube Dimensions:

Subcubes and Rules:


Executing Rules with the Value Dimension:

Arrays:

a. Arrays are variables that hold multiple values.


b. Each array value has an index number.
c. You write values, to or read values from, the array by
referencing the index number.
Loops:

Loops are sections of code that repeat execution for a specified


number of
times or until a condition is met.

Arrays and Loops in Rules:

1. Frequently you need to write rules that execute for a subset


of members in a dimension.
2. You cannot always specify the subset precisely with HS.Exp.
3. Loops and arrays enable you to write concise rules that
perform actions on large subsets of dimension members.
Loops and Data Units:

1. A data unit includes records for all intersections that


have data for a specified Point of View.
1. You can use data units for rules that only apply to
account intersections that already have data.

Opening Data Units:


Ex:
If StrEntity = "AI_ASS_D01" or StrEntity = "GR_ASS_D01" or StrEntity = "OM_ASS_O01"
Then
Set ActData=HS.OpenDataUnit("A#ASS12100120.V#<Entity Curr Total>")
vNumItems=ActData.GetNumItems
If vNumItems> 0 Then
For i=0 to vNumItems-1
Call ActData.GetItem(i,vAcct,vICP,vCust1,vCust2,vCust3,vCust4,vData)
Val_check = HS.GetCell("A#Time to 1st Coupon.C1#" &vCust1& ".C2#" &vCust2& ".C3#"
&vCust3& ".C4#" &vCust4)
If Val_check< 0 Then
HS.Exp "A#Val04000006.C1#" &vCust1& ".C2#" &vCust2& ".C3#" &vCust3& ".C4#"
&vCust4& " = 1"
End If
Next
End If
End If

You might also like