Skip to Content
avatar image
Former Member

Consolidation Script logic based on ownership account method <> 0

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


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Sep 01, 2017 at 05:26 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 01, 2017 at 06:02 AM

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

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

    Add comment
    10|10000 characters needed characters exceeded