cancel
Showing results for 
Search instead for 
Did you mean: 

LOOKUP for accounts in %ACCOUNT_SET%

Former Member
0 Kudos

Hye. I try to do a easy scriptlogic but I get error.

I have an input report witth 3 accounts (5700,5710,5720) as lines and 2009.JUN and 2009.JUL as columns.

I introduce data in month 2009.JUL in input report and I use LOOKUP in a Script Logic Default in order to get the data of 2009.JUN for each account from other cube "FINANCE".

The default code is:

*LOOKUP FINANCE

*DIM ACCOUNT="%ACCOUNT_SET%"

*DIM CATEGORY="BUDGET"

*DIM JUN:TIME="2009.JUN"

*ENDLOOKUP

*XDIM_MEMBERSET ACCOUNT=5700, 5710, 5720

*WHEN CATEGORY

*IS BUDGET

*REC(EXPRESSION=LOOKUP(JUN), TIME=2009.JUN, ACCOUNT)

*ENDWHEN

*ENDWHEN

*COMMIT

I want to make a LOOKUP for each account (5700, 5710, 5720) to Cube FINANCE but when I push "Send Data" I get the next error: "Error running default logic (Member "5700,5710,5720" not exist"".

I think that the LOOKUP considers that DIM ACCOUNT is "5700,5710,5720" all together, so I get an errror.

How can I do it?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanlks for your solutions.

If I delete the ACCOUNT line inside LOOKUP, It runs ok.

Thanks.

Former Member
0 Kudos

Thanks Seldon but It doesn´t work.

I validate default script with your code and I get an error: Multi LOOKUP in the same cube not allowed.

I use the next code and when i push sendata in my report, I get an error : Error running default logic (Member "%ACCT%" not exist.

*LOOKUP FINANCE

*DIM ACCOUNT="%ACCT%"

*DIM CATEGORY="BUDGET"

*DIM JUN:TIME="2009.JUN";

*ENDLOOKUP

*XDIM_MEMBERSET ACCOUNT=5700, 5710, 5720

*FOR %ACCT%=5700,5710,5720

*WHEN CATEGORY

*IS BUDGET

*REC(EXPRESSION=LOOKUP(JUN), TIME=2009.JUN)

*ENDWHEN

*ENDWHEN

*COMMIT

*NEXT

Former Member
0 Kudos

Hi,

You cannot hav two LOOKUP functions in a single script logic.

And while you are looking the values from some other application, specify values for all the dimension that varies from your current application.

It seems both your application are having the same account dimension. So its not required to have acccount dimension inside Lookup. Just specify the scope of account dimension using XDIM_MEMBERSET and try running the logic.

Hope this helps,

Regards,

G.Vijaya Kumar

SEdelstein
Product and Topic Expert
Product and Topic Expert
0 Kudos

Please try the following:

 
*XDIM_MEMBERSET ACCOUNT=5700, 5710, 5720 

*FOR %ACCT%=5700,5710,5720 

*LOOKUP FINANCE 
*DIM ACCOUNT="%ACCT%" 
*DIM CATEGORY="BUDGET" 
*DIM JUN:TIME="2009.JUN"; 
*ENDLOOKUP 


*WHEN CATEGORY 
*IS BUDGET 
*REC(EXPRESSION=LOOKUP(JUN), TIME=2009.JUN) 
*ENDWHEN 
*ENDWHEN 
*COMMIT 

*NEXT 

I haven't tried using a FOR/NEXT loop around a LOOKUP, but it might work.

Regards,

Sheldon