Search Results pay_element_template_gen




Overview

PAY_ELEMENT_TEMPLATE_GEN is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that supports the Payroll Element Template Generator, a utility used to instantiate the payroll setup objects required to define and administer element templates. Rather than representing a runtime business API, the package serves as the internal engine behind the template generation process, encapsulating the logic required to create elements, element classifications, formulas, balances, and related configuration records in bulk from a predefined template definition. It is declared with AUTHID CURRENT_USER, meaning it executes with the privileges of the invoking session rather than the definer, which is consistent with a utility package intended for controlled invocation by application module code.

The package header identifies it as a legacy object with an original revision history dating to the 11i code line (pyetmgen.pkh, revision 115.5), and it remains present through the 12.1.1 and 12.2.2 releases for backward compatibility with components that depend on its procedures. It is classified as OTHER in the documented metadata, indicating it is not a supported public API and should not be called directly by customizations.

Key Procedures and Functions

The ETRM metadata documents three procedures within this package:

  • GENERATE_PART1 — Performs the first phase of template generation. It accepts an effective date, an HR-only indicator, an HR-to-payroll indicator defaulting to false, and a template identifier. Its role is to build the core HR-side element and element classification structures for the selected template, optionally extending the generation into payroll-related constructs when requested.
  • GENERATE_PART2 — Performs the second phase of template generation, taking an effective date and the same template identifier. This stage completes the remaining template objects, such as balances, feeds, and other payroll constructs that depend on the artifacts created in part one.
  • ZAP_CORE_OBJECTS — Removes generated core objects. It accepts a PL/SQL collection of core objects (typed through pay_element_template_util) and a flag indicating whether formula packages should be dropped. This provides the cleanup and rollback counterpart to the generation procedures.

Tables Accessed

The package reads and writes a broad set of HRMS setup tables through APPS synonyms. Payroll element structures are managed via PAY_ELEMENT_TYPES_F and PAY_ELEMENT_CLASSIFICATIONS. Formula creation and maintenance touch FF_FORMULAS_F, FF_FORMULA_TYPES, FF_COMPILED_INFO_F, and FF_FDI_USAGES_F. Balance definitions are handled through PAY_BALANCE_TYPES, PAY_DEFINED_BALANCES, PAY_BALANCE_ATTRIBUTES, PAY_BAL_ATTRIBUTE_DEFINITIONS, PAY_BALANCE_FEEDS_F, PAY_BALANCE_CATEGORIES_F, PAY_BALANCE_CLASSIFICATIONS, and PAY_BALANCE_DIMENSIONS. Benefit classification linkage is stored in BEN_BENEFIT_CLASSIFICATIONS. These tables collectively represent the metadata that a generated element template must populate for payroll processing and subsequent balance feeding.

Usage Notes

Because the package is classified as OTHER and is not a published API, it is intended for internal use by Oracle Payroll module code, typically triggered from the Element Template Generator user interface or its associated concurrent process. The two-part generation design (GENERATE_PART1 and GENERATE_PART2) reflects the order-dependent nature of template creation: core element and classification records must exist before dependent balances and feeds can be generated. ZAP_CORE_OBJECTS exists to reverse partial or erroneous generation runs, including the removal of compiled formula packages. Customizations should not invoke these procedures directly; instead, they should use supported element and balance APIs, as direct calls risk orphaned setup data and unsupported behavior across 12.1.1 and 12.2.2.