on 10-08-2008 3:46 PM
Dear Gurus,
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
Jan
Hi Jan,
here's some code to get you started. Field to be changed is Key Figure and Profit Center.
DATA p TYPE 0PROFIT_CTR.
DATA total TYPE f.
DATA i TYPE i.
FOREACH p.
i = i + 1.
ENDFOR.
total = { 0amount, # }.
FOREACH p.
{ 0amount, p } = total / i.
ENDFOR.
{ 0amount, # } = 0.
Regards,
Marc
SAP NetWeaver RIG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marc,
thanks for the code. Unfortunately my scenario is to distribute the unassigned values manually and the fox formula has to update the unnassigned value according to the user input.
For example:
1. step: # = 500
2. step # = 250, 1 = 200, 2 = 50. User doesn't plan # but plans profit center 1, 2 etc.
I would appreciate any further help anyone can give me.
Regards
Jan
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.