Search Results pay_sfr_shd




Overview

PAY_SFR_SHD is a PL/SQL package in the APPS schema that supports the Oracle Payroll "Shadow Formula Rules" (SFR) framework. Shadow formula rules allow element templates and payroll elements to associate a shadow (mirror) formula with a primary formula, enabling calculations such as employer charges, secondary balances, or derived values to be driven from a single source formula definition. The package is classified as OTHER in the ETRM API classification, indicating it is an internal utility rather than a formally published public API.

The "_SHD" suffix denotes its role as the shadow-side engine that underpins the SFR business layer. It is a low-level dependency of the more user-visible SFR packages (PAY_SFR_BUS, PAY_SFR_INS, PAY_SFR_UPD, PAY_SFR_DEL) and of the element template generation routines, and it is listed as referencing itself, confirming recursive or shared internal calls. The package is VALID in both 12.1.1 and 12.2.2, and its dependency footprint is stable across these releases.

Key Procedures and Functions

The ETRM metadata documents four subprograms:

  • CONSTRAINT_ERROR — A helper that raises or handles constraint-violation conditions encountered while maintaining shadow formula rules. It standardizes error signalling so that callers in the SFR business packages receive a consistent exception when data integrity rules (for example, uniqueness of a shadow rule for a given element or formula) are violated.
  • API_UPDATING — A guard routine used to detect or flag that an update is in progress. It protects against re-entrant or concurrent modification of shadow formula rule data, ensuring that an API-driven change does not collide with an in-flight update from another session or from a nested call within the same transaction.
  • LCK — The locking routine. It acquires the necessary row-level or logical locks on shadow formula rule records prior to modification, preventing lost updates when multiple element template or element maintenance processes act on the same rule simultaneously.
  • CONVERT_ARGS — A utility that converts or normalizes arguments passed into the shadow rule processing routines. Because callers include both the SFR business packages and the element template utilities, this routine reconciles differing argument conventions (for example, identifiers versus names) before the core logic executes.

Tables Accessed

Two tables are documented through APPS synonyms:

  • PAY_SHADOW_FORMULA_RULES — The primary data store for shadow formula rule definitions. PAY_SFR_SHD reads, validates, and maintains rows in this table as shadow rules are created, updated, or deleted by the SFR business layer. All four subprograms relate to the integrity and lifecycle of these rows.
  • ALL_CONSTRAINTS — The data dictionary view consulted to determine the constraint definitions that apply to the shadow formula rule table. The package uses this information to drive validation logic and to raise the appropriate error (via CONSTRAINT_ERROR) when a rule fails a database or application constraint.

Usage Notes

PAY_SFR_SHD is not intended to be called directly by end users or by customer-developed code. Its documented referencers are the internal SFR packages — PAY_SFR_BUS, PAY_SFR_DEL, PAY_SFR_INS, PAY_SFR_UPD — together with PAY_ELEMENT_TEMPLATE_GEN and PAY_ELEMENT_TEMPLATE_UTIL. This pattern indicates that the package is invoked indirectly whenever an element template is generated or an element's shadow formula rules are maintained through the standard Payroll element and template forms, or through batch processes that synchronize formulas with elements.

Because the routines include locking and update-guard logic, the package assumes it is called within a controlled transaction in which the caller holds the appropriate context. Customizations that touch PAY_SHADOW_FORMULA_RULES should invoke the higher-level SFR business packages rather than this shadow engine, so that locking, constraint validation, and argument conversion remain consistent with Oracle's delivered behavior.