on ‎2018 Mar 17 1:32 PM
data.jpgscrip-allocation.txt
Hi BPC experts:
Its posible to run a periodic allocation on YTD model in SAP BPC?
SAP BPC NW 10.1 SP12
DIMENSIONS detail in logic script
Purpose: We want to allocate all indirect costs based on products revenue/Customer Sector. The allocation process should consider the monthly sales by product and customer sector.
Now, logic scritp its working to YTD values (Sales), just like data file.
AUD001 - Original Values;
AUD002 - Allocation Value
AUD003 - Allocation Cost in MATERIAL by % revenue material
Thank you!
Request clarification before answering.
Sorry, but still the detailed requirements are not explained!
The idea in general:
1. Convert YTD values to periodic using script logic (current month - prev month) to some special audittrail member.
2. Perform allocation of periodic values and save result to the same special audittrail member.
3. Using script logic add results of allocation to the YTD values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I update my question, sorry by missing information. Is my first question
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I update my question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Vadim,
Thank you for your advice.
I just changed my scrip to your idea, and the periodic allocation is working:
1. Convert YTD values to periodic using script logic (current month - prev month) to some special audittrail member. (AUD002)
2. Perform allocation of periodic values and save result to the same special audittrail member.(AUD003)
I don't know how perform the third point of the process:
3. Using script logic add results of allocation to the YTD values.
I try this:
*XDIM_MEMBERSET AUDITTRAIL = AUD002, AUD003
*XDIM_MEMBERSET CATEGORY = TESTE
*XDIM_MEMBERSET SCOPE = G_XPTO
*XDIM_MEMBERSET RPTCURRENCY = EUR
*XDIM_MEMBERSET TIME = %TIME_SET%, TMVL(-1,%TIME_SET%)
*XDIM_MEMBERSET FLOW = BAS(DPL_BASIC_PROD_COSTS)
*WHEN TIME /
*IS TMVL(-1,%TIME_SET%)
*WHEN AUDITTRAIL
*IS AUD002
*REC(FACTOR = 1, TIME = %TIME_SET%, AUDITTRAIL = "AUD002")
*WHEN AUDITTRAIL
*IS AUD003
*REC(FACTOR = 1, TIME = %TIME_SET%, AUDITTRAIL = "AUD003")
*ENDWHEN
*ENDWHEN
*ENDWHEN
*COMMIT
Thank you for your help!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To many dimensions used... Not sure I can provide the correct full script.
1 and 2 has to be:
*XDIM_MEMBERSET AUDITTRAIL = AUD001 //orig YTD values
*XDIM_MEMBERSET CATEGORY = TESTE
*XDIM_MEMBERSET SCOPE = G_XPTO
*XDIM_MEMBERSET RPTCURRENCY = EUR
*XDIM_MEMBERSET TIME = %TIME_SET%, TMVL(-1,%TIME_SET%) //%TIME_SET% - single member!!!
*XDIM_MEMBERSET FLOW = BAS(DPL_BASIC_PROD_COSTS)
*WHEN TIME
*IS TMVL(-1,%TIME_SET%) //prev month
*REC(FACTOR = -1, TIME = %TIME_SET%, AUDITTRAIL = "AUD002")
*IS %TIME_SET% //Current month
*REC(FACTOR = 1, AUDITTRAIL = "AUD002")
*ENDWHEN
*XDIM_MEMBERSET AUDITTRAIL = AUD002 //Calculated PERIODIC values
*XDIM_MEMBERSET ACCOUNT = XRATEIO001
*XDIM_MEMBERSET AGING_DIAS = NONE
*XDIM_MEMBERSET BANK_ID = GEN
*XDIM_MEMBERSET CO_ORDER = GEN
*XDIM_MEMBERSET CUSTOMER = GEN
*XDIM_MEMBERSET CUST_COUNTRY = GEN
*XDIM_MEMBERSET CUST_RESP = GEN
*XDIM_MEMBERSET DOC_CURR = EUR
*XDIM_MEMBERSET ENTITY = PT01
*XDIM_MEMBERSET INTERCO = I_NONE
*XDIM_MEMBERSET MAT_SALES = GEN
*XDIM_MEMBERSET PROFITCTR = GEN
*XDIM_MEMBERSET PROJECT = GEN
*XDIM_MEMBERSET PROJECT_RESP = GEN
*XDIM_MEMBERSET RPTCURRENCY = EUR
*XDIM_MEMBERSET STAT = C
*XDIM_MEMBERSET VENDOR = GEN
*XDIM_MEMBERSET TIME = %TIME_SET%
*RUNALLOCATION
*FACTOR = USING/TOTAL
*DIM FLOW WHAT = PL_LINE ; WHERE = <<< ; Using = DPL_SALES ; Total = <<<
*DIM MATERIAL WHAT = GEN ; WHERE = BAS(TOTAL) ; Using = <<< ; Total = <<<
*DIM CUST_SECTOR WHAT = GEN ; WHERE = BAS(TOTAL II) ; Using = <<< ; Total = <<<
*ENDALLOCATION<br>
Please check it
P.S. What do you mean by member "TOTAL II" of CUST_SECTOR? Space inside member????
Vadim,
The periodic allocation is working!
This process is to allocate the costs in Flow DPL_BASIC_PROD_COSTS to MATERIAL and CUST_SECTOR (base in % of revenue).
*DIM FLOW WHAT = PL_LINE ; WHERE = <<< ; Using = DPL_SALES ; Total = <<<
*DIM MATERIAL WHAT = GEN ; WHERE = BAS(TOTAL) ; Using = <<< ; Total = <<<
*DIM CUST_SECTOR WHAT = GEN ; WHERE = BAS(TOTAL II) ; Using = <<< ; Total = <<<
Now I need to transfer the periodic results of AUD002 to cumulative results:
Flow: DPL_BASIC_PROD_COST February (in AUD002) I have to have the result of the February and January allocation. Its posible?
In order to sum results starting from the beginning of year use:
*SELECT(%Y%,YEAR,TIME,ID=%TIME_SET%)
*SELECT(%TID%,TIMEID,TIME,ID=%TIME_SET%)
*SELECT(%MONTHS%,ID,TIME,TIMEID<=%TID% AND YEAR=%Y% AND CALC=N)
*XDIM_MEMBERSET TIME=%MONTHS% //list of months from the beginning of year
*WHEN TIME
*IS *
*REC(FACTOR=1,TIME=%TIME_SET%,AUDITTRAIL=AUD001)
*ENDWHEN
Sorry, but still:
1. Incorrect tag not changed
2. No BPC version: SAP BPC 10.1 SP12 - can be NW or MS????
3. No required logic described (only incorrect script provided)
4. No data sample
...
Do you really think it's possible to answer your question?
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 read again:
https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues
1. Incorrect tag not changed - the correct tag has to be: SAP Business Planning and Consolidation, version for SAP NetWeaver
3. No required logic described (only incorrect script provided)
"Purpose: We want to allocate all indirect costs based on products revenue/Customer Sector. The allocation process should consider the monthly sales by product and customer sector." Look on the sample!
4. No data sample - Excel screenshot with data before and after allocation
And please, don't update the original question text - not possible to compare versions! Use comments to provide info!
Please read https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues/
Describe the required logic in words and demonstrate some data sample!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 11 | |
| 11 | |
| 4 | |
| 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.