These are some typical types of information stored in header section variables:
The current POV members for the POV dimensions
Top and [None] members for custom and ICP dimensions; global accounts
Triggers for conditional statements
vIs_Trans = HS.Value.IsTransCur 'This yields a True or False vIs_base = HS.Entity.IsBase("","") 'This yields a True or False pov_entity = HS.Entity.Member
pov_scenario = HS.Scenario.Member pov_value = HS.Value.Member
ALL_NONE = ".I#[ICP None].C1#[None].C2#[None].C3#[None].C4#[None]"
ALL_TOPS = ".I#[ICP Top].C1#TopC1.C2#TopC2.C3#TopC3.C4#TopC4"
Use Only
Point of View Variables
Information about the current Point of View members for the Entity, Scenario, Year, and Value dimensions is typically used throughout a Sub procedure. Instead of repeatedly retrieving this information from the application, you can retrieve it once at the beginning of the procedure and store it in a variable. You can then use the value stored in the variable when a rule requires Point of View information.
You retrieve the Point of View using the Member function. For example,
HS.Entity.Member retrieves the current Entity POV member. Because the values change based on the current Point of View, you should use variables rather than constants.
Top and None Members for Custom and ICP Dimensions
Custom and ICP dimensions in account expressions often need to be set to the top member or the [None] member. This can result in a long expression that is difficult both to type and to read.
Example
HS.EXP “A#RetainedIncome=A#Profit".I#[ICP Top].C1#TopC1.C2#TopC2&” _ “.C3#TopC3.C4#TopC4"
To simplify your code, you can store the text string for custom and ICP members in a variable or constant, as in this example:
const All_TOPS=”.I#[ICP Top].C1#TopC1.C2#TopC2.C3#TopC3.C4#TopC4"
You can then use the constant or variable in the account expression in place of the string:
HS.EXP “A#RetainedIncome=A#Profit" &All_TOPS
Because the custom and top member names do not change when the Point of View
T I P
For the variable for the current period, you can use HS.Period.Number instead of HS.Period.Member. Because the fiscal year can start on different months in different applications, if you use period numbers rather than member names, it is easier to reuse your rules in more than one application.
Use Only
Global Accounts
You frequently need to refer to global accounts in your rules, such as the accounts used to store exchange rates or head count. You can create variables or constants for these accounts and then use them throughout your file. For example:
vHead=”.A#HeadCount”
vEfx=”.A#EndingRate”
Because the global member names do not change when the Point of View changes, you can use constants instead of variables.
Conditional Statement Triggers
Financial Management provides a number of functions that return a value of true or false.
You can use these functions as tests in conditional statements. For example, before executing a rule, you might test whether it is true or false that the current year is the first year in the application or that the current entity is a base entity.
To make your rules file more efficient, you can perform the test once and store the result in a variable in your header section. For example:
vIsBase = HS.Entity.IsBase("","")
You can then use the variable as needed in conditional statements. Because they are Boolean values, a value of True is assumed as the test.
If vIsBase Then
HS.EXP “A#Sales=A#UnitsSold * A#Price”
End If
You can use the Not keyword to test for a false condition. This statement executes only if the entity is not a base member:
If Not vIsBase Then
HS.EXP “A#Sales=A#UnitsSold * A#Price”
End If
For clarity in your code, you can specify True or False as the condition:
If vIsBase=True Then
HS.EXP “A#Sales=A#UnitsSold * A#Price”
End If
Use Only
These functions are frequently used as test for conditional statements.
Because the results returned by these functions can change based on the Point of View, you must use variables rather than constants.
Function Description
IsBase Determines if the current member or a specified member is a base member of the application or of the specified parent.
IsCalculated Determines if the current Account dimension member or a specified account member is a calculated account.
IsChild Determines if the current member or a specified member is a child of the specified parent.
IsConsolidated Determines if the current Account dimension member or a specified account member is a consolidated account.
IsDescendant Determines if the current member or a specified member is a descendant of the specified parent.
IsFirst Determines if the current period or year is the first period or year of the application. The default frequency of the current scenario is used to determine if the current period or year is the first period or year of the application.
IsICP Determines if the current Account or Entity dimension member or a specified account or entity member is an intercompany partner (ICP).
IsLast Determines if the current period or year is the last period or year of the application. The default frequency of the current scenario is used to determine if the current period or year is the last period or year of the application.
IsTransCur Determines if the current Value dimension member is a translated currency member.
IsTransCurAdj Determines if the current Value dimension member is a translated currency Adj member..
Use Only
Summary
In this lesson, you should have learned to:
• Create variables and constants
• Set up variables header sections for the Point of View
• Set up variables header sections for custom dimensions, ICP dimensions, and global accounts
• Set up a variables header section for conditional triggers
Use Only
Use Only
Objectives
At the end of this lesson, you should be able to:
• Describe the effect of the subcube structure on Financial Management rules
• Manage the scope of rules with the Account, ICP, and custom dimensions
• Manage the scope of rules with the Value dimension
• Work with total members in the Value dimension