Search Results get_assignment_count




Overview

APPS.PAY_KR_WF_SUBMIT_PROGRAM_PKG is a Korean localization payroll workflow package shipped with Oracle E-Business Suite. It is classified under ETRM as an OTHER API and is declared with AUTHID CURRENT_USER, meaning its SQL statements execute under the privileges of the invoking user rather than the package owner. The package header carries the version marker pykrwfsp.pkh 120.0, indicating it is part of the 12.x code line and remains present in both 12.1.1 and 12.2.2. Its business purpose is to support Oracle Workflow–driven submission and validation of payroll run programs for Korean legislated payroll processing, where regulatory calculation rules, retroactive processing, and assignment-level eligibility checks are more complex than in the base Oracle Payroll product. The package sits at the boundary between the Workflow engine and the payroll action model: it interprets Workflow item attributes, evaluates whether a payroll action may proceed, and returns a Workflow result value that drives subsequent activity branching.

Key Procedures and Functions

  • SUBMIT_PROGRAM — The principal entry point invoked from a Workflow activity function. It accepts the standard Workflow context (item type, item key, activity id, function mode) and returns a result string. It handles the submission of the associated payroll program for the workflow item, mediating between the Workflow process definition and the payroll run.
  • CHECK_RUN_FLAGS — A validation routine that inspects payroll action state flags for the workflow item and returns a result indicating whether processing may continue. It is typically wired into Workflow as a prerequisite or branching step so that a run is not submitted while it is locked, already in progress, or otherwise invalid.
  • GET_ASSIGNMENT_COUNT — Returns a count of assignments associated with the payroll action, allowing the Workflow process to determine whether any assignment-level work exists for the run. This is used for conditional routing, for example skipping downstream activities when the action contains no assignments.

All three procedures share the same signature pattern: they take p_itemtype, p_itemkey, p_actid, and p_funcmode as inputs, with an IN OUT NOCOPY p_result output parameter. This is the canonical Oracle Workflow function-activity interface, confirming that the package is designed to be called directly by the Workflow engine rather than by end-user code.

Tables Accessed

The package references five payroll and HR tables through APPS synonyms:

  • PAY_PAYROLL_ACTIONS — The parent payroll action record; the source of action status and run flags evaluated by CHECK_RUN_FLAGS.
  • PAY_ASSIGNMENT_ACTIONS — Assignment-level action rows; the basis for the count returned by GET_ASSIGNMENT_COUNT.
  • PAY_ACTION_INTERLOCKS — Interlock records that enforce sequencing and prevent conflicting concurrent payroll actions; inspected before a run is submitted.
  • PAY_RUN_TYPES_F — Run type definitions that determine the program and processing options associated with the action.
  • PER_TIME_PERIODS — Payroll period definitions used to resolve the pay period context of the action.

Usage Notes

The package is invoked by Oracle Workflow through function activities defined in the Korean payroll item type, not by direct user action. Typical invocation occurs when a payroll run is submitted via the Submit Payroll Process flow, where Workflow calls CHECK_RUN_FLAGS and GET_ASSIGNMENT_COUNT to validate state, then SUBMIT_PROGRAM to launch the run. A key implementation consideration is that AUTHID CURRENT_USER requires the calling schema to hold direct grants on the underlying PAY and PER objects; custom code or workflow configurations that execute under a restricted schema can fail with ORA-00942. ETRM records zero referencing packages, so the dependency is entirely via Workflow configuration metadata rather than PL/SQL call sites. Developers extending Korean payroll workflows should treat this package as a supported but internal API, and should validate result values against the Workflow process definition rather than assuming a fixed return vocabulary.