0% found this document useful (0 votes)
4 views5 pages

OFS Prepare Plan

Uploaded by

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

OFS Prepare Plan

Uploaded by

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

OFS_Prepare_Plan :

--------------------------

set updatecalc off;


set aggmissg on;
FIX (OEP_Plan,OEP_Working,&OEP_CurYr)
FIX (@remove(@relative("Period",0),@list(@relative("Financial Integration Mapping",0),"No
Period")))
/* Start Template:SPlan.OEP_FS.OFS_Prepare Plan_T*/
FIX (OEP_Working, @relative("No Currency", 0))
Fix (@relative("OEP_No Entity", 0))
Fix (@remove(@relative("Account", 0), @list(@relative("System Members", 0),
@relative("OFS_Cross Module Integration", 0))))
"OFS_Calculated" (
@calcmode(block);
@calcmode(bottomup);
if ("OFS_Trend"->"BegBalance"<> #Missing)
if (@ismbr(&OEP_PlanStartYr:&OEP_PlanEndYr))
if (@ismbr(@relative(YearTotal, 0)))
If ("OFS_Trend"->"BegBalance" == 1)
if (@isuda("Account", "CalcRound"))
OFS_Calculated = @Round(@AVGRANGE(SKIPNONE, "OEP_Actual"->"OFS_Load"-
>&OEP_CurYr, &OEP_StartMnth:&OEP_CurMnth) * (1 + "OFS_% Increase/(Decrease)"-
>"BegBalance"));
else
OFS_Calculated = @AVGRANGE(SKIPNONE, "OEP_Actual"->"OFS_Load"->&OEP_CurYr,
&OEP_StartMnth:&OEP_CurMnth) * (1 + "OFS_% Increase/(Decrease)"->"BegBalance");
endif
elseif ("OFS_Trend"->"BegBalance" == 2)
if (@isuda("Account", "CalcRound"))
OFS_Calculated = @Round(("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load") *
(1 + "OFS_% Increase/(Decrease)"->"BegBalance"));
else
OFS_Calculated = ("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load") * (1 + "OFS_
% Increase/(Decrease)"->"BegBalance");
endif
elseif ("OFS_Trend"->"BegBalance" == 4)
if (@isuda("Account", "CalcRound"))
OFS_Calculated = @Round(@avgrange(skipnone, "OEP_Actual"->"OFS_Load"-
>&OEP_PriorYr, @relative("YearTotal", 0)) * (1 + "OFS_% Increase/(Decrease)"->"BegBalance"));
else
OFS_Calculated = @avgrange(skipnone, "OEP_Actual"->"OFS_Load"->&OEP_PriorYr,
@relative("YearTotal", 0)) * (1 + "OFS_% Increase/(Decrease)"->"BegBalance");
endif
elseif ("OFS_Trend"->"BegBalance" == 5)
if (@isuda("Account", "CalcRound"))
OFS_Calculated = @Round(("OEP_Actual"->"OFS_Load"->&OEP_PriorYr) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance"));
else
OFS_Calculated = ("OEP_Actual"->"OFS_Load"->&OEP_PriorYr) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance");
endif
elseif ("OFS_Trend"->BegBalance == 12)
OFS_Calculated = #missing;
elseif ("OFS_Trend"->BegBalance == #missing and "OFS_Adjustment (+/-)"<> #missing)

Page 1 of 5
OFS_Calculated = 0;
OFS_Calculated = #missing;
elseif ("OFS_Trend"->"BegBalance" == 6)
if (@isuda("Account", "CalcRound"))
"OFS_Calculated" = @Round(@avgrange(skipnone, "OEP_Forecast"->"OFS_Total Plan"-
>@member(@prevsibling(@currmbr(Years))), @relative("YearTotal", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance"));
else
"OFS_Calculated" = @avgrange(skipnone, "OEP_Forecast"->"OFS_Total Plan"-
>@member(@prevsibling(@currmbr(Years))), @relative("YearTotal", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance");
endif
elseif ("OFS_Trend"->"BegBalance" == 8)
if (@isuda("Account", "CalcRound"))
"OFS_Calculated" = @Round(@prior("OEP_Forecast"->"OFS_Total Plan", 1, @LEVMBRS("Years", 0)) *
(1 + "OFS_% Increase/(Decrease)"->"BegBalance"));
else
"OFS_Calculated" = @prior("OEP_Forecast"->"OFS_Total Plan", 1, @LEVMBRS("Years", 0)) * (1 +
"OFS_% Increase/(Decrease)"->"BegBalance");
endif
elseif ("OFS_Trend"->"BegBalance" == 10)
if (@isuda("Account", "calcRound"))
"OFS_Calculated" = @Round(@prior("OFS_Total Plan", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance"));
else
"OFS_Calculated" = @prior("OFS_Total Plan", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance");
endif
endif
/* this endif is needed for the trend */
endif
elseif (@ismbr(&OEP_QrtlyPlanStart:&OEP_QrtlyPlanEnd))
If (Not (@ismbr("No Year")))
if (@ismbr(@relative("OEP_Qrtly Plan", 0)))
If ("OFS_Trend"->"BegBalance" == 1)
if (@isuda("Account", "CalcRound"))
if (@isuda("Account", "Flow"))
"OFS_Calculated" = @Round((@AVGRANGE(SKIPNONE, "OEP_Actual"->"OFS_Load"->&OEP_CurYr,
&OEP_StartMnth:&OEP_CurMnth)) * "PeriodsInQtr" * (1 + "OFS_% Increase/(Decrease)"-
>"BegBalance"));
else
"OFS_Calculated" = @Round((@AVGRANGE(SKIPNONE, "OEP_Actual"->"OFS_Load"->&OEP_CurYr,
&OEP_StartMnth:&OEP_CurMnth)) * (1 + "OFS_% Increase/(Decrease)"->"BegBalance"));
endif
else
if (@isuda("Account", "Flow"))
OFS_Calculated = (@AVGRANGE(SKIPNONE, "OEP_Actual"->"OFS_Load"->&OEP_CurYr,
&OEP_StartMnth:&OEP_CurMnth)) * "PeriodsInQtr" * (1 + "OFS_% Increase/(Decrease)"-
>"BegBalance");
else
OFS_Calculated = (@AVGRANGE(SKIPNONE, "OEP_Actual"->"OFS_Load"->&OEP_CurYr,
&OEP_StartMnth:&OEP_CurMnth)) * (1 + "OFS_% Increase/(Decrease)"->"BegBalance");
endif
endif
elseif ("OFS_Trend"->"BegBalance" == 2)
if (@isuda("Account", "CalcRound"))
if (@isuda("Account", "Flow"))

Page 2 of 5
OFS_Calculated = @Round((("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load")
* "PeriodsInQtr") * (1 + "OFS_% Increase/(Decrease)"->"BegBalance"));
else
OFS_Calculated = @Round((("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr-
>"OFS_Load")) * (1 + "OFS_% Increase/(Decrease)"->"BegBalance"));
endif
else
if (@isuda("Account", "Flow"))
OFS_Calculated = (("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load") *
"PeriodsInQtr") * (1 + "OFS_% Increase/(Decrease)"->"BegBalance");
else
OFS_Calculated = (("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load")) * (1 +
"OFS_% Increase/(Decrease)"->"BegBalance");
endif
endif
elseif ("OFS_Trend"->"BegBalance" == 4)
if (@isuda("Account", "CalcRound"))
if (@isuda("Account", "Flow"))
OFS_Calculated = @Round((@avgrange(skipnone, "OEP_Actual"->"OFS_Load"-
>&OEP_PriorYr, @relative("YearTotal", 0)) * "PeriodsInQtr") * (1 + "OFS_% Increase/(Decrease)"-
>"BegBalance"));
else
OFS_Calculated = @Round((@avgrange(skipnone, "OEP_Actual"->"OFS_Load"-
>&OEP_PriorYr, @relative("YearTotal", 0))) * (1 + "OFS_% Increase/(Decrease)"->"BegBalance"));
endif
else
if (@isuda("Account", "Flow"))
OFS_Calculated = (@avgrange(skipnone, "OEP_Actual"->"OFS_Load"->&OEP_PriorYr,
@relative("YearTotal", 0)) * "PeriodsInQtr") * (1 + "OFS_% Increase/(Decrease)"->"BegBalance");
else
OFS_Calculated = (@avgrange(skipnone, "OEP_Actual"->"OFS_Load"->&OEP_PriorYr,
@relative("YearTotal", 0))) * (1 + "OFS_% Increase/(Decrease)"->"BegBalance");
endif
endif
elseif ("OFS_Trend"->"BegBalance" == 10)
if (@prior("OEP_Qrtly Plan", 1, @levmbrs("Years", 0)) <> #Missing)
if (@isuda("Account", "CalcRound"))
@Round(@Prior("OFS_Total Plan", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance"));
else
@Prior("OFS_Total Plan", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_% Increase/(Decrease)"-
>"BegBalance");
endif
else
if (@isuda("Account", "CalcRound"))
if (@ismbr("Qtrly 1"))
@Round(@Prior("OFS_Total Plan"->"Q1", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance"));
elseif (@ismbr("Qtrly 2"))
@Round(@Prior("OFS_Total Plan"->"Q2", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance"));
elseif (@ismbr("Qtrly 3"))
@Round(@Prior("OFS_Total Plan"->"Q3", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance"));
elseif (@ismbr("Qtrly 4"))
@Round(@Prior("OFS_Total Plan"->"Q4", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance"));

Page 3 of 5
endif
else
if (@ismbr("Qtrly 1"))
@Prior("OFS_Total Plan"->"Q1", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance");
elseif (@ismbr("Qtrly 2"))
@Prior("OFS_Total Plan"->"Q2", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance");
elseif (@ismbr("Qtrly 3"))
@Prior("OFS_Total Plan"->"Q3", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance");
elseif (@ismbr("Qtrly 4"))
@Prior("OFS_Total Plan"->"Q4", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance");
endif
endif
endif
elseif ("OFS_Trend"->BegBalance == 12)
OFS_Calculated = #missing;
elseif ("OFS_Trend"->BegBalance == #missing and "OFS_Adjustment (+/-)"<> #missing)
OFS_Calculated = 0;
OFS_Calculated = #missing;
endif
endif
endif
elseif (@ismbr(&OEP_YrlyPlanStart:&OEP_YrlyPlanEnd))
If (Not (@ismbr("No Year")))
if (@ismbr("OEP_Yearly Plan"))
if ("OFS_Trend"->"BegBalance" == 10)
if (@prior("OEP_Yearly Plan"->"OFS_Total Plan", 1, @levmbrs("Years", 0)) <> #Missing)
if (@isuda("Account", "CalcRound"))
OFS_Calculated = @Round(@Prior("OFS_Total Plan", 1, @LEVMBRS("Years", 0)) * (1 +
"OFS_% Increase/(Decrease)"->"BegBalance"));
else
OFS_Calculated = @Prior("OFS_Total Plan", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance");
endif
elseif (@prior("OEP_Qrtly Plan"->"OFS_Total Plan", 1, @levmbrs("Years", 0)) <> #Missing)
if (@isuda("Account", "CalcRound"))
OFS_Calculated = @Round(@Prior("OFS_Total Plan"->"Qrtly Plan", 1,
@LEVMBRS("Years", 0)) * (1 + "OFS_% Increase/(Decrease)"->"BegBalance"));
else
OFS_Calculated = @Prior("OFS_Total Plan"->"Qrtly Plan", 1, @LEVMBRS("Years", 0)) * (1
+ "OFS_% Increase/(Decrease)"->"BegBalance");
endif
elseif (@prior("YearTotal"->"OFS_Total Plan", 1, @levmbrs("Years", 0)) <> #Missing)
if (@isuda("Account", "CalcRound"))
OFS_Calculated = @Round(@Prior("OFS_Total Plan"->"YearTotal", 1, @LEVMBRS("Years",
0)) * (1 + "OFS_% Increase/(Decrease)"->"BegBalance"));
else
OFS_Calculated = @Prior("OFS_Total Plan"->"YearTotal", 1, @LEVMBRS("Years", 0)) * (1 +
"OFS_% Increase/(Decrease)"->"BegBalance");
endif
endif
elseif ("OFS_Trend"->BegBalance == 12)
OFS_Calculated = #missing;
elseif ("OFS_Trend"->BegBalance == #missing and "OFS_Adjustment (+/-)"<> #missing)

Page 4 of 5
OFS_Calculated = 0;
OFS_Calculated = #missing;
endif
endif
endif
endif
endif
)
;
endfix
Fix (OFS_Calculated)
calc dim ("Account");
endfix
Endfix
EndFix
/* End Template:SPlan.OEP_FS.OFS_Prepare Plan_T*/
ENDFIX
ENDFIX

Page 5 of 5

You might also like