Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Multi LOOKUP on same cube not allowed

Hi Experts,

I am Trying to use *LOOKUP/*ENDLOOKUP but I am getting an error "Multi LOOKUP on same cube not allowed".

My understanding is you cannot provide more than one variable to the lookup function simultaneously.

So I thought I will pass the variables one by one using the *FOR/*NEXT function.

But I am still getting the same error.

Is there any work around to this limitation of *LOOKUP/*ENDLOOKUP?

Please see below code.

*SELECT(%ENT%,"[ID]","ENTITY","[CALC]=N")

*FOR %E%=%ENT%

*WHEN AUDITTRAIL

*IS "XXXX"

*WHEN ACCOUNT

*IS "YYYY"

*LOOKUP Ownership

*DIM NCIFLASH:TIME=%TIME_SET%

*DIM NCIFLASH:CATEGORY="AAAA"

*DIM NCIFLASH:ENTITY=%E%

*DIM NCIFLASH:INTERCO="I_NONE"

*DIM NCIFLASH:SCOPE="G_ABCD"

*DIM NCIFLASH:O_ACCOUNT="POWN"

*DIM NCIFLASH:MEASURES="PERIODIC"

*ENDLOOKUP

*REC(FACTOR=1-LOOKUP(NCIFLASH), ACCOUNT="XYZ")

*ENDWHEN

*ENDWHEN

*NEXT

Thanks in anticipcation

Collin.

Tags:
Former Member
replied

OK, now it's clear!

You don't need to create FOR/NEXT loop, just don't specify members for entity. Members for entity in lookup will be from WHEN/ENDWHEN loop

//single lookup before other code

*LOOKUP Ownership

*DIM NCIFLASH:TIME=%TIME_SET%

*DIM NCIFLASH:CATEGORY="AAAA"

*DIM NCIFLASH:ENTITY=%E%

*DIM NCIFLASH:INTERCO="I_NONE"

*DIM NCIFLASH:SCOPE="G_ABCD"

*DIM NCIFLASH:O_ACCOUNT="POWN"

*DIM NCIFLASH:MEASURES="PERIODIC"

*ENDLOOKUP

*XDIM_MEMBERSET ENTITY=%ENTITY_SET%

*WHEN AUDITTRAIL

*IS "XXXX"

*WHEN ACCOUNT

*IS "YYYY"

*REC(FACTOR=1-LOOKUP(NCIFLASH), ACCOUNT="XYZ")

*ENDWHEN

*ENDWHEN

Vadim

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question