Results for “c_line”

50+ results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

OPI_EDW_COGS_F_SZ is an Oracle E-Business Suite PL/SQL package body owned by the APPS schema that supports the extract, transformation, and load of Cost of Goods Sold (COGS) fact data into the Oracle E-Business Suite Daily Business Intelligence / Enterprise Data Warehouse (EDW) star schema. The suffix convention _F_SZ identifies it as a fact-table helper whose name derives from the "size" or row-count staging pattern used by EDW collection programs to pre-allocate work and validate incremental windows. In the 12.1.1 and 12.2.2 releases the package is classified as OTHER and is not part of a public API surface; it is an internal worker invoked by the EDW COGS fact collection logic. Its principal role is to determine how many source records qualify for a given collection window so that downstream fact loads can size their bulk operations and detect changes across order, return, invoicing, and work-in-process transaction streams.

Key Procedures and Functions

  • CNT_ROWS — Returns an OUT NOCOPY numeric count of source rows falling inside a supplied from-date/to-date range. The procedure embeds a cursor (c_cnt_rows) that unions two counting queries. The first query joins order headers, ordered lines (pl), order lines (l), delivery details, material transaction accounts, and material transactions, restricting to transaction_source_type_id = 2, accounting_line_type IN (2,35), and line_category_code = 'ORDER', with the top-model line resolved through NVL(top_model_line_id,line_id). The second branch handles returns (transaction_source_type_id = 12, line_category_code = 'RETURN'), using a third order-line alias (typically the return or credit line correlated by the user's search term "c_line"). Both branches filter on the greatest last_update_date across the joined tables, guaranteeing that only records touched during the incremental window are counted.
  • EST_ROW_LEN — Estimates the average row length of the extracted COGS fact row, used by the EDW loader to project extract size and allocate storage or array fetch sizes for the fact load.

Tables Accessed

Usage Notes

The package is invoked by the EDW COGS fact collection process, either directly from the collection program or from a referencing package (the metadata records one dependent package). It is not intended for direct invocation from EBS forms or ad hoc SQL. The CNT_ROWS window parameters are populated by the calling collection program from its high-water-mark or last-run-date logic, and the OUT NOCOPY count is used to size subsequent bulk-extract work. Because the count depends on last_update_date comparisons across six or more joined tables, the accuracy of the result depends on the completeness of auditing and the stability of the collection window. In 12.1.1 and 12.2.2 the package remains a non-public, internal EDW object; customizations should not modify it, and downstream extensions should consume the resulting fact tables rather than the package directly.