Search Results per_7859_def_letter_stat_exist
Overview
APPS.PER_LETTER_GEN_STATUSES_PKG is a server-side PL/SQL package body that supports the Oracle EBS "Letter Generation" feature within Oracle HRMS (People Management). The package manages records in the PER_LETTER_GEN_STATUSES table, which associates an assignment status (such as Active, Terminated, or a user-defined status) with a specific letter type within a given business group. In effect, it controls which statuses are eligible to trigger a particular letter or notification, and prevents conflicting or duplicate mappings from being created. The package is classified as OTHER in the ETRM repository, meaning it is an internal supporting utility rather than a formally published public API. It relies on HR_UTILITY for message handling and error raising, a common pattern in Oracle HRMS PL/SQL code.
Key Procedures and Functions
The package exposes three documented procedures:
- ASSIGNMENT_STATUS_NOT_UNIQUE — Validates a proposed row against existing data in PER_LETTER_GEN_STATUSES. It determines whether the combination of business group, assignment status type, and letter type already exists, optionally excluding a specified letter_gen_status_id (so that the record being updated is not treated as its own duplicate). If a duplicate is found, it raises the predefined error PER_7859_DEF_LETTER_STAT_EXIST via HR_UTILITY. This acts as a uniqueness guard on the generic data setup form.
- GET_NEXT_SEQUENCE — Retrieves the next value from the PER_LETTER_GEN_STATUSES_S sequence and returns it through an IN OUT parameter, but only when the passed identifier is null. This provides the primary key for a new letter generation status row. Failure to fetch a value raises HR_6153_ALL_PROCEDURE_FAIL, tagged with the procedure and step for diagnostic purposes.
- GET_ASSIGNMENT_STATUS — This is the procedure most relevant to the user's search term "get_assignment_status". It resolves or queries assignment status information for the letter generation status logic, retrieving the assignment status data associated with the letter gen status/letter type context so that callers can display or validate status descriptions (drawing on the TL translation tables). The truncated source excerpt confirms the name but not the full argument list; the procedure is documented in the ETRM registry as a distinct callable unit.
Tables Accessed
- PER_LETTER_GEN_STATUSES — the primary table managed by this package; holds the mapping between letter types, assignment status types, and business groups.
- PER_LETTER_GEN_STATUSES_S — the sequence supplying surrogate keys for new rows.
- PER_ASSIGNMENT_STATUS_TYPES and PER_ASSIGNMENT_STATUS_TYPES_TL — the base and translated assignment status definitions used to resolve status codes and descriptions.
- PER_ASS_STATUS_TYPE_AMENDS and PER_ASS_STATUS_TYPE_AMENDS_TL — assignment status type amendment records, used where historical or amended status definitions apply.
Usage Notes
This package is normally invoked indirectly by the Oracle HRMS Letter Generation setup/entry forms (for example, when defining or maintaining letter types and their associated statuses) rather than by end users directly. The validation procedure fires during insert or update processing on the generic data block; GET_NEXT_SEQUENCE fires during record creation; and GET_ASSIGNMENT_STATUS supports display and lookup of assignment status information on the form. Because ETRM shows zero packages referencing it, it is not part of a published call chain and should be treated as an internal implementation detail. Custom code should prefer supported APIs and avoid direct reliance on this package, as its procedures and signatures are not guaranteed to remain stable across patches or upgrades (12.1.1 through 12.2.2).