‎2006 Oct 26 7:02 AM
Hi Guru:
Is there any function module/BAPI, which could be used to post internal order + cost center( both of them )plan data?
Like post a record:
internal order = 10000
cost center = C1000
amount = 1000$
for plann version 30?
It seems the BAPI could only contain 1 cost object, either cost center or internal order.
Thanks.
Eric
‎2006 Oct 26 3:37 PM
Hi Johan:
Thank you for your reply, it is really helpful.
But if I do so, it means for cost center and internal order, I both post cost 1000$. I think what my client want is, in internal order, they could breakdown by cost center, and see the 1000$ for this internal order is post to this cost center.
Is it possible?
Thanks.
Eric
‎2006 Oct 26 2:27 PM
Hi,
I had this requirement a few years ago and solved like this with an ABAP report:
- Use BAPI BAPI_PDTRANSCO_POSTPRIMCOST (from R/3 4.6A
- Fill structure COOBJECT with Cost Center as CO object
- Fill other necessary data
- Execute the BAPI but do not do any BAPI_TRANSACTION_COMMIT call - Check return parameters
- Fill Fill structure COOBJECT with Order as CO object
- Fill other necessary data
- Execute the BAPI - Check return parameters
- If both calls are OK -> Call FM BAPI_TRANSACTION_COMMIT
Hope this gives you an idea.
Regards, Johan
‎2006 Oct 26 3:37 PM
Hi Johan:
Thank you for your reply, it is really helpful.
But if I do so, it means for cost center and internal order, I both post cost 1000$. I think what my client want is, in internal order, they could breakdown by cost center, and see the 1000$ for this internal order is post to this cost center.
Is it possible?
Thanks.
Eric
‎2006 Oct 29 11:04 AM
Hi again,
I think you may have missed something important here. In R/3 there can only be a single "real" cost object for any one posting. If not then the whole SAP financail model would collapse as there would be "double postings" and that is certainly not wanted.
If there is a need to post to two cost objects, like in your case, then one of the cost objects MUST be statistical.
In your scenario SAP has thought of a solution that might be of help for you. An internal order can be set to be statistical in master data. When posting to both the cost center and the internal order then you will get a real posting for the CC and a statisitical posting for the IO. Reporting does work with this as per your requirement.
Hope this gives you some hints for how to proceed.
Regards, Johan
Aaaaah. Noted that this was only plan data. Sorry. But the same still applies for plan data postings as well as for actual data postings. If there should be just one posting that could be "drilled down" from IO to CC -> If you post twice then, when doing "Grand total" for instance, double values would appear. So, still IO should be statistical. //Johan
Message was edited by: Johan von Reedtz
‎2006 Oct 30 2:58 AM
Hi Johan:
Thank you very much for your reply, it is very helpful.
So, if the internal order is a statistical order, which BAPI/function module should I use to post the cost, to get a drill down for cost center?
I tried to call the bapi twice, but as you said, I could see the cost in both cost objects, the internal order and the cost center, but how to know the 2 posting are from 1 transaction.
Thank you very much.
Best regards,
Eric
‎2006 Oct 30 8:52 AM
Hi again,
Glad that you are making progress and can have some benefit from my suggestions.
Just from calling the BAPIs you can not tell that this is a single posting. You need to look at a SAP report for this (that is what the end user does so this makes sense).
Also, you must use the idea of a statistical internal order for this to be a single posting.
If you run a standard SAP cost element report for instance for the internal order then you can always drill down to the lowest level meaning the posting itself. There you can see both cost objects and from that it is, of course, obvious that this is a single posting.
Check with a functional CO consultant if in doubt.
Hope this helps you move on.
Regards, Johan