Using Template Allocation for actual activity posting
The scenario is that there are (lets say) 3 FG produced for which 3 Production Orders will be created. But we cannot enter actual labor (activity) hours used per material at the time of confirmation. We will know the total actual hours consumed at the end of the month only. We want to distribute the actual hours to all the 3 Production Orders in the ratio of the quantity of FG produced by each Production Order.
Example: PP Order 1 - 2 qty, PP Order 2 - 3 qty, PP Order 3 - 5 qty.
Total hours consumed = 50 hours.
Then PP Order 1 should get debited with 10 hours, PP Order 2 with 15 hours and PP Order 3 with 25 hours at month end.
i.e Actual Hours on and Order = Total Hours posted in the Cost Center * (GR quantity of that Order/Total GR quantity of all orders)
I have considered using CKMDUVACT but I could not find any way to create distribution with above logic.
So I am planning to use template allocation. The environment will be 001 - Cost Estimate/Production Order.
Can anyone suggest if there is any default function that can be used for above logic?
If not, can I create a function without ABAP help?