Search Results pay_ie_ehecs_report_pkg




Overview

APPS.PAY_IE_EHECS_REPORT_PKG is a PL/SQL package declared with AUTHID CURRENT_USER that supports statutory reporting for Irish payroll under the Enhanced Employer/Employee Reporting framework (E-Report), generating the structured EHECS/end-of-year return required by Irish Revenue. The package drives the assembly of report header, body, and footer XML fragments and manages the underlying payroll action data extraction, archive population, and assignment-level processing. Its global package variables (prefixed g_) act as a shared state container across procedures invoked within a single report run.

A large proportion of these globals hold report-level configuration and derived values, including g_payroll_id, g_business_Group_id, g_employer_id, g_rep_group, g_pact_id, and the reporting period variables g_year, g_quarter, g_qtr_start_date, and g_qtr_end_date. The variable g_comments, typed VARCHAR2(300), is the free-text carrier for the report comment field emitted in the generated output. Related descriptive globals include g_occupational_category, g_occupational_category_M_C_P, g_report_type, g_declare_date, g_change_indicator, g_org_name, g_ie_nat_min_wage_rate, and g_archive_effective_date. Filtering is supported by g_where_clause, g_where_clause1, and g_where_clause_asg_set, while g_assignment_set_id and g_exc_inc parameterise inclusion rules.

Key Procedures and Functions

  • RANGE_CODE — Builds the range/action SQL used to drive payroll assignment action processing, returning a SQL string to the caller.
  • ASSIGNMENT_ACTION_CODE — Executes the core assignment action logic across a defined person or range, typically called in chunked processing during a payroll action.
  • ARCHIVE_INIT — Initialises the archiving phase for a given payroll action, establishing the working data set from which the EHECS output is produced.
  • ARCHIVE_DATA — Archives the extracted report data for an assignment action at a supplied effective date, persisting intermediate results used as report input.
  • ARCHIVE_DEINIT — Finalises and releases the archive process for the payroll action, closing out the run cleanly.
  • GEN_BODY_XML — Generates the body section of the EHECS XML return, including per-employee and per-payroll data.
  • GEN_HEADER_XML — Generates the XML header, populated with employer, payroll, period, and comment-level attributes such as g_comments.
  • GEN_FOOTER_XML — Generates the XML footer, concluding the report document and carrying any trailing totals or declarations such as g_declare_date.

Tables Accessed

Usage Notes

The package is not referenced by any other APPS package, indicating it is an entry-point module rather than a shared utility library. It is invoked as part of Irish payroll statutory reporting, typically from a concurrent program that executes the archive initialisation, assignment processing, and XML generation sequence for a given payroll action. Because the global g_ variables carry state across procedure calls, the archive and generation procedures must be executed within a single session and in the documented order: ARCHIVE_INIT, iterative ASSIGNMENT_ACTION_CODE/ARCHIVE_DATA calls, ARCHIVE_DEINIT, then GEN_HEADER_XML, GEN_BODY_XML, and GEN_FOOTER_XML. When extending or debugging output, inspect the corresponding global — for example, g_comments governs the 300-character comment emitted in the report — but note that these globals are session-scoped and are not persisted between separate concurrent program invocations.