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):

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.