on 2015 Nov 12 5:25 PM
Hello Experts,
I just started working on BPC and have been given a scenario to work on.
I will be loading data from BW to BPC and I would like to collect the AMOUNT value from BW into BPC as the average of all amounts per G/L Account.
G/L Account Amount
ACC001 120
ACC001 130
ACC002 150
ACC002 160
ACC002 180
ACC003 200
ACC003 200
I would like the output in BPC to be -
ACC001 125
ACC002 245
ACC003 200
Kindly guide me in this scenario.
Request clarification before answering.
Hi Leonel,
User routine in your transformation file to cater for this case.
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then - easy:
First read how to configure COMBOBOX prompt to pass the year to the script variable $Y$
Script itself:
*FOR %M%=$Y$.01,$Y$.02,$Y$.03,$Y$.04,$Y$.05,$Y$.06,$Y$.07,$Y$.08,$Y$.09,$Y$.10,$Y$.11,$Y$.12
*XDIM_MEMBERSET TIME=TMVL(-1,%M%),TMVL(-2,%M%) //Month of prev and prev prev year
*WHEN TIME
*IS * //scoped
*REC(EXPRESSION=%VALUE%/2,TIME=%M%) //Average calc
*ENDWHEN
*NEXT
That's all
Vadim
Hello Vadim,
Good Day to you. Sorry to be bothering you once again. I have come across some difficulties in the same issue. I kindly request your guidance.
After loading sample data in BPC, please find screenshot as below -
Post this I ran the Script Logic Package - This was successful, PFB
I refreshed the report, as per logic the data for 2015 should be displayed as Average of Prev two years. But I still get blank values for 2015.TOTAL column -
Kindly help.
*FOR %M% = $BUDGET_YEAR$.01,$BUDGET_YEAR$.02,$BUDGET_YEAR$.03,$BUDGET_YEAR$.04,$BUDGET_YEAR$.05,$BUDGET_YEAR$.06,$BUDGET_YEAR$.07,$BUDGET_YEAR$.08,$BUDGET_YEAR$.09,$BUDGET_YEAR$.10,$BUDGET_YEAR$.11,$BUDGET_YEAR$.12
*XDIM_MEMBERSET TIME = TMVL(-1,%M%), TMVL(-2,%M%)
*WHEN TIME.ID
*IS *
*REC(EXPRESSION = %VALUE%/2, TIME = %YEAR%.TOTAL, CATEGORY_VTYPE = PLAN)
*ENDWHEN
*NEXT
Please ignore the Script that I sent earlier;
*FOR %M% = $BUDGET_YEAR$.01,$BUDGET_YEAR$.02,$BUDGET_YEAR$.03,$BUDGET_YEAR$.04,$BUDGET_YEAR$.05,$BUDGET_YEAR$.06,$BUDGET_YEAR$.07,$BUDGET_YEAR$.08,$BUDGET_YEAR$.09,$BUDGET_YEAR$.10,$BUDGET_YEAR$.11,$BUDGET_YEAR$.12
*XDIM_MEMBERSET TIME = TMVL(-1,%M%), TMVL(-2,%M%)
*XDIM_MEMBERSET CATEGORY_VTYPE = 20
*WHEN TIME
*IS *
*REC(EXPRESSION = %VALUE%/2, TIME = %M%,CATEGORY_VTYPE = 20)
*ENDWHEN
*NEXT
Hello Experts,
Apologies for not clearly stating my requirements earlier. After going through my requirements once again, I would like to share the same with you as well.
Please find the sample report for your reference.
For the PLAN field (2015.TOTAL), I would like to calculate the AVERAGE(2013.TOTAL:2014.TOTAL), that is, AVERAGE of ACTUAL values will determine the PLAN values.
PLAN(2015.TOTAL) = AVERAGE(2013.TOTAL:2014.TOTAL)
In this report which I have shared for your reference, I have done the calculation so that you will understand what I am talking about. What I would like for the report to do is, run this calculation at runtime.
Every time the report is opened or refreshed I want this calculation to run. I am not sure how this is done; In BW, we have CALCULATED KEYFIGURES, but in BPC, I am not sure how to work about on this.
Requirement 1: Calculate PLAN value as AVERAGE(ACTUAL values).
Requirement 2: Forecasting values for next two years. ( Please help if anyone has idea on this as well).
Kindly advise.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vadim,
The task that has been given to me is a sample and not a proper requirement.
I guess the requirement as of now what is required of me is to identify the PLAN value from the ACTUAL values and determine this PLAN value during runtime.
I understand we can use EXCEL Formulae to calculate this but is there anyway to retain this formula every time this report is opened and run / refreshed.
I think you guess wrong... Nobody determine Plan figures during runtime
If you want to create figures for Plan using some algorithm (like average of previous 2 yeas) - then you can run some script to perform calculation and store the result in the Plan category...
But not during report execution!
Hi Vadim,
the same thing can be said about scrip logic, you need someone who knows scrip logic to support the system. there are more and more ABAP consultants getting involved with BPC but less and less consultants knows script logic, so using BADI actually will be easier to support, a company have many ABAP in their team, but hardly any scrip logic consultant.
There are many messages here asking for script logic support as it is complex and difficult to debug.
there are pros and cons for each BADI and script logic.
You are pro script logic and I'm pro BADI.
Andy
Hello Vadim,
I stand corrected. Thank you for the rectification of my error.
I want to create figures for the Plan Category, as you mentioned, from the previous 2 year using Script Logic.
If I have to use a Script Logic, I would like some guidance from your expert knowledge on how to go about doing the same. Could you kindly explain me with some sample data please.
Much obliged.
Thank you,
Leonel
Shouldn't the amount on ACC002 be 163,3333 as (150+160+180)/3?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Average??? What is the business logic?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 17 | |
| 8 | |
| 7 | |
| 6 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.