cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Consolidation Script logic based on ownership account method <> 0

Former Member
0 Kudos
226

Hello all, i am writing a script logic to run a program for all entities where method in ownership model is not equal to zero.

I have some entities with ownership method is zero when the below calc_program runs the program is posting entries to these entities of that group which is not correct. please advise me how to correct this.

The logic

Script logic

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

*LOOKUP OWNERSHIP_IGAAP
*DIM LOOKUPMETHOD:INTCO="I_NONE"
*DIM LOOKUPMETHOD:GROUPS=%GROUPS_SET%
*DIM LOOKUPMETHOD:TIME=%TIME_SET%
*DIM LOOKUPMETHOD:MEASURES="PERIODIC"
*DIM LOOKUPMETHOD:VERSION="V100"
*DIM LOOKUPMETHOD:ENTITY=%ENTITY_SET%
*DIM LOOKUPMETHOD:O_ACCT="METHOD"
//*DIM LOOKUPMETHOD:SIGNDATA <>0
*ENDLOOKUP

*WHEN LOOKUP(LOOKUPMETHOD)
*IS <> 0
*RUN_PROGRAM CALC_ACCOUNT
CURRENCY = %CURRENCY_SET%
CATEGORY = %VERSION_SET%
TID_RA = %TIME_SET%

CALC=CTA
OTHER = [ENTITY=%ENTITY_SET%,GROUP = %GROUPS_SET%]
*ENDRUN_PROGRAM
*ENDWHEN


Accepted Solutions (0)

Answers (2)

Answers (2)

former_member186338
Active Contributor
0 Kudos

P.S. In WHEN/ENDWHEN you can try to use conditional REC like:

*REC(EXPRESSION=LOOKUP(LOOKUPMETHOD)>0 ? xxx : yyy, zzz)

former_member186338
Active Contributor
0 Kudos

Sorry, but not possible:

"*WHEN LOOKUP(LOOKUPMETHOD)
*IS <> 0" - not supported syntax, you can't use LOOKUP in WHEN condition.

Also you can't use *RUN_PROGRAM CALC_ACCOUNT inside WHEN/ENDWHEN - only REC allowed.