on 08-19-2022 7:32 AM
Hi All,
We have a Data action to calculate the Cashflow Lines which are all Static GLs by copying data from certain P&L accounts or Balance Sheet accounts.
This code works in the non-prod environment.
However, when we execute in Prod no data in written in static accounts (S_990040, S_990053 etc) instead the existing data in P&L/ BS Nodes xx_0108, xx_0134 is getting wiped out.
Please help with any pointers you may have.
(Sample code below, same is happening for all other accounts in the code)
CONFIG.TIME_HIERARCHY = FISCALYEAR
CONFIG.FLIPPING_SIGN_ACCORDING_ACCTYPE = OFF
CONFIG.GENERATE_UNBOOKED_DATA = OFF
MEMBERSET [d/Date] = %TargetYearFrom% TO %TargetYearTo%
MEMBERSET [d/XX_P_COMPCODE] = (%Entity%)
MEMBERSET [d/XX_P_PROFITCENTER] = (BASEMEMBER([d/XX_P_PROFITCENTER].[h/Hierarchy], "0CORPORATE", "0PROGRAM", "0PS", "0SC", "0SPARES"))
MEMBERSET [d/XX_P_AUDITTRAIL] = (BASEMEMBER([d/XX_P_AUDITTRAIL].[h/AuditHier], "ALL"))
VARIABLEMEMBER #TAX OF [d/XX_P_GLACCOUNT]
VARIABLEMEMBER #EBT OF [d/XX_P_GLACCOUNT]
// Net Income (EBT - Tax- sign reversed so that Loss is sent as -VE into Cashflow
IF [d/XX_P_GLACCOUNT] = BASEMEMBER([d/XX_P_GLACCOUNT].[h/parentId], "XX_0134") THEN
DATA([d/XX_P_GLACCOUNT] = #EBT, [d/XX_P_AUDITTRAIL] = "CALC",[d/XX_P_COMPCODE]=%Entity%) = RESULTLOOKUP([d/XX_P_COMPCODE]=%Entity%)
ENDIF
IF [d/XX_P_GLACCOUNT] = BASEMEMBER([d/XX_P_GLACCOUNT].[h/parentId], "XX_0108") THEN
DATA([d/XX_P_GLACCOUNT] = #TAX, [d/XX_P_AUDITTRAIL] = "CALC", [d/XX_P_COMPCODE]=%Entity%) = RESULTLOOKUP([d/XX_P_COMPCODE]=%Entity%)
ENDIF
DATA([d/XX_P_GLACCOUNT] = "S_990040", [d/XX_P_AUDITTRAIL] = "CALC",[d/XX_P_COMPCODE]=%Entity%) = (RESULTLOOKUP([d/XX_P_GLACCOUNT] = #EBT) - RESULTLOOKUP([d/XX_P_GLACCOUNT] = #TAX)) *-1
//IFRS16
DATA([d/XX_P_GLACCOUNT] = "S_990053", [d/XX_P_AUDITTRAIL] = "CALC") = RESULTLOOKUP([d/XX_P_GLACCOUNT] = "4007",[d/XX_P_COMPCODE]=%Entity%)
Thanks,
Amrita
Just structured the whole code.
Assumption is that for %Entity% leaf level members were passed as parameter value.
You should put up validated code from editor along with the Data Action parameter values used during code run to better assess the issue.
CONFIG.TIME_HIERARCHY = FISCALYEAR
CONFIG.FLIPPING_SIGN_ACCORDING_ACCTYPE = OFF
CONFIG.GENERATE_UNBOOKED_DATA = OFF
MEMBERSET [d/Date] = %TargetYearFrom% TO %TargetYearTo%
MEMBERSET [d/XX_P_COMPCODE] = %Entity% // Needs to be in BASEMEMBER if parent nodes are passed as parameter value
MEMBERSET [d/XX_P_PROFITCENTER] = BASEMEMBER([d/XX_P_PROFITCENTER].[h/Hierarchy], "0CORPORATE", "0PROGRAM", "0PS", "0SC", "0SPARES")
MEMBERSET [d/XX_P_AUDITTRAIL] = BASEMEMBER([d/XX_P_AUDITTRAIL].[h/AuditHier], "ALL")
VARIABLEMEMBER #EBT OF [d/XX_P_GLACCOUNT]
VARIABLEMEMBER #TAX OF [d/XX_P_GLACCOUNT]
VARIABLEMEMBER #ROU OF [d/XX_P_GLACCOUNT] // Not being used
// Net Income (EBT - Tax- sign reversed so that Loss is sent as -VE into Cashflow
IF [d/XX_P_GLACCOUNT] = BASEMEMBER([d/XX_P_GLACCOUNT].[h/parentId], "XX_0134") THEN
DATA([d/XX_P_GLACCOUNT] = #EBT, [d/XX_P_AUDITTRAIL] = "CALC") = RESULTLOOKUP()
ENDIF
IF [d/XX_P_GLACCOUNT] = BASEMEMBER([d/XX_P_GLACCOUNT].[h/parentId], "XX_0108") THEN
DATA([d/XX_P_GLACCOUNT] = #TAX, [d/XX_P_AUDITTRAIL] = "CALC") = RESULTLOOKUP()
ENDIF
DATA([d/XX_P_GLACCOUNT] = "S_990040", [d/XX_P_AUDITTRAIL] = "CALC") = (RESULTLOOKUP([d/XX_P_GLACCOUNT] = #EBT, [d/XX_P_AUDITTRAIL] = "CALC") - RESULTLOOKUP([d/XX_P_GLACCOUNT] = #TAX, [d/XX_P_AUDITTRAIL] = "CALC")) *-1
//IFRS16
DATA([d/XX_P_GLACCOUNT] = "S_990053", [d/XX_P_AUDITTRAIL] = "CALC") = RESULTLOOKUP([d/XX_P_GLACCOUNT] = "4007")
Please see if this works.
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
amritagoswami
This is indeed very strange. Not calculating the stat account is ok but deleting the values of "XX_0134" base members is what is baffling me more as those are not referred in our data statement . Just try one last thing. Replace the #EBT variable with an actual stat account member (create one ) and see if only EBT is calculated or not.
IF [d/XX_P_GLACCOUNT] = BASEMEMBER([d/XX_P_GLACCOUNT].[h/parentId], "XX_0134") THEN
DATA([d/XX_P_GLACCOUNT] = "EBTACCOUNT", [d/XX_P_AUDITTRAIL] = "CALC") = RESULTLOOKUP()
ENDIF
amritagoswami
You declared the below GL Account Variable to aggregate Account balances.
VARIABLEMEMBER #TAX OF [d/XX_P_GLACCOUNT]
VARIABLEMEMBER #ROU OF [d/XX_P_GLACCOUNT]
But in your DATA statement you have used. #EBT
IF [d/XX_P_GLACCOUNT] = BASEMEMBER([d/XX_P_GLACCOUNT].[h/parentId], "XX_0134") THEN<br>DATA([d/XX_P_GLACCOUNT] = <strong>#EBT</strong>, [d/XX_P_AUDITTRAIL] = "CALC",[d/XX_P_COMPCODE]=%Entity%) = RESULTLOOKUP([d/XX_P_COMPCODE]=%Entity%)
ENDIF
Did I miss the #EBT Declaration?
Also I hope %Entity%, you are passing only single base level Entity value when running this DA.
Can you try this code snippet. You can keep all scoping members intact. As %Entity% is already passed in memberset we need not write it again in DATA or RESULTLOOKUP unless we are changing the context.
VARIABLEMEMBER #EBT OF [d/XX_P_GLACCOUNT]
IF [d/XX_P_GLACCOUNT] = BASEMEMBER([d/XX_P_GLACCOUNT].[h/parentId], "XX_0134") THEN
DATA([d/XX_P_GLACCOUNT] =#EBT,[d/XX_P_AUDITTRAIL] = "CALC") = RESULTLOOKUP()
ENDIF
IF [d/XX_P_GLACCOUNT] = BASEMEMBER([d/XX_P_GLACCOUNT].[h/parentId], "XX_0108") THEN
DATA([d/XX_P_GLACCOUNT] = #TAX, [d/XX_P_AUDITTRAIL] = "CALC") = RESULTLOOKUP()
ENDIF
DATA([d/XX_P_GLACCOUNT] = "S_990040", [d/XX_P_AUDITTRAIL] = "CALC") = (RESULTLOOKUP([d/XX_P_GLACCOUNT] = #EBT,[d/XX_P_AUDITTRAIL] = "CALC") - RESULTLOOKUP([d/XX_P_GLACCOUNT] = #TAX,[d/XX_P_AUDITTRAIL] = "CALC")) *-1
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
amritagoswami
I see that when you did EBT-TAX you missed Audit trail in your resultlookup.
DATA([d/XX_P_GLACCOUNT] = "S_990040", [d/XX_P_AUDITTRAIL] = "CALC") = (RESULTLOOKUP([d/XX_P_GLACCOUNT] = #EBT,[d/XX_P_AUDITTRAIL] = "CALC") - RESULTLOOKUP([d/XX_P_GLACCOUNT] = #TAX'[d/XX_P_AUDITTRAIL] = "CALC")) *-1
amritagoswami
Ok. You are passing a single leaf level Entity during DA run ? Also please add AUDITTRAIL ="CALC" in your resultlookup as thats where you created the virtual records for EBT and TAX
DATA([d/XX_P_GLACCOUNT] = "S_990040", [d/XX_P_AUDITTRAIL] = "CALC") = (RESULTLOOKUP([d/XX_P_GLACCOUNT] = #EBT,[d/XX_P_AUDITTRAIL] = "CALC") - RESULTLOOKUP([d/XX_P_GLACCOUNT] = #TAX,[d/XX_P_AUDITTRAIL] = "CALC")) *-1
Nikhil
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.