Search Results ar_rate_adjustments_s




Overview

The APPS.ARP_RATE_ADJUSTMENTS_PKG package body encapsulates the core insert logic for the AR_RATE_ADJUSTMENTS table, which stores exchange rate adjustment records generated during revaluation of foreign‑currency receipts in Oracle Receivables. When a receipt is revalued to reflect a new exchange rate between the original transaction date and a subsequent date, the resulting gain or loss must be persisted so that it can be reported and posted to the General Ledger. The package provides the single, controlled insertion point for these adjustment rows, shielding callers from having to populate the primary key and the standard EBS WHO columns themselves. It belongs to the OTHER API classification, meaning it is an internal, non‑public package intended for use by other Oracle Receivables programs rather than by customers directly.

The package header identifies the file as ARRIRADB.pls, with the last shipped revision dated 2004 — a stable, long‑lived module carried forward unchanged into Release 12.1.1 and 12.2.2.

Key Procedures and Functions

  • INSERT_P — The only documented procedure in the package. It accepts a record modelled on the AR_RATE_ADJUSTMENTS row type plus an OUT NOCOPY parameter that returns the newly generated RATE_ADJUSTMENT_ID. Its responsibilities are to obtain the next sequence value from AR_RATE_ADJUSTMENTS_S, populate every column of the adjustment row (cash receipt reference, gain/loss amount, GL date, new and old exchange dates, rates and rate types, posting control, created‑from indicator, descriptive flexfield attributes 1–15, request/program audit columns, WHO audit columns and ORG_ID), and perform the physical INSERT. The procedure is wrapped in a debug trace controlled by the AFLOG_ENABLED profile option (PG_DEBUG), emitting messages through ARP_STANDARD.DEBUG when logging is enabled.

Tables Accessed

  • AR_RATE_ADJUSTMENTS — the primary target of the insert; holds one row per revaluation gain/loss adjustment.
  • AR_RATE_ADJUSTMENTS_S — the sequence supplying the surrogate primary key RATE_ADJUSTMENT_ID.
  • DUAL — used purely to select the sequence NEXTVAL before the insert.
  • AR_SYSTEM_PARAMETERS — referenced by the package per the ETRM metadata, typically to resolve operating unit and revaluation‑related setup defaults.

Usage Notes

ARP_RATE_ADJUSTMENTS_PKG is not a user‑facing API and does not appear on any standard Receivables form. It is invoked internally by the revaluation and automatic rate‑adjustment processes — most notably the concurrent programs that recompute foreign‑currency receipt balances and create gain/loss entries. The ETRM metadata records that the package is referenced by two other packages, confirming its role as a shared low‑level insert utility rather than a top‑of‑stack routine.

For Release 12.1.1 and 12.2.2, its behaviour is identical; the ORG_ID column is populated by the calling program to support multi‑org security. Because the procedure only exposes a single insert operation, it offers no update or delete capability, and it does not validate rates or dates itself — those controls reside in the calling revaluation logic. Custom code should not call INSERT_P directly, since bypassing the owning revaluation program would produce orphaned adjustments with no corresponding posting control. Any diagnostic tracing requires the AFLOG_ENABLED profile to be set; otherwise the debug calls are no‑ops.