on ‎2022 Nov 17 11:14 AM
Hi all.
Into a SAC planning model built to manage loan topics I have to prepare postings to several accounts
(interests posted on a "65" account, "annual payments on a "55" and so on ... to populate a planned P&L)
Some loans are very long (like > 40 years).
I've written something which is working as expected, but not "clean" from my point of view.
For some undetermined reasons all my attemps using FOR or FOREACH instruction have failed. (I'm probably missing something)
Just copy-pasting the same piece of script into many steps, changing only the time scope (with a "NEXT") works.
Please check below :

Several of my calculations are referrencing the previous year -> is there a possibility that calculated records are commited only when the script switch to next step of the advanced formula ?
(that would explain why my "not clean" solution works and the FOREACH usage don't)
(Before SAC I was using BPC and a *COMMIT was making available the result of a calculation for the next loop)
Thanks in advance for advices and thoughts.
Rgds.
Guillaume P.
Request clarification before answering.
Hi guillaume_petiaux,
You could try to have FOR loop for date dimension as below.
INTEGOR @COUNT
FOR @COUNT = 0 TO 39 STEP 1
IF RESULTLOOKUP([d/Date] = Next(@COUNT, "YEAR', %date_dec%)) ... THEN
...
ELSE
...
ENDIF
ENDFORBest regards, Willaim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.