Production Order Costs - Where to find the data?
Hi all,
I am trying to get the production order costs (CO03-->Goto-->Costs-->Cost com. Structure). This displays the various costs (Overall, variable and fixed) for different cost components (material, Labour etc).
My question is; where can I find this data. Tried debugging the transaction and it uses a lot of CK_F* modules but cannot replicate the data in my owm program as the function modules seem to be pulling data populated elsewhere into the data structures of the function group.
If anyone has extracted all the costs of a production order, could they please share their experience?
Any help will be highly appreciated.
Regards,
Hi,
try tables COSP and COSS (key is f.e. OR000050156810 for the order)
Robin
Hi ,
I have tried COSS and COSP but the data there is not consistent. Sometimes the values are spread across different fields which makes it impossible to get the data correctly.
I have also tried table MCKALKW which is also not consistent in the data that it stores.
Any other suggestions?
Thanks
Hi,
How do you mean "spread across different fields": i always use
the fields WKGxxx & MEGxxx. They always add up correct. You just have to be sure your read ALL the period-fields 1-16
Hi Robin,
Yes I too am doing it exactly like you say.. However many times what happens is that in CO03 I can see the Material Costs as say 1000£ but in the WEGXXX fields the one of the fields itself is 1000£ while the others add up to 1000£ so there seems to be duplication.
Also, sometimes the production order itself is not found in COSS and/or COSP but the CO03 transaction shows the production order costs. Dont know where to find the data.
I dont have any functional consultant to help me out, so I would really appreciate any help that can be provided.
The major problem is that there does not seem to be any consistency in the data. I dont know if it is a config issue or I am applying the wrong logic.
Thanks
Try mseg providing Aufnr..............
_________________
Regards
Abaper
Hi ABAPER4U,
Using MSEG also doesnt seem to work consistently. Is there any additional parameter which needs to be passed other than AUFNR? The Debit -Credit values are not matching the CO03 Transaction Values.
Thanks
Could anyone please post some part of the sample code which you feel works to get production order cost?
Even a concept of it will be fine.. searching through MSEG also does not seem to give data which matches the output of the production order itself.
Thanks