We're using BPC 10.1 SP2 for NW and seeing odd behavior with BPC Script. I've taken my actual more complicated script and stripped it down to a very simple form to confirm that the values are still tripled. Note that the value is tripled on the first run. Subsequent runs do NOT increase the value.
I have found a work-around by using a FOR loop, but this changed the run time from my script from 55 seconds to 18 minutes. My code will eventually reside within a package and in Default logic, so 18 minutes is unacceptable. I have hard-coded a few of the members for test purposes. Any suggestions as to what might be happening?
Test Results:
1. Multiple embedded WHEN statements did not change the behavior
2. Omitting the MEASURES scoping did not change the behavior
3. Limiting scope to a single ENTITY produced correct results but this is not a viable option
Code that triples:
*SELECT(%PROFIT_CENTERS%, "[ID]", "ENTITY", "[INTCO]<>''")
*XDIM_MEMBERSET ACCOUNT = 701003
*XDIM_MEMBERSET AUDIT_ID = ALLOCATION_ENTRY
*XDIM_MEMBERSET CURRENCY = LC
*XDIM_MEMBERSET ENTITY = %PROFIT_CENTERS%
*XDIM_MEMBERSET FLOW = F_CLO
*XDIM_MEMBERSET INTERCO = I_1000
*XDIM_MEMBERSET SCOPE = S_NONE
*XDIM_MEMBERSET TIME = 2012.03
*XDIM_MEMBERSET VERSION = PLAN
*XDIM_MEMBERSET MEASURES = YTD
*WHEN CURRENCY
*IS LC
*REC(EXPRESSION=(%VALUE%),VERSION="ACTUAL",AUDIT_ID="ALLOC_CALC_MGMT")
*ENDWHEN
Code that works but takes too long:
*SELECT(%PROFIT_CENTERS%, "[ID]", "ENTITY", "[INTCO]<>''")
*XDIM_MEMBERSET ACCOUNT = 701003
*XDIM_MEMBERSET AUDIT_ID = ALLOCATION_ENTRY
*XDIM_MEMBERSET CURRENCY = LC
*XDIM_MEMBERSET ENTITY = %PROFIT_CENTERS%
*XDIM_MEMBERSET FLOW = F_CLO
*XDIM_MEMBERSET INTERCO = I_1000
*XDIM_MEMBERSET SCOPE = S_NONE
*XDIM_MEMBERSET TIME = 2013.03
*XDIM_MEMBERSET VERSION = PLAN
*XDIM_MEMBERSET MEASURES = YTD
*FOR %CENTER% = %PROFIT_CENTERS%
*WHEN ENTITY
*IS %CENTER%
*REC(EXPRESSION=(%VALUE%),VERSION="ACTUAL",AUDIT_ID="ALLOC_CALC_MGMT")
*ENDWHEN
*NEXT
Request clarification before answering.
Hi,
I'm not sure why you getting the records in the scope when there is no transaction data.
Can you add,
*WHEN_REF_DATA=TRANS_DATA just to avoid any ambiguity and try ?
..
..
*ENDWHEN
Prat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you are talking about default.lgf then please read my article
In general you have to avoid using scope changing operators in default.lgf. Use *IS instead.
*SELECT(%PROFIT_CENTERS%, "[ID]", "ENTITY", "[INTCO]<>''")
*WHEN CURRENCY
*IS LC
*WHEN ENTITY
*IS %PROFIT_CENTERS%
*WHEN ACCOUNT
*IS 701003
...
*REC(EXPRESSION=(%VALUE%),VERSION="ACTUAL",AUDIT_ID="ALLOC_CALC_MGMT")
*ENDWHEN
*ENDWHEN
*ENDWHEN
...
Vadim
Thank you Vadim. Although I do have to create similar code in DEFAULT logic, I'm not at that point yet. I'm currently just trying to get this simple script to work via a package.
I've never had this much trouble getting a script to work, so I think there is something misconfigured on the server or a bug, but I'm still testing.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 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.