FOX Formula to calculate # values by manual distribution
I have a question regarding a FOX formula which would calculate the # (unassigned) value by manual distribution.
My scenario is:
Planning step 1: Data is planned for the whole Controlling area.
Planning step 2: The user selects one or more profit centers and distributes the plan for the whole controlling area to those profit centers (I don't want to use standard distribution functions).
I just need a formula which will calculate the # profit center value according to the values the user plans for different profit centers. The goal is to distribute everything so # is equal to 0.
Any code advice will be highly appreciated.
Thanks in advance