on ‎2017 Apr 25 3:58 PM
Hhello team,
We have a priority requirement to create custom key-figures calculations.
One such is Process Loss key figure. Which is a simple subtraction between Material Consumed - Material Produced. Both are at 'Location-Product' planning level and the product master data will be having both finished good and raw material. Below are the sample data for reference

As per the straight forward calculation, Process loss = material consumed - material product. But the material consumed kf will NOT be valid for a Finished good and it will have NA. So the resultant Process Loss would be NA-100
Question 1: Can i write a conditional key figure caluclation and somehow tell to system that consider the Material Consumed kf only for 'raw material' product attriobutes
Question 2: if i can change the kf base planning levels from Location-Product to Location-Product type etc ? Can that work?
Please advice gurus
Request clarification before answering.
Hi Venkat,
You can check for material type condition while calculating KF ProcessedLoss and system will calculate only for that combination.
Ex: Processed Loss = if("MATTYPE"='FG',"Produced-Consumed")
Regards,
Ujwal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello UjwalKumar,
Thanks a ton for writing back, felt like a i found a light 🙂
The thing is we consume 'Raw water' say 100 mega liter to produce 90 mega liter of 'Treated water'. Now we lost 10 ml in this production process aka Process Loss.
But if we write a straight formula called , Process loss = Material consumption - Material Production, we get the below crazy values

I followed your inputs. Wrote the below calculation and kept a condition on the Product ID = Treatedwater

But i got the below error

Where i'm getting the formula wrong.
Question: Even with this approach, how i can mandate the system to look for consumption values only for Raw WATER. Please help
Hi Venkat,
If I understand correctly you are trying to do something like below. So instead of putting condition on attribute value maintain product type as NULL (meaning no value) and RW (Raw Water) for product for which you don't want calculation to happen.
Then ProcessLossKF = if(ISNULL("PRDTYPE"),"MATCONS"-"MATPROD")
Regards,
Ujwal

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello again ujwal,
Thanks for your persistence on this.
i think i didn't explained it properly. The subtraction has to happen from one attribute value to another attribute.

So as per your above input, ProcessLossKF = if(ISNULL("PRDTYPE"),"MATCONS"-"MATPROD")
This will restrict the calculation only to a Product type of Null...but i want to consider the value of Mat Consumed NOT for the existing planning level combination, but for another.
Business Context: To give more business feel to this scenario, Planning happens in IBP...production happens in SAP S4 PP...Actual's will be recorded there in S4 and will be sent back to IBP via HCI.
Naturally, like every other business, even our client has reporting requirement (Control Tower) to capture the Plan vs Actual aka Variances and do some gimmicks with the numbers. Above is one such scenario... i consumed X -> produced Y..what is X-Y.
Please help me with this...
Appreciate your time on this
I need to do a conditional Key-Figure calculation based on specific attribute values. So i found the below solution
Solution:
1) Wrote a Local member Keyfigure,
2) Did my calulcations
3) Copy the results on a stored keyfigure
Question:
How to copy the local member values on to the Stored Key Figure ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 18 | |
| 15 | |
| 7 | |
| 2 | |
| 2 | |
| 2 | |
| 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.