on ‎2018 Jan 23 2:42 PM
Hello BPC expert,
I have a rather simple query that would need the use of logic script.
The logic script must do a multiplication between an account and a hierarchy and the result of this multiplication can be stored in another account.
Let us take an example :
- I have an account called "TAX_RATE" and an hierarchy account called "PBIT". TAX_RATE is completed through input form. Hierarchy accounts have input data and journals data.
- PBIT has other hierarchy nodes below and of course base level accounts (such as P701000, P701020).
- Destination account can be called "RESULT".
- taxe rate is 0,20. PBIT has a total of 100,00€ where P701000 is 60,00€ and P701020 is 40,00€. RESULT would simply be 20,00€.
I have researched on forums regarding this matter and found some blogs such as "BPC script for dummies" but couldn't find answers to multiply with a node member.
I therefore tried an alternative by creating a property "GROUP" where I fill "PBIT" for every account that needs to be multiplied.
Here is the script (in DEFAULT.LGF) I wrote :
*SELECT(%PBIT%,ID,ACCOUNT,[GROUP]="PBIT")
*WHEN ACCOUNT
*IS TAXRATE
*REC(EXPRESSION=%VALUE%*[ACCOUNT].[%PBIT%],ACCOUNT=T_EXP)
*ENDWHEN
Each time I save a figure on TAX_RATE through input form, I got the following error message :

System does not recognize an account that does exist in the dimension.

What can I do to multiply a simple base level member with an hierarchy ?
Thank you in advance for your help,
Dat
Request clarification before answering.
"I would like the calculation to be run only when TAX_RATE is updated through input form."
OK:
*WHEN ACCOUNT
*IS TAXRATE
*REC(EXPRESSION=%VALUE%*[ACCOUNT].[PBIT],ACCOUNT=T_EXP)
*ENDWHEN
Assuming you have account PBIT
What's the issue? Parent member can be used in logic expression!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just noticed my logic script had wrong input with what I have explained in the first post.
*SELECT(%PBIT%,ID,ACCOUNT,[GROUP]="PBIT")
*WHEN ACCOUNT
*IS TAX_RATE
*REC(EXPRESSION=%VALUE%*[ACCOUNT].[%PBIT%],ACCOUNT=RESULT)
*ENDWHEN
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please DON'T edit original question! Hard to find changes! Please answer my questions in comment!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are talking about default.lgf then when do you want the calculation to run?
On any data save to base member under parent PBIT?
And on any change of TAX_RATE?
Have you read my blog: https://blogs.sap.com/2014/06/09/how-to-write-defaultlgf/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vadim,
I would like the calculation to be run only when TAX_RATE is updated through input form.
I do not need this calculation when data are loaded into PBIT base level members or from journals.
I am currently reading your blog. I should have googled "default.lgf" instead of "logic script" !
| User | Count |
|---|---|
| 40 | |
| 9 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.