on 06-27-2016 11:33 AM
Hello All -
We are working in BW 7.5 SP03.
We are planning to give an access to the superuser to create the formula in FOX. However, we tried to give the FOX template for the to create the Formula. In the FOX template, we are longing for the superuser only maintain:
{AMOUNT, ACCOUNT}.
However, if our BPC Input is like below -
Account | 2015 | 2016 | 2017 | 2018 |
100101 | 15 | 15 | 15 | 15 |
100102 | 20 | 20 | 20 | 20 |
100103 | 30 | 30 | 30 | 30 |
My understanding is we need to use FOREACH and YEAR.
e.g.
DATA V_YEAR TYPE 0FISCYEAR.
FOREACH V_YEAR.
{AMOUNT, V_YEAR, 100104} = {AMOUNT, V_YEAR, 100101} + {AMOUNT, V_YEAR, 100102} + {AMOUNT, V_YEAR, 100103} .
ENDFOR.
We found that it's to difficult for the user. We want to avoid FOREACH, and YEAR. We only want user to enter ACCOUNT, and AMOUNT so it will be like that:
{AMOUNT, 100104} = {AMOUNT, 100101} + {AMOUNT, 100102} + {AMOUNT, 100103} .
Do you have any advice how we can achieve that?
Many thanks,
Daniel.
Hi Daniel N,
Try this and let me know..
Is it like you are not interested in using any Looping statements or only FOREACH. Also according to the second statement without year in the operands list, the
Amount will be aggregated as a whole i.e..
there is a chance like
{AMOUNT,100104} = 60 + 80 +120 = 260. (is this the expected output?)
If not,You can also try choosing 0FISCYEAR in the fields for conditions and specify the year (if its okay to be hardcoded ) or you can use a variable to get the input from the user at runtime for year. Later use the year like
IF YEAR = VARV(user_input).
{AMOUNT,.. } = sum of amounts.
ENDIF.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Daniel,
it really depends if you add the year in the characteristics to be changed or not (in the parameters section).
-If you do NOT add the year, you will have {0AMOUNT, 0ACCOUNT} to maintain, and you can use the code as in your example {AMOUNT, 100104} = {AMOUNT, 100101} + {AMOUNT, 100102} + {AMOUNT, 100103} .
The system will automatically executes this function for every year in the selection.
-If you add the year in the characteristics to be changed, you will have {0AMOUNT,0FISCYEAR,0ACCOUNT} to maintain, and in that case you need to use a loop on the year.
If you don't need to compare different years, just keep it simple and write your code without the loop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.