Sorry for delayed reply...
We have very complex calculation for allocation, i will explain as below.
First Delivery Management allocation.
1. Get the total Revenue based on controlling area and BL (Business Line. from PCA_A dimension i need to get controlling area,
Key dimensions for this are Account,PCA_A and Costobject , where i have WBS and Costcenter both in costobject dimension,
My revenue data will be as below, i should get totalRev
| ACCOUNT_A | BP | COSTOBJECT | CUSTACCT | EMPACTIVITY | ENTITY | EXECLOCATION | CURRENCY | INTCO | PCA_A | DATASRC | SITE | TIME | VERSION | AMT |
| 511001 | BP_NONE | 01-00391-01 | C_20008301 | EACT_NONE | 10IN | XX | INR | I_NONE | 1000_20008301 | INPUT | 1001 | 2016.FEB | V100 | 1500 |
2. Get the total cost based on controlling area and Business Line.
We have 9 Cost.
1. Employment cost
2.Space cost
3. Special
4. Recruitment
5. Training
6. Depreciation
7. Travel
8. TravelReccovery
9.Space Depreciation
1. Get the Total Employment cost based on controlling area and BL. BL we will get parenth2 of PCA_A
| 611000 | BP_NONE | 1000_5002030000 | CUST_NONE | EACT_NONE | 10IN | EXECLOC_NONE | INR | I_NONE | 1000_50020300 | INPUT | 1001 | 2016.FEB | V100 | 550 |
| 611001 | BP_NONE | 1000_5002030001 | CUST_NONE | EACT_NONE | 10IN | EXECLOC_NONE | INR | I_NONE | 1000_50020300 | INPUT | 1001 | 2016.FEB | V100 | 300 |
After getting TotalEmpcost =
3. Get rate = TotalEmpCost\totalRev
4. Multiply rate with each WBS to allocate the cost particular WBS
| ACCOUNT_A | BP | COSTOBJECT | CUSTACCT | EMPACTIVITY | ENTITY | EXECLOCATION | CURRENCY | INTCO | PCA_A | DATASRC | SITE | TIME | VERSION | AMT |
| 511001 | BP_NONE | 01-00391-01 | C_20008301 | EACT_NONE | 10IN | XX | INR | I_NONE | 1000_20008301 | INPUT | 1001 | 2016.FEB | V100 | 1500 |
Rate * 1500 this will be my allocated cost
| 511001 | BP_NONE | 01-00391-02 | C_20008301 | EACT_NONE | 10IN | XX | INR | I_NONE | 1000_20008301 | INPUT | 1001 | 2016.FEB | V100 | 3200 |
Rate * 3200
this is my requirement, i just trying to simplify using script.
Logic already working in ABAP BADI. it's taking too much time to run.
so any suggestion, can we go head with BADI are , script logic will be more help full.
i am not worried about
EMPACTIVITY
EXECLOCATION
only my worried is about, ACCOUNT_A, COSTOBJECT, PCA_A
Regards,
Devi





