Search Results opmco_get_cost
Overview
OPI_OPM_COMMON_PKG is a shared utility package owned by the APPS schema in Oracle E-Business Suite Release 12.1.1 and 12.2.2. It provides a set of wrapper functions and helper routines that bridge Oracle Process Manufacturing (OPM) costing and currency-conversion logic with the Oracle Financials and general ledger data model. Rather than duplicating complex calculations in each calling module, OPM and OPM-adjacent applications invoke this package to obtain standardized costs, convert amounts between currencies, and resolve resource-related cost values. The package is declared with AUTHID CURRENT_USER, meaning its statements execute with the privileges of the invoking user, so callers must themselves hold the necessary privileges on the underlying objects.
The package is classified as OTHER in the ETRM repository, indicating it is an internal technical utility rather than a formally published public API. It is referenced by six other packages, confirming its role as a common dependency across the OPM module. Because several functions are thin wrappers over underlying packages such as GMF_COMMON and GMF_GLCOMMON_DB, the behavior of the wrapper is tightly coupled to those implementation packages.
Key Procedures and Functions
Seven documented procedures and functions are exposed. The most relevant to the user's search term is OPMCO_GET_RSRC_COST, which returns resource cost information for OPM resources. It is the resource-cost counterpart to the item-cost wrapper and draws on resource master and resource detail tables. The remaining functions are summarized below.
- OPMCO_GET_COST — A wrapper on GMF_COMMON.cmcommon_get_cost. It accepts an item, warehouse, transaction date, and optional cost method, and returns the accounting cost from the GL_ITEM_CST table. It returns cost only when the cost has been posted to the GL tables, i.e., after a Cost Update has been run subsequent to a Cost Rollup.
- OPMCO_GET_MULCURR_AMT — A wrapper on GMF_GLCOMMON_DB.get_closest_rate. It converts an amount from one currency to another as of a given exchange-rate date. If conversion fails, it returns zero rather than raising an error.
- OPMCO_CURRCONV_ERROR — Supports multi-currency conversion by surfacing or recording conversion failures associated with the currency routines.
- OPI_OPM_GET_CHARGE — Retrieves charge-related values for OPM transactions, typically associated with order or receipt charges.
- Package variables — PV_OPMCO_GMA_F_CURR, PV_OPMCO_GMA_T_CURR, PV_OPMCO_GMA_RATE_DT, PV_OPMCO_GMA_SIGN, and PV_OPMCO_GMA_XCNG_RATE cache conversion parameters to avoid repetitive recalculation of exchange rates across successive calls.
Tables Accessed
The package references the following tables through APPS synonyms. In the costing domain, IC_ITEM_MST and IC_WHSE_MST supply item and warehouse definitions; CM_CMPT_DTL supplies cost method codes; and GL_ITEM_CST holds the posted item cost returned by OPMCO_GET_COST. Resource costing relies on CR_RSRC_MST and CM_RSRC_DTL, which define resource masters and resource-cost detail. Currency conversion uses GL_CURR_MST for currency definitions, with GL_PLCY_MST and GL_SRCE_MST supporting policy and source context. Order and organization context is drawn from OP_ORDR_DTL and SY_ORGN_MST, while calendar data for date-based costing and conversion is sourced from CM_CLDR_DTL and CM_CLDR_HDR.
Usage Notes
OPI_OPM_COMMON_PKG is invoked primarily from OPM costing, order processing, and financial integration logic, including Oracle Forms-based OPM windows and concurrent programs that perform cost rollup, cost update, and currency conversion. Custom extensions and interface programs should call these wrappers rather than the underlying GMF packages directly, to preserve consistent handling of posted-cost checks and zero-on-failure conversion semantics. Because the package runs with the caller's privileges, ensure that the invoking user or concurrent program has execute rights on the package and select rights on the referenced tables. Values returned by OPMCO_GET_COST depend on the timing of the Cost Update concurrent program relative to Cost Rollup, so callers should not assume currency or cost data is current until those programs have completed.
-
PACKAGE: APPS.OPI_OPM_COMMON_PKG
12.1.1
-
PACKAGE BODY: APPS.OPI_OPM_COMMON_PKG
12.1.1
-
APPS.OPI_OPM_COMMON_PKG dependencies on IC_ITEM_MST
12.1.1
-
APPS.OPI_OPM_COMMON_PKG dependencies on IC_ITEM_MST
12.1.1
-
APPS.OPI_OPM_COMMON_PKG dependencies on IC_WHSE_MST
12.1.1
-
APPS.OPI_OPM_COMMON_PKG dependencies on CM_CMPT_DTL
12.1.1
-
APPS.OPI_OPM_COMMON_PKG dependencies on OPI_OPM_COMMON_PKG
12.1.1
-
APPS.OPI_OPM_COMMON_PKG dependencies on CM_CMPT_DTL
12.1.1
-
APPS.OPI_OPM_COMMON_PKG dependencies on GL_CURR_MST
12.1.1
-
APPS.OPI_OPM_COMMON_PKG dependencies on IC_WHSE_MST
12.1.1