Pages

OracleEBSpro is purely for knowledge sharing and learning purpose, with the main focus on Oracle E-Business Suite Product and other related Oracle Technologies.

I'm NOT responsible for any damages in whatever form caused by the usage of the content of this blog.

I share my Oracle knowledge through this blog. All my posts in this blog are based on my experience, reading oracle websites, books, forums and other blogs. I invite people to read and suggest ways to improve this blog.


Thursday, September 8, 2016

How to find item cost

Another common issue when writing queries is getting an item cost.

Here are the APIs to use in queries:

For discrete manufacturing:

cst_cost_api.get_item_cost(1,inventory_item_id, organization_id,NULL,NULL)

here is a sample query:

select segment1 item,
cst_cost_api.get_item_cost(1,inventory_item_id, organization_id,NULL,NULL) cost
from mtl_system_items_b

If you are in an OPM organization the above won't work and instead you need to call

select msi.segment1 item,
GMF_CMCOMMON.get_cmpt_cost( inventory_item_id, organization_id, sysdatecmm.cost_type_id ,0) cost
from mtl_system_items_b msi, CM_MTHD_MST cmm
where cmm.cost_mthd_desc='Standard Cost'

References:
http://piotrbelter.blogspot.com/2009/06/how-to-find-item-cost.html

No comments:

Post a Comment