Search Results cogs_date
Overview
OPI_DBI_OPM_COGS_PKG is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that supports the Process Manufacturing (OPM) Intelligence/DBI reporting layer. Its principal business function is to extract, stage, and refresh Cost of Goods Sold (COGS) and margin data from Oracle Process Manufacturing (OPM) subledger and intercompany transaction sources into the DBI reporting tables. This data underpins cost and margin analysis for process manufacturers.
The package body initializes a set of setup globals through the CHECK_SETUP_GLOBALS routine, which reads global parameters such as BIS_PRIMARY_CURRENCY_CODE, BIS_GLOBAL_START_DATE, the global rate type, and the global currency code. It also validates the installation of the OPI application via FND_INSTALLATION.GET_APP_INFO and derives a starting extraction date (l_from_date) using GL_SUBR_LED and GL_SUBR_TST joined to OPI_DBI_COGS_LOG for the COGS_SUBLEDGER extraction type. This initialization establishes the runtime context—session login/user IDs, system date, and currency/rate settings—required before any refresh procedure executes.
Key Procedures and Functions
- CHECK_ICI — Validates intercompany (ICI) setup and configuration conditions relevant to the COGS extraction process.
- REFRESH_OPM_SUBL_ORG_COGS — Refreshes COGS data by OPM subledger and organization, extracting from OPM subledger sources.
- REFRESH_ICAP_COGS — Refreshes COGS data associated with Intercompany Accounts Payable (ICAP) invoice activity, drawing on AP invoice tables.
- REFRESH_OPM_COGS — Performs the core refresh of OPM COGS data into the DBI staging tables.
- COMPLETE_REFRESH_OPM_MARGIN — Finalizes the margin refresh, completing the margin calculation cycle after COGS data has been staged.
- REFRESH_OPM_MARGIN — Refreshes OPM margin data derived from the refreshed COGS figures.
In addition, an internal CHECK_SETUP_GLOBALS procedure initializes session-level globals and derives the effective extraction start date, raising an application error if the OPI installation check fails.
Tables Accessed
The package reads and writes the following documented tables (accessed through APPS synonyms):
- OPI_DBI_COGS_LOG, OPI_DBI_COGS_STG, OPI_DBI_MARGIN_F — DBI staging and fact tables that hold extracted COGS and margin data.
- GL_SUBR_LED, GL_SUBR_TST — General Ledger subledger ledger and transaction tables, used to derive transaction dates and extraction ranges.
- AP_INVOICES_ALL, AP_INVOICE_DISTRIBUTIONS_ALL, AP_INVOICE_DISTRIBUTIONS_S — Payables invoice and distribution tables used for ICAP-based COGS extraction.
- IC_TRAN_CMP, IC_TRAN_PND, IC_WHSE_MST, MTL_INTERCOMPANY_PARAMETERS — Intercompany transaction, warehouse, and intercompany parameter tables supporting ICI validation and intercompany COGS.
- OE_ORDER_LINES_ALL — Order line data contributing to COGS and margin computation.
- HR_ALL_ORGANIZATION_UNITS, HR_ORGANIZATION_INFORMATION — Organization and organization-information tables used to resolve organization context.
Usage Notes
This package is classified as OTHER and is referenced by no other documented packages, indicating it is typically invoked directly rather than through a wrapper API. It is most commonly executed by concurrent programs associated with the OPM/DBI COGS and margin refresh cycle, frequently scheduled after OPM and Payables transaction data has been closed for a period. It may also be called from custom code or forms that trigger a COGS/margin refresh.
Because the package depends on global setup parameters (primary currency, global start date, rate type) and on the successful OPI installation check, callers must ensure these globals are configured before invocation. The date range for extraction is derived dynamically: the earliest GL transaction date matched to the COGS_SUBLEDGER extraction type in OPI_DBI_COGS_LOG establishes the lower bound, defaulting to the global start date when no logged transactions exist. In the context of the search term "cogs_date," the documentation highlights that extraction date ranges are computed internally from subledger transaction dates rather than passed as a direct parameter, so the effective "COGS date" boundary is determined by logged extraction history and the global start date.
-
APPS.OPI_DBI_OPM_COGS_PKG SQL Statements
12.1.1
-
APPS.OPI_DBI_INV_TURNS_PKG SQL Statements
12.1.1
-
APPS.OPI_DBI_COGS_OPM_PKG SQL Statements
12.1.1
-
PACKAGE BODY: APPS.OPI_DBI_OPM_COGS_PKG
12.1.1
-
APPS.OPI_DBI_PRE_R12_COGS_PKG SQL Statements
12.1.1
-
TABLE: OPI.OPI_DBI_OPM_COGSTST_PRIOR
12.1.1
owner:OPI, object_type:TABLE, object_name:OPI_DBI_OPM_COGSTST_PRIOR, status:VALID,
-
APPS.OPI_DBI_COGS_PKG SQL Statements
12.1.1
-
TABLE: OPI.MLOG$_OPI_DBI_COGS_F
12.1.1
owner:OPI, object_type:TABLE, object_name:MLOG$_OPI_DBI_COGS_F, status:VALID,
-
TABLE: OPI.OPI_DBI_OPM_COGSLED_CURRENT
12.1.1
owner:OPI, object_type:TABLE, object_name:OPI_DBI_OPM_COGSLED_CURRENT, status:VALID,
-
TABLE: OPI.OPI_DBI_COGS_STG
12.1.1
owner:OPI, object_type:TABLE, object_name:OPI_DBI_COGS_STG, status:VALID,
-
TABLE: OPI.OPI_DBI_COGS_FSTG
12.1.1
owner:OPI, object_type:TABLE, object_name:OPI_DBI_COGS_FSTG, status:VALID,
-
TABLE: OPI.OPI_DBI_OPM_COGSTST_CURRENT
12.1.1
owner:OPI, object_type:TABLE, object_name:OPI_DBI_OPM_COGSTST_CURRENT, status:VALID,
-
PACKAGE BODY: APPS.OPI_DBI_COGS_OPM_PKG
12.1.1
-
TABLE: OPI.OPI_DBI_MARGIN_F
12.1.1
owner:OPI, object_type:TABLE, object_name:OPI_DBI_MARGIN_F, status:VALID,
-
TABLE: OPI.OPI_DBI_COGS_F
12.1.1
owner:OPI, object_type:TABLE, object_name:OPI_DBI_COGS_F, status:VALID,
-
PACKAGE BODY: APPS.OPI_DBI_PRE_R12_COGS_PKG
12.1.1
-
PACKAGE BODY: APPS.OPI_DBI_INV_TURNS_PKG
12.1.1
-
APPS.OPI_EDW_OPMCOGS_F_C SQL Statements
12.1.1
-
View: OPI_EDW_OPMCOGS_FCV
12.2.2
product: OPI - Operations Intelligence (Obsolete) , description: This is the source view for extracting Cost of gods sold and shipment data from the Process Manufacturing source tables. , implementation_dba_data: Not implemented in this database ,
-
PACKAGE BODY: APPS.OPI_DBI_COGS_PKG
12.1.1
-
View: OPI_EDW_OPMCOGS_FCV
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:OPI.OPI_EDW_OPMCOGS_FCV, object_name:OPI_EDW_OPMCOGS_FCV, status:VALID, product: OPI - Operations Intelligence , description: This is the source view for extracting Cost of gods sold and shipment data from the Process Manufacturing source tables. , implementation_dba_data: APPS.OPI_EDW_OPMCOGS_FCV ,
-
VIEW: APPS.OPI_EDW_OPMCOGS_FCV
12.1.1
-
VIEW: APPS.OPI_EDW_OPMCOGS_FCV
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:OPI.OPI_EDW_OPMCOGS_FCV, object_name:OPI_EDW_OPMCOGS_FCV, status:VALID,
-
VIEW: APPS.OPI_EDW_COGS_FCV
12.1.1
owner:APPS, object_type:VIEW, object_name:OPI_EDW_COGS_FCV, status:VALID,
-
APPS.OPI_EDW_COGS_F_C SQL Statements
12.1.1
-
VIEW: APPS.OPI_EDW_COGS_FCV
12.1.1
-
TABLE: OPI.OPI_EDW_COGS_F_DLOG
12.1.1
owner:OPI, object_type:TABLE, fnd_design_data:OPI.OPI_EDW_COGS_F_DLOG, object_name:OPI_EDW_COGS_F_DLOG, status:VALID,
-
PACKAGE BODY: APPS.OPI_EDW_COGS_FOPM_SZ
12.1.1
-
PACKAGE BODY: APPS.OPI_EDW_OPMCOGS_F_C
12.1.1
-
TABLE: OPI.OPI_EDW_COGS_F
12.1.1
owner:OPI, object_type:TABLE, fnd_design_data:OPI.OPI_EDW_COGS_F, object_name:OPI_EDW_COGS_F, status:VALID,
-
TABLE: OPI.OPI_EDW_COGS_FSTG
12.1.1
owner:OPI, object_type:TABLE, fnd_design_data:OPI.OPI_EDW_COGS_FSTG, object_name:OPI_EDW_COGS_FSTG, status:VALID,
-
PACKAGE BODY: APPS.OPI_EDW_COGS_F_C
12.1.1
-
PACKAGE BODY: APPS.OPI_EDW_COGS_F_SZ
12.1.1
-
APPS.OPI_COLLECTION_HOOK_P SQL Statements
12.1.1
-
APPS.OPI_DBI_INV_TURNS_PKG dependencies on OPI_DBI_COGS_F
12.1.1
-
APPS.OPI_DBI_COGS_PKG dependencies on MTL_PARAMETERS
12.1.1
-
APPS.OPI_DBI_OPM_COGS_PKG dependencies on FII_CURRENCY
12.1.1
-
APPS.OPI_DBI_COGS_PKG dependencies on OPI_DBI_COGS_FSTG
12.1.1
-
APPS.OPI_DBI_COGS_PKG dependencies on OPI_DBI_COGS_F
12.1.1
-
APPS.OPI_DBI_COGS_PKG dependencies on OPI_DBI_COGSF_CONV_RATES
12.1.1
-
APPS.OPI_DBI_INV_TURNS_PKG dependencies on OPI_DBI_INV_TURNS_STG
12.1.1
-
APPS.OPI_DBI_COGS_PKG dependencies on HR_ORGANIZATION_INFORMATION
12.1.1
-
APPS.OPI_DBI_COGS_OPM_PKG dependencies on OE_ORDER_LINES_ALL
12.1.1
-
APPS.OPI_DBI_INV_TURNS_PKG dependencies on FII_TIME_DAY_ALL_V
12.1.1
-
APPS.OPI_DBI_OPM_COGS_PKG dependencies on OPI_DBI_COGS_STG
12.1.1
-
APPS.OPI_COLLECTION_HOOK_P dependencies on OPI_EDW_COGS_F
12.1.1
-
APPS.OPI_EDW_OPMCOGS_F_C dependencies on OPI_EDW_COGS_FSTG
12.1.1
-
PACKAGE BODY: APPS.OPI_COLLECTION_HOOK_P
12.1.1
-
APPS.OPI_COLLECTION_HOOK_P dependencies on OPI_EDW_MRG_KEYS
12.1.1
-
APPS.OPI_DBI_COGS_OPM_PKG dependencies on HZ_CUST_ACCOUNTS
12.1.1