Search Results payslip_range_cursor
Overview
APPS.PAY_US_RULES is a PL/SQL package within the Oracle E-Business Suite Payroll module (Payroll US), classified under the "OTHER" API category in ETRM 12.2.2. It consolidates a set of supporting routines required by the US payroll element template framework, payslip generation, and statutory compliance features such as the Fair Labor Standards Act (FLSA) time definitions. Although not a public payroll API in the same sense as the element entry or payroll run interfaces, the package is referenced by three other packages and by Global Element Template processes, indicating it acts as an internal service layer rather than a standalone business interface.
The header excerpt (pyusrule.pkh 120.6.12010000.1) shows the package originated in 2004 and evolved through a series of enhancements, including support for user exit calls (Pre-Process, upd_user_stru, Post-Process), work schedule functionality, FLSA time definition retrieval, and the display of Net Pay Amount in words on payslips via custom XML. These changes were accumulated as versions 115.0 through 115.7, reflecting the package's role as a catch-all utility for US payroll rules rather than a narrowly-scoped API.
Key Procedures and Functions
- GET_TOKEN_NAMES — Returns token name identifiers used by the payslip XML generation and element template output routines. It is the object matching the user's search term.
- ELEMENT_TEMPLATE_PRE_PROCESS, ELEMENT_TEMPLATE_UPD_USER_STRU, ELEMENT_TEMPLATE_POST_PROCESS — Lifecycle hooks invoked from the Global Element Template during element creation and maintenance.
- DELETE_PRE_PROCESS, DELETE_POST_PROCESS — Counterpart hooks executed during element deletion.
- GET_OBJ_ID — Helper that resolves an object identifier, typically for referencing a specific definition record.
- WORK_SCHEDULE_TOTAL_HOURS — Calculates total scheduled hours for a given work schedule, supporting FLSA and time-entry processing.
- GET_TIME_DEF_FOR_ENTRY and GET_TIME_DEF_FOR_ENTRY_FUNC — Retrieve the time definition applicable to an entry; the latter carries a PRAGMA RESTRICT_REFERENCES directive for purity enforcement in SQL contexts.
- CONVERT_NUMBER, GET_WORD_VALUE, CF_WORD_AMOUNTFORMULA — Convert numeric net pay amounts into their word representations for payslip display.
- ADD_CUSTOM_XML, GET_CUSTOM_XML_ROUTINE — Insert and resolve custom XML fragments, notably for the "Net Pay in words" feature.
- GET_PAYSLIP_SORT_ORDER1, GET_PAYSLIP_SORT_ORDER2, GET_PAYSLIP_SORT_ORDER3, PAYSLIP_RANGE_CURSOR — Control ordering and range selection of payslip lines.
Tables Accessed
The package reads and writes core payroll and HR tables through APPS synonyms, including PAY_ELEMENT_ENTRIES_F, PAY_ELEMENT_ENTRY_VALUES_F, PAY_ELEMENT_CLASSIFICATIONS, PAY_BALANCE_TYPES and PAY_BALANCE_DIMENSIONS for element and balance metadata; PAY_ACTION_INFORMATION and PAY_ACTION_INTERLOCKS for action processing; PAY_ASSIGNMENT_ACTIONS for assignment-level processing; PAY_ALL_PAYROLLS_F for payroll definitions; FF_FORMULAS_F for formula references; and HR_ALL_ORGANIZATION_UNITS, HR_LOCATIONS_ALL, HR_ORGANIZATION_INFORMATION and HR_SOFT_CODING_KEYFLEX for organization, location, and key flexfield lookups. FND_SESSIONS is consulted to obtain session context.
Usage Notes
The package is invoked primarily from Global Element Template processes during element maintenance, from payslip generation routines that produce XML output, and by the three other packages that reference it. Custom code should not call these routines directly without understanding their template-driven context; they are not designed as standalone APIs and their behavior depends on session state and the calling template.