Search Results determine_company




Overview

APPS.GMICCAL is a PL/SQL package that belongs to the Oracle Inventory calendar utility layer used by Oracle Process Manufacturing (OPM) and its inventory integration with Oracle E-Business Suite. The package name derives from "GMI" (the historical schema prefix for Oracle Process Manufacturing) and "CCAL", denoting calendar and period-balance processing. Its declaration, AUTHID CURRENT_USER, indicates that the package executes with the privileges of the invoking user rather than its owner, a design choice that ensures runtime privilege resolution consistent with the calling session.

GMICCAL provides the procedural infrastructure for validating transaction dates against the OPM inventory calendar, maintaining period balance records, and deriving default organizational context. The package defines an extensive set of subtypes based on column anchors from the IC_* inventory tables, ensuring that parameter types remain synchronized with their underlying schema definitions. It also publishes a series of negative return codes (for example, INVCAL_FISCALYR_ERR, INVCAL_PERIOD_ERR, INVCAL_PERIOD_CLOSED, and INVCAL_WHSE_CLOSED) that callers use to interpret validation failures programmatically.

Key Procedures and Functions

The ETRM 12.2.2 metadata documents seven callable units within GMICCAL. The user search term determine_company corresponds to DETERMINE_COMPANY, which determines the appropriate company or organization context for the calling process. Its constants ORGN_CO_ERR and ORGN_VAL_ERR suggest it validates organization codes and reports company resolution failures. Additional documented units include:

  • TRANS_DATE_VALIDATE — validates a transaction date against organizational and warehouse calendar parameters.
  • DELETE_IC_PERD_BAL — removes period balance records for a given fiscal year, period, and warehouse.
  • INSERT_IC_PERD_BAL — inserts period balance rows, referencing a period and operation code.
  • CALC_USAGE_YIELD — computes usage and yield metrics, typically for process manufacturing reporting.
  • WHSE_STATUS_UPDATE — refreshes warehouse status records, likely tied to period open/close transitions.
  • PERIOD_STATUS_UPDATE — maintains period status information, including validation of closed periods.

Tables Accessed

GMICCAL references a broad set of inventory and calendar tables through APPS synonyms. The calendar hierarchy is anchored by IC_CLDR_HDR (fiscal year header) and IC_CLDR_DTL (period detail, providing period_end_date). Warehouse context is drawn from IC_WHSE_MST and IC_WHSE_STS, which supply warehouse codes and period status. Inventory data resides in IC_ITEM_MST, IC_LOTS_MST, IC_LOCT_MST, and IC_LOCT_INV. Transaction processing uses IC_TRAN_PND and IC_TRAN_CMP for pending and completed transactions. Balance persistence relies on IC_PERD_BAL and the sequence GMI_PERD_BAL_ID_S. Organization and reason code lookups use SY_ORGN_MST and SY_REAS_CDS.

Usage Notes

GMICCAL is typically invoked from OPM inventory forms, concurrent programs that calculate period balances, and custom extensions that must enforce calendar validity before posting transactions. Because it is referenced by ten other packages, it functions as a shared utility rather than an application-facing API. Developers invoking DETERMINE_COMPANY or related units should always evaluate the returned numeric error codes against the documented constants to distinguish parameter errors from closed-period or closed-warehouse conditions.