on 02-02-2017 3:30 PM
Dear experts,
Inside DEFAULT.LGF, I am using LOOKUP to get a value that is stored in the same member of COMPANY dimension as the current member of the record being treated. For other dimensions the value is stored on specific members, this part is not a problem.
I am stuck one the syntax on the DIM instruction for COMPANY as indicated below:
*LOOKUP PurchasePlan
*DIM FOB:ACCOUNT = ACC_93
*DIM FOB:TIME=Year.INP
*DIM FOB:SUPPLIER=SUP_UNDEF
*DIM FOB:COMPANY= ??? //what syntax to use?
*DIM FOB:PHASE=P_002
*ENDLOOKUP
Then my calling code will be
*WHEN ACCOUNT
*IS ACC_52
*REC(FACTOR=LOOKUP(FOB),ACCOUNT=ACC_162) //FOB
*ENDWHEN
I have tried the following with no success (no value retrieved by LOOKUP(FOB))
*DIM FOB:COMPANY=COMPANY.ID
*DIM FOB:COMPANY=COMPANY
One solution I found is working is to write it as follow:
*DIM FOB:COMPANY=%COMPANY_SET%
But it works only it my scope have only 1 COMPANY.
When I load a file that have data of 2 different COMPANY and that triggers the DEFAULT logic, the package fails and I have the following error:
(DI45 and DI75 are members of COMPANY dimension).
So it seems all company members are inside %COMPANY_SET% variable at the same time.
Any help would be very appreciated.
Thanks in advance
Alexandre
Sorry, but why do you want to use LOOKUP at all? Are you looking for a value in another model?
If you are looking data in another model - simply delete the line with *DIM FOB:COMPANY=...
If not specified the current record COMPANY will be used 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, good to know that!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it depends on bpc version and SP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I meant LOOKUP works inside DEFAULT.LGF without MEASURE, I used it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok but I can tell it works without specifying MEASURE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please read my blog https://blogs.sap.com/2014/06/09/how-to-write-defaultlgf/
In the LOOKUP sample you will see the MEASURE defined!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vadim,
Thanks for your answer, actually I am looking for a data inside the same model. I used to do this using a tuple but after discussing with a BPC consultant he adviced me to use LOOKUP even in the same model. Actually I found it pretty convenient and with good performance. You don't think it is a good solution?
The problem seems to be specific to the DEFAULT logic because when I remove the line of the COMPANY dimension the calculation is not happening, however when I do the same in another script logic it works fine!
Anyway thanks for confirming that removing the line was the correct solution.
Alexandre
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"he adviced me to use LOOKUP" 🙂 strange consultant!
Code has to be:
*WHEN ACCOUNT
*IS ACC_52
*REC(FACTOR=([ACCOUNT].[ACC_93],[TIME].[Year.INP],[SUPPLIER].[SUP_UNDEF],[PHASE].[P_002]),ACCOUNT=ACC_162) //FOB
*ENDWHEN
User | Count |
---|---|
16 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.