Search Results compile_inv_period_balances
Overview
APPS.GMF_PERIODCLOSE_PVT is a private PL/SQL API belonging to the Process Manufacturing (OPM) inventory module of Oracle E-Business Suite. Its header comment, dated 2005, identifies it as the "Period Close Private API for Process Organizations," whose stated purpose is to "generate period ending balances for process organizations." The package therefore forms the computational core of the OPM inventory accounting period close: for any given process organization, it determines the accounting period being closed and materializes the closing on-hand inventory balances that become the opening position for the next period.
The suffix _PVT denotes a private (internal) package rather than a public, supported extension point. The package is owned by APPS and, per the ETRM 12.2.2 metadata, is referenced by zero other packages, confirming it is invoked from concurrent-program drivers and other internal OPM components rather than exposed as a callable public API. The same source file carries a 120.1 version header, indicating a long-stable line of code shared across the 12.1.1 and 12.2.2 releases.
Key Procedures and Functions
The documented package spec exposes three procedures:
- COMPILE_PERIOD_BALANCES — the standard concurrent-program entry point. It uses the conventional EBS concurrent interface (error buffer and return code out parameters) together with an organization identifier and the closing accounting period identifier. It drives the balance compilation for a single process organization and reports success or failure back to the concurrent manager.
- COMPILE_INV_PERIOD_BALANCES — the inventory-specific balance compilation routine, and the object of the search term compile_inv_period_balances. In addition to the organization and closing accounting period identifiers, it accepts a schedule close date and a final-close indicator, and it returns a return status and return message rather than the concurrent errbuf/retcode pair. This signature makes it suitable for programmatic invocation from other PL/SQL units, where the caller must inspect a status value instead of a concurrent return code.
- COMPILE_PERIOD_BALANCES_LE — a legal-entity-oriented variant. It is parameterized by legal entity, fiscal year and fiscal period rather than by organization and accounting period, and additionally accepts a final-close flag and an organization code. This supports period close processing scoped to a legal entity across the process organizations assigned to it.
All three procedures ultimately generate period-ending balances; they differ in scope (organization versus legal entity) and in their calling convention (concurrent versus programmatic).
Tables Accessed
Per the documented metadata, the package works across four functional groups of tables accessed through APPS synonyms:
- Period and calendar setup — GL_PERIODS, GL_PERIOD_STATUSES, GL_LEDGERS, GMF_FISCAL_POLICIES and GMF_PERIOD_STATUSES define the accounting period being closed, its open/closed status, and the OPM fiscal policy that maps process organizations to calendars.
- Inventory balances and results — MTL_ONHAND_QUANTITIES_DETAIL supplies on-hand quantities; MTL_MATERIAL_TRANSACTIONS supplies period transaction activity; MTL_PARAMETERS and MTL_SECONDARY_INVENTORIES provide organization-level and subinventory-level attributes used to scope the calculation. Results are written to GMF_PERIOD_BALANCES and its companion objects GMF_PERIOD_BALANCES_S (a sequence or shadow table) and GMF_PERIOD_BALANCES_GT (a global temporary table used for intermediate processing).
- Organization and security — GMF_PROCESS_ORGANIZATIONS_GT, HR_ORGANIZATION_INFORMATION, MTL_PARAMETERS and FND_USER resolve process organizations, their classification, and the user context.
Usage Notes
GMF_PERIODCLOSE_PVT is not intended for direct customer invocation. In standard functionality it is called by the OPM period close concurrent programs, which submit COMPILE_PERIOD_BALANCES (or the legal-entity variant COMPILE_PERIOD_BALANCES_LE) for each process organization being closed. The final-close parameters determine whether the period is provisionally or finally closed, and the schedule close date governs the effective cutoff for transaction inclusion.
Because COMPILE_INV_PERIOD_BALANCES returns an explicit status and message, it is the practical hook for custom PL/SQL that needs to compile inventory period balances outside the concurrent manager — for example, during data conversion, interface reconciliation, or a controlled re-run after correcting inventory transactions. Custom code should treat the package as private and subject to change between releases, wrap calls in exception handlers, validate the return status before continuing, and never assume the internal table set is fixed. Any such customization should be regression-tested on both 12.1.1 and 12.2.2, since the package is shipped as part of the APPS schema and may be regenerated by patching.