Search Results ar_interest_headers




Overview

The APPS.AR_INTEREST_HEADERS_PKG package body encapsulates the core business logic used by Oracle Receivables to manage late charge (interest) header records. Late charges are the finance charges Oracle Receivables assesses against overdue customer transactions, and the header record is the parent entity that defines how a given late charge batch is calculated and applied for a specific customer, site, and currency. This package provides the procedural layer that validates, locks, updates, and deletes those header definitions, while also computing aggregate amounts drawn from the associated interest lines.

The package is classified as an "OTHER" API in the ETRM metadata, meaning it is not a formally published public API but an internal supporting package used principally by the Oracle Receivables late charges forms and concurrent processing. Its constants are initialized from the AR_PROCESS_STATUS and AR_RUN_TYPE lookup types at package load time, giving the procedural code symbolic names for statuses such as Not Run, Error, Success, Draft, and Final. Because it writes directly to AR_INTEREST_HEADERS, it is a critical component in the late charge lifecycle.

Key Procedures and Functions

  • GET_HEADER_AMOUNT — A function that returns the total interest charged for a given interest header. It sums the INTEREST_CHARGED column of the associated AR_INTEREST_LINES rows for the specified header, returning a single numeric aggregate.
  • LOCK_HEADER — A procedure that performs a pessimistic lock (SELECT ... FOR UPDATE) on the AR_INTEREST_HEADERS row identified by its primary key parameters, protecting the record from concurrent modification during an update or delete operation.
  • VALIDATE_HEADER — A procedure that enforces the business rules governing a late charge header, confirming that required columns such as customer, site use, currency, header type, and charge dates are consistent before the header is persisted.
  • UPDATE_HEADER — A procedure that writes the validated attribute set back to the AR_INTEREST_HEADERS row, effecting changes to calculation flags, grace days, interest periods, and related parameters.
  • DELETE_HEADER — A procedure that removes the interest header record together with its dependent data, subject to the locking and validation invoked by the caller.

Tables Accessed

  • AR_INTEREST_HEADERS — The primary table managed by the package. It stores one row per late charge header and is the target of the lock, update, and delete operations.
  • AR_INTEREST_LINES — Read by GET_HEADER_AMOUNT to sum the interest charged per header. Each line represents an individual late charge calculated against a specific transaction.
  • AR_INTEREST_BATCHES — Referenced through the header's batch identifier; the batch groups related headers created by a single late charge run.

Usage Notes

The package is normally invoked indirectly. The Oracle Receivables "Late Charges" setup and run forms, together with the Late Charges concurrent program, call these procedures to maintain header records. Custom extensions that manipulate late charge headers should invoke the package's procedures rather than issuing direct DML against AR_INTEREST_HEADERS, so that locking, validation, and status semantics remain intact. Because the metadata records only one dependent package, its call surface is relatively narrow. Callers must supply a valid interest header identifier and, for locking and updating, the accompanying batch, customer, and site context. All operations are subject to the standard AR concurrent request locking model, and locking should always precede updates or deletes.