Search Results get_context_id




Overview

APPS.PAY_SA_UPGRADE is a Saudi Arabia (SA) localization upgrade package body shipped with Oracle E-Business Suite Payroll. Its purpose is to remediate payroll run result data during upgrade or patching activities specific to the Saudi Arabian legislative environment. The package header and body are versioned under the source file pysaupgr.pkb, and the code carries a header identifier of 115.2, indicating a long-standing, stable component within the payroll schema.

The business problem the package addresses is a data integrity gap that can arise when run results exist for a set of elements but lack a corresponding run result value for a "Joiner" input value. This condition must be detected and corrected so that subsequent payroll processing, element entry validation, and statutory reporting for Saudi Arabia operate on consistent data. The package is classified as OTHER in the ETRM documentation rather than as a public API, reflecting that it is an internal upgrade utility rather than a supported integration interface.

Key Procedures and Functions

The ETRM documentation records a single documented procedure, RUN, which serves as the entry point for the upgrade activity. This procedure orchestrates the remediation logic whose supporting cursor, csr_results, selects run results joined across element types, input values, assignment actions, and run result values. The cursor identifies rows where a run result exists but no run result value exists for the Joiner input value, and includes a special DECODE that treats the GOSI element differently from other elements when deriving the element entry identifier.

The package body also contains an internal helper, get_context_id, which is relevant to the search that surfaced this object. This function returns the context identifier for a supplied context name by querying FF_CONTEXTS. It is a private function used to resolve the Saudi Arabia legislative context during upgrade processing, and it is not exposed as a documented API. Because it is defined only in the package body, it cannot be called from external code.

Tables Accessed

Per the documented metadata, the package references the following tables through APPS synonyms:

  • FF_CONTEXTS — read by get_context_id to translate a context name into a context identifier.
  • PAY_RUN_RESULTS — the primary subject of the upgrade; rows are selected for elements lacking a Joiner run result value. The cursor applies the PAY_RUN_RESULTS_N50 and PAY_RUN_RESULTS_N1 indexes as hints.
  • PAY_RUN_RESULT_VALUES — the run result value rows that are checked for existence and, where absent, presumably inserted or corrected.
  • PAY_ELEMENT_TYPES_F and PAY_INPUT_VALUES_F — read to resolve element names and input value names, and to identify the Joiner input value.
  • PAY_ASSIGNMENT_ACTIONS — joined to associate each run result with its assignment action and assignment.
  • PAY_ACTION_CONTEXTS — referenced in the metadata, used to relate assignment actions to their legislative contexts.

Usage Notes

PAY_SA_UPGRADE is an upgrade-time utility and is not intended for routine invocation. It is typically executed by Oracle-provided upgrade or patch drivers, or by a database administrator working under Oracle Support direction, during the application of Saudi Arabia payroll patches or during a release upgrade such as the move to 12.1.1 or 12.2.2. It is not exposed through a standard concurrent program or a self-service form; the documented RUN procedure is the sanctioned call point when a scripted invocation is required.

Because the package modifies payroll run results and run result values, it should only be run against a backed-up environment and preferably outside active payroll processing windows. The ETRM metadata records that no other packages reference PAY_SA_UPGRADE, confirming its role as a terminal, self-contained remediation module rather than a shared service. Custom code should not depend on its internal functions such as get_context_id, since body-level routines carry no upgrade guarantee between releases.