3 Replies Latest reply: Nov 21, 2012 12:19 PM by CBarbieri

# How to block Entity Currency and make only ENtity Currency Adj available?

Hi,
I have some P&L accounts which need to be blocked for Entity currency but have a calculation in rules. These accounts still need to be available for journals. I have ensured that the Is Calculated is 'N'. Then I ve set up formulas for the accounts. Also I ve ensured that the accounts are non input for Entity Currency. The entity currency calculations are happening fine. I can even post journals but when I run a consolidation, the amount in ENtity Currency Adj dissapears.
Thiis is the Sub routine for No input. I guess I'll need to add a HS.Clear for these accounts as well

Sub PANDLNOINPUT()

Dim sAccount, aAccountList
aAccountList = HS.Account.List ("PANDLV2","[Base]")
For Each sAccount In aAccountList
HS.NoInput "A#" & sAccount & ".V#<Entity Currency>"

Next

End Sub

Also for the calculation of teh P and L accounts, I have the following rules

Calculate Cash Flow
'=================================================================================================================
Sub CalcCPandLFlow(sPOVScenario)

Dim nVal
Dim aCustom1List, sCustom1, aCustom4List, sCustom4
Dim sPriorScenario

aCustom1List = HS.Custom1.List("", "C1_AllBaseXNone")
aCustom4List = HS.Custom4.List("", "C4_AllBaseXNone")

sPriorScenario = GetPriorScenario(sPOVScenario)

For Each sCustom1 In aCustom1List
For Each sCustom4 In aCustom4List

'Operating Profit
nVal = HS.GetCell("A#B20201.C1#" & sCustom1 & ".C4#" & sCustom4 & ALL_TOPXC1XC4)
Call SetValPL("A#P20201.C1#" & sCustom1 & ".C4#" & sCustom4, nVal)

Finally the sub routine for calculation is

Sub SetValPL(sCFAccount, nVal)

If nVal <> 0 Then

Call HS.SetDataWithPOV(sCFAccount & ALL_NONEXC1XC4, nVal, False)
Else
Call HS.Clear(sCFAccount & ALL_NONEXC1XC4)
End If