on 11-08-2018 12:33 PM
Hello experts,
I have a question Regarding Allocation function:
Is there a way to have a dinamic factor to allocate a value depending the number of members of each Node?
For Instance, if We want to allocate a certain value stored in x time member into the 12 members of the year, the allocation would be something like this:
*RUNALLOCATION
*FACTOR =1/12
*DIM TIME WHAT = 2018.INP ;Where = BAS(2018.TOTAL);
*ENDALLOCATION
In this case the factor is fixed because we konow the number of months that the year has but lets say I want to distribute by equal quantity a whta, for instance, the value of Acc A into Accs B,C,D,E...N where B,C,D,E...N are grouped in a hier called N_ACC.
*RUNALLOCATION
*FACTOR =???
*DIM ACCOUNT WHAT = A ;Where = BAS(N_ACC);
*ENDALLOCATION
I want my factor to be the number of members in BAS(N_ACC) but i don't know how many members are in the Node.
Is it possible to get that dynamic factor?
Best Regards.
Create special DATASOURCE and fill it once with 1 for all TIME base members of the year and all base accounts and other dimensions...
Let's name it "Other"
*RUNALLOCATION
*FACTOR =USING/TOTAL
*DIM ACCOUNT WHAT = PL110 ;Where = BAS(PL400); USING=<<<; TOTAL=<<<
*DIM AUDITTRAIL WHAT=Input;WHERE=<<<;USING=Other;TOTAL=<<<
*ENDALLOCATION
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
P.S. Please don't use tag SAP Business Planning and Consolidation, version for SAP BW/4HANA for questions about BPC Standard.
Use SAP Business Planning and Consolidation, version for SAP NetWeaver
Moderator alerted to change tag
I found a way :D, and it is running the allocation twice with different datasources:
1. Run the allocation to put value of Accout A to bas(N_ACC). In this step all bas members of (N_ACC) will have the same value.
2. Run the allocation with using/total to a different data sorurce. In this step you distribute value of A to bas(N_ACC) bas on the weight of each member of (N_ACC) wich all members will have the same weight:
Let's asume my data source is CALC and my second data source is CALC1
*RUNALLOCATION
*FACTOR =
*DIM ACCOUNT WHAT = A ;Where = BAS(N_ACC);
*ENDALLOCATION
//---------Second part
*RUNALLOCATION
*FACTOR = USING/TOTAL
*DIM ACCOUNT WHAT = BAS(N_ACC) ;Where = BAS(N_ACC); USING=BAS(N_ACC); TOTAL=BAS(N_ACC)
*DIM DATASOURCE WHAT = CALC ;Where = CALC1; USING=CALC; TOTAL=CALC
*ENDALLOCATION
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure it's the best possible solution 🙂
sebastian.montero
Try to play with "1" prefilled....
Another solution is to write custom logic badi.
By the way, I have posted number of blogs about script logic:
https://blogs.sap.com/2018/11/14/how-to-copy-data-between-models-in-bpc-script-logic/
https://blogs.sap.com/2018/11/04/how-to-calculate-next-or-previous-time-member-in-bpc-script-logic/
https://blogs.sap.com/2018/11/02/periodic-ytd-conversion-using-script-logic-in-bpc-nw/
https://blogs.sap.com/2018/11/14/how-to-perform-calculations-in-bpc-script-logic/
Can be useful for you!
User | Count |
---|---|
15 | |
4 | |
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.