on 2020 Feb 04 4:10 PM
Hi,
I have a script logic in which I tested A + B = C (A = -10, B=3, C=-7); the result is correct. However, once I change the operator from "+" to "*", i.e A * B, the system generates 0.00 record. I find it weird why the result is 0 when the source members are having values. (System: BPC 11 BPC4HANA SP level 7)
*REC(EXPRESSION = ([ACCOUNT].[ST_SALES_PRICE_DOM]+([ACCOUNT].[ST_SALES_VOLUME_DOM])), ACCOUNT = 11060001, PLANT = P_NONE, PROFIT_CENTRE = PC_NONE, AUDITTRAIL = PLAN_CALCULATED). Result = -7
vs
*REC(EXPRESSION = ([ACCOUNT].[ST_SALES_PRICE_DOM]*([ACCOUNT].[ST_SALES_VOLUME_DOM])), ACCOUNT = 11060001, PLANT = P_NONE, PROFIT_CENTRE = PC_NONE, AUDITTRAIL = PLAN_CALCULATED). Result = 0
Any possible reasons why this is happening?
Thanks!
Request clarification before answering.
Hi Vadim,
Could you advice on a more efficient manner of scoping, to prevent 0 record combination?
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's not about efficient manner of scoping! You have to provide full info according to
https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues/
You have to show report with all dimensions visible with existing data values. And to explain the required logic!
Hi Vadim,
Thanks for explanation! So I believed, the way to resolve this is to be very specific on the members required for calculation..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Very easy to understand! You are not looking on other dimensions!
ACCOUNT: ST_SALES_PRICE_DOM
DIMx: MEMBER1
VALUE: -10
ACCOUNT: ST_SALES_PRICE_DOM
DIMx: MEMBER2
VALUE: 0
.
ACCOUNT: ST_SALES_VOLUME_DOM
DIMx: MEMBER2
VALUE: 3
ACCOUNT: ST_SALES_VOLUME_DOM
DIMx: MEMBER1
VALUE: 0
If you sum, then due to accumulation the result will be -7
-10+0=-10
3+0=3
Accumulation: -10+3=-7
But if you multiply the you will have 2 records, each resulting in 0!
-10*0=0
0*3=0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 7 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.