Search Results check_ici
Overview
OPI_DBI_OPM_COGS_PKG is an Oracle Applications (APPS) PL/SQL package that supports the Oracle Process Manufacturing (OPM) costing and margin reporting functionality within the Oracle E-Business Suite. The package is defined with AUTHID CURRENT_USER and is classified under the API classification OTHER, indicating it is primarily an internal processing package rather than a publicly supported interface. Its principal business purpose is to refresh and maintain Cost of Goods Sold (COGS) and margin data for process manufacturing organizations, including the handling of intercompany (IC) transactions and subledger organization-level COGS aggregation. The package dates to release 11.5.x source (header 115.6, 2003) and remains present in the EBS 12.1.1 and 12.2.2 code lines as part of the OPM decision-support and margin analysis infrastructure.
Key Procedures and Functions
The package exposes six documented program units:
- check_ici — A function that evaluates an intercompany relationship given a ship organization unit identifier and a sell organization unit identifier, returning a numeric result. It is used to determine whether intercompany invoicing rules apply between two organization units.
- refresh_opm_subl_org_cogs — The procedure central to the user's search. It refreshes subledger organization-level COGS data for a specified range of identifiers. Its parameters include a last identifier, a newest identifier, and output status and message parameters. This is the primary mechanism for incrementally rebuilding process manufacturing COGS records from the subledger staging area.
- refresh_icap_cogs — A procedure that refreshes COGS values associated with intercompany Accounts Payable activity, drawing on invoice and invoice distribution data.
- refresh_opm_cogs — A function returning a numeric status code, designed to be invoked from a concurrent program. It accepts the standard concurrent manager error buffer and return code parameters and drives the overall OPM COGS refresh process.
- complete_refresh_OPM_margin — A procedure that performs the full margin refresh, accepting error buffer, return code, and a degree-of-parallelism parameter for controlling worker processes.
- refresh_OPM_margin — A procedure that refreshes OPM margin data, also accepting the standard concurrent program error buffer and return code parameters.
Tables Accessed
The package reads and writes a range of APPS synonyms spanning payables, general ledger, HR organizations, intercompany, order management, and OPM staging structures:
- AP_INVOICES_ALL, AP_INVOICE_DISTRIBUTIONS_ALL, AP_INVOICE_DISTRIBUTIONS_S — Source of intercompany payables cost information used in the ICAP COGS refresh.
- GL_SUBR_LED, GL_SUBR_TST — Subledger ledger and test tables used during the subledger organization COGS refresh.
- HR_ALL_ORGANIZATION_UNITS, HR_ORGANIZATION_INFORMATION — Organization unit definitions and attributes used to resolve organization context and intercompany relationships.
- IC_TRAN_CMP, IC_TRAN_PND, IC_WHSE_MST, MTL_INTERCOMPANY_PARAMETERS — Intercompany transaction, warehouse, and parameter data that determine intercompany cost flows.
- OE_ORDER_LINES_ALL — Order line detail used to source sales-side COGS and margin data.
- OPI_DBI_COGS_LOG, OPI_DBI_COGS_STG, OPI_DBI_MARGIN_F — The OPM decision-support COGS log, staging, and margin fact tables that this package populates and updates. These are the primary write targets of the refresh routines.
Usage Notes
OPI_DBI_OPM_COGS_PKG is an internal package with no documented references from other packages, so it is not part of a public callable API surface. The procedures carrying the standard errbuf and retcode parameters—refresh_opm_cogs, refresh_OPM_margin, and complete_refresh_OPM_margin—are structured for invocation from Oracle concurrent programs, and refresh_opm_cogs in particular returns a numeric code consistent with the concurrent program host PL/SQL interface. The refresh_opm_subl_org_cogs procedure, which the user searched for, is called in a batch or incremental fashion using identifier ranges, typically from a driver concurrent program that iterates over organization units or subledger ranges. In practice these routines are scheduled as part of the OPM margin and COGS reporting cycle, generally after period-close activities when AP, GL, intercompany, and order management data are stable. Because the package is marked OTHER and AUTHID CURRENT_USER, customizations should avoid direct invocation unless the underlying staging and fact tables are understood, and any usage should be validated against the specific EBS release (12.1.1 or 12.2.2) in use.
-
PACKAGE: APPS.OPI_DBI_OPM_COGS_PKG
12.1.1
-
APPS.OPI_DBI_OPM_COGS_PKG SQL Statements
12.1.1
-
PACKAGE BODY: APPS.OPI_DBI_OPM_COGS_PKG
12.1.1
-
APPS.OPI_DBI_OPM_COGS_PKG dependencies on IC_WHSE_MST
12.1.1
-
APPS.OPI_DBI_OPM_COGS_PKG dependencies on OE_ORDER_LINES_ALL
12.1.1
-
APPS.OPI_DBI_OPM_COGS_PKG dependencies on GL_SUBR_TST
12.1.1
-
APPS.OPI_DBI_OPM_COGS_PKG dependencies on GL_SUBR_LED
12.1.1