Search Results pay_fi_rules




Overview

PAY_FI_RULES is a public PL/SQL package owned by APPS and classified under ETRM as an OTHER API within the Oracle E-Business Suite Payroll (PAY) product family. Its declared purpose, as stated in the package header, is to fetch the Legal Employer Id of the Local Unit associated with a given Assignment Id. In the Oracle EBS legislative framework, a "Local Unit" represents the legal employer entity for a specific assignment, and this package resolves that relationship for downstream payroll and statutory reporting processes. The package is declared with AUTHID CURRENT_USER, meaning executing privileges are evaluated against the calling schema rather than the defining schema, a common practice for shared APPS code that must respect the caller's security context.

The header comments describe the core contract: given a required assignment identifier and effective date, the package locates the Legal Employer Id of the Local Unit and populates an output parameter (p_tax_unit_id). On failure, the output is left unset. The package is referenced by one other package, indicating it serves as a shared utility within the payroll processing stack rather than a standalone entry point.

Key Procedures and Functions

ETRM documents eight procedures and functions for this package. Their purposes are described below; parameter signatures are not reproduced here.

  • GET_MAIN_LOCAL_UNIT_ID — Corresponds to the primary documented behavior: returns the Legal Employer Id of the Local Unit for a specified assignment and effective date.
  • GET_MAIN_TAX_UNIT_ID — Resolves the Tax Unit Id associated with an assignment, functioning as the tax-reporting counterpart to the local unit lookup.
  • GET_THIRD_PARTY_ORG_CONTEXT — Retrieves organization context for third-party (payroll interface) processing, supporting the FI (Future Interface / third-party payroll) area implied by the package name.
  • GET_SOURCE_TEXT_CONTEXT and GET_SOURCE_TEXT2_CONTEXT — Return source text context values, likely for populating descriptive or legislative text used during interface file generation.
  • ADD_CUSTOM_XML — Appends custom XML fragments, suggesting this package contributes to XML-based payroll interface payloads.
  • LOAD_XML — Loads or assembles XML content, reinforcing the package's role in generating structured interface output.
  • FLEX_SEG_ENABLED — Tests whether a key flexfield segment is enabled, a common guard used when deciding which segments to include in output.

Tables Accessed

The package reads and writes a broad set of payroll and HR tables through APPS synonyms:

Usage Notes

PAY_FI_RULES is typically invoked from payroll legislative code, third-party payroll interface programs, and custom PL/SQL that needs to resolve legal employer or tax unit context for an assignment. It is not a user-facing form entry point; rather, it is called programmatically by other packages — the one documented dependent package confirms this internal usage pattern. Custom code should call GET_MAIN_LOCAL_UNIT_ID (and its tax unit counterpart) with a valid assignment id and effective date, and must handle the documented failure case where the output parameter remains unset. As with any AUTHID CURRENT_USER API, callers must ensure the execution schema holds appropriate privileges on the underlying APPS synonyms and uses the correct effective date to avoid incorrect effective-dated resolution.