Hi everybody,
I have to get a value from one model within my application to save it in another model.
I tried to use the Lookup functionility of BPC but this doesn't work. I'm allways getting Zeros when I run the script.
Here is the code I used:
*LOOKUP MODELA
*DIM DATASRC = DS.TOTAL //Parent member
*DIM COMPANY = CO.2000 //Basemember
*DIM CURRENCY = USD //Basemember
*DIM MAC: A_ACCOUNT = A.N001 //Parent member
*ENDLOOKUP
*LOOKUP MODELB
*DIM MBC: COMPANY = CO.2000 //Basemember
*DIM MBC: CURRENCY = USD //Basemember
*DIM MBC: DATASRC = DS.TOTAL //Parent member
*DIM MBC: B_ACCOUNT = B.N001 //Parent member
*DIM MBC: RANK = RA.N001 //Parent member
*DIM MBC: NATIONALITY = NA.N001 //Parent member
*ENDLOOKUP
*SELECT(%CPTLF%,ID,CATEGORY,RUN_LOGIC = Y AND CALC = N)
*SELECT(%CPTPC%,ID,PROFIT_CENTRE,CALC = N)
*SELECT(%CPTFC%,ID,TIME,ACT_FOR = F AND LEVEL = MONTH AND CALC = N)
*XDIM_MEMBERSET A_ACCOUNT = A.1M406 //Specific Account
*XDIM_MEMBERSET PROFIT_CENTRE = %CPTPC%
*XDIM_MEMBERSET CATEGORY = %CPTLF%
*XDIM_MEMBERSET TIME = %CPTFC%
*XDIM_MEMBERSET COMPANY = CO.NA
*XDIM_MEMBERSET CURRENCY = USD
*XDIM_MEMBERSET DATASRC = CALC
*WHEN A_ACCOUNT
*IS A.1M406
*BEGIN
*REC(FACTOR = -(LOOKUP(MAC)+LOOKUP(MBC)),
DATASRC = CALC,A_ACCOUNT = A.10002,COMPANY = CO.2000)
*END
*ENDWHEN
When I run this script out of Model A everything seems to be working. But the Problem is that the lookup values for Model B are allways Zero. The strange thing is that this code worked last year correctly. This year the script doesn't calculates correctly. The difference is that we did a patch Level upgrade.
Regards
Derk