Search Results ap_expense_report_lines




Overview

AP_WEB_DB_VIOLATIONS_PKG is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that supports the Oracle Internet Expenses (OIE) expense report workflow, specifically the policy violation engine. Its central responsibility is maintaining the integrity and lifecycle of policy violation records stored in AP_POL_VIOLATIONS and AP_POL_VIOLATIONS_ALL. When expense reports are created, audited, corrected, resubmitted, or short-paid, the header identity (REPORT_HEADER_ID) associated with individual violations must stay synchronized with the corresponding expense report headers and lines. This package provides the database-level operations that perform that synchronization, including deletion of stale violations, reassignment of violations to replacement header identifiers, and cleanup of duplicate entries.

The package is classified as OTHER in the ETRM repository and is documented with six procedures/functions. It is referenced by two other packages, confirming that it is a shared utility layer rather than a standalone user-facing program. The header comment dates the source at version 120.4 (2006), indicating a long-stable code base carried forward into EBS 12.1.1 and 12.2.2.

Key Procedures and Functions

  • deleteViolationEntry — Removes all rows from ap_pol_violations matching a supplied report header identifier. Used when an expense report or its associated violations are discarded, so orphaned violation rows do not persist. Errors are routed through AP_WEB_DB_UTIL_PKG.RaiseException and APP_EXCEPTION.RAISE_EXCEPTION.
  • updateViolationsHeaderId — Returns a BOOLEAN indicating success or failure. It reassigns violation rows from an original report header identifier to a new one, restricted to distribution line numbers that exist on the new expense report lines. This supports copy, correction, or re-creation scenarios in which violations must follow the report to its new header.
  • SetVioPolicyShortpaidReportID — Reassigns violation records associated with a policy-related short payment from an original expense report header identifier to a new one, keeping violation history aligned when a report is short-paid by policy.
  • SetVioReceiptsShortpaidReportID — Performs the equivalent reassignment for violations arising from missing or non-compliant receipts during a short payment.
  • SetViolationBothPaidReportID — Handles the case where violations span both policy and receipt categories, updating the report header identifier for the combined violation set.
  • DeletedupViolationEntry — Eliminates duplicate violation entries, preventing redundant rows from accumulating when reports are processed or recalculated more than once.

Tables Accessed

  • AP_POL_VIOLATIONS — The principal table manipulated; violations are deleted, reassigned, or de-duplicated here using REPORT_HEADER_ID as the driving key.
  • AP_POL_VIOLATIONS_ALL — Referenced via APPS synonym, providing the partitioned or multi-org view of violation data used by the short-paid reassignment routines.
  • AP_EXPENSE_REPORT_HEADERS — Supplies and validates REPORT_HEADER_ID values; the source column anchors the parameter datatypes.
  • AP_EXPENSE_REPORT_LINES — Queried for DISTRIBUTION_LINE_NUMBER to scope which violations should be moved to the new header identifier.

Usage Notes

The package is invoked internally by the Internet Expenses framework rather than directly by end users. Typical callers include expense report validation and audit logic, the short-payment processing flow, and any concurrent program or form that copies, corrects, or deletes an expense report. Customizations that manipulate expense report headers programmatically should call these APIs instead of issuing direct DML against AP_POL_VIOLATIONS, because the package centralizes exception logging through AP_WEB_DB_UTIL_PKG and preserves referential consistency between violation rows and the header identifiers that the user's search term, REPORT_HEADER_ID, represents.