Search Results validate_tax_ben_element




Overview

APPS.PER_GB_TAX_BEN_PKG is a United Kingdom localization package within the Oracle E-Business Suite HRMS and Payroll modules. Its purpose is to support the processing of tax and benefit batch lines — specifically, the inbound upload and validation of third-party payroll data (such as tax and benefit information supplied by external providers or government agencies) into Oracle Payroll batch structures. The package provides the programmatic infrastructure for creating batch headers and lines, validating elements against the payroll element definitions, and decomposing combined data lines into individually processable records.

The package header carries the directive AUTHID CURRENT_USER, meaning that executed code runs under the privileges of the invoking schema (typically APPS) rather than the defining schema. The header revision string (pegbtaxb.pkh 115.4, dated 2003) indicates this is a long-standing component carried forward into both EBS 12.1.1 and 12.2.2. A package-level constant, c_default_action_if_exists, defaults to 'I' (insert), governing duplicate handling behaviour when records already exist. The specification also declares a g_batch_line record type mirroring the structure of PAY_BATCH_LINES, including assignment, element, effective-date, cost-allocation, concatenated-segment, and attribute1–attribute20 columns.

Key Procedures and Functions

The ETRM metadata documents nine callable units (the tenth listed entry is the package itself):

  • CREATE_TAX_BEN_BATCH_HEADER — Establishes a payroll batch header record to which subsequent tax and benefit lines are attached.
  • CREATE_TAX_BEN_BATCH_LINE — Inserts an individual batch line into PAY_BATCH_LINES using the fields defined by the g_batch_line record structure, populating assignment, element, date, and descriptive attribute columns.
  • BREAK_UP_LINE — Splits or decomposes a consolidated input line into its constituent payable or deductible components so each can be represented as a discrete batch line. This is the procedure most directly associated with the user search term "break_up_line".
  • UPLOAD_TAX_BEN — The principal driver routine that reads source tax and benefit data and orchestrates header and line creation, typically reading from an external file via UTL_FILE.
  • VALIDATE_TAX_BEN_ELEMENT — Verifies that the element referenced by an incoming line exists and is valid for processing against PAY_ELEMENT_TYPES_F and PAY_ELEMENT_CLASSIFICATIONS.
  • GET_ASSIGNMENT_INFO — Retrieves assignment-level details (from PER_ALL_ASSIGNMENTS_F, PER_PERIODS_OF_SERVICE, and PER_ALL_PEOPLE_F) for the assignment attached to an incoming record.
  • GET_ELEMENT_INFO — Returns element definition attributes required to validate and construct a batch line.
  • GET_FIELD — Extracts a specific field value from the input record structure, supporting the parsing logic used during upload.
  • CORRECT_TYPE_ID — Normalises or resolves the element/type identifier used on the incoming line so it matches the internal identifier stored in the payroll tables.

Tables Accessed

The package references the following tables through APPS synonyms: PAY_BATCH_LINES (the primary target for inserted and modified batch lines, including the attribute flexfield columns and cost allocation keyflex); PER_ALL_ASSIGNMENTS_F, PER_PERIODS_OF_SERVICE, and PER_ALL_PEOPLE_F (assignment, service-period, and person lookups used to resolve and validate the employee context of each line); PAY_ELEMENT_CLASSIFICATIONS and PAY_ELEMENT_TYPES_F (element validation and classification of the tax or benefit being processed); and UTL_FILE (Oracle-supplied server-side file I/O used to read the inbound source file). The documentation records no other packages referencing this package, indicating it functions as a top-level entry point rather than a shared library routine.

Usage Notes

PER_GB_TAX_BEN_PKG is typically invoked as part of a UK payroll tax and benefit data load process rather than through standard EBS forms. Its file handling via UTL_FILE suggests invocation from a concurrent program, a SQL*Plus or host script, or custom PL/SQL wrappers that point the package at a staged flat file. When extending or debugging this logic in 12.1.1 or 12.2.2, note that because the specification uses AUTHID CURRENT_USER, the executing user must hold direct privileges on the referenced objects and on the UTL_FILE directories. Any custom call must also respect the c_default_action_if_exists constant, which controls whether existing lines are superseded by insert rather than updated.