Search Results init_context_rec




Overview

AR_ADJVALIDATE_PVT is a private (PVT-classified) PL/SQL package in the Oracle Receivables (AR) module of Oracle E-Business Suite. It centralizes the server-side validation logic applied to receivables adjustments — the transactions recorded against an invoice, debit memo, chargeback, or receipt that reduce or otherwise alter the open balance. Adjustments are stored in AR_ADJUSTMENTS and can represent write-offs, credit memos applied as adjustments, receivable activity adjustments, and similar events. Because an adjustment affects customer balances, accounting distributions, approval hierarchies, and General Ledger posting, Oracle EBS performs an extensive set of checks before an adjustment is accepted.

The package is not a public API. It is an internal validation engine invoked by the internal adjustment API (AR_ADJUSTMENT_API) and by its LLCA (Latin Ledger/globalization or localization-related) related callers, which in turn are called from the Receivables adjustments form, from the AutoAdjustment-style processing, and from other Receivables programs. The "PVT" suffix indicates that customers and partners should not call these procedures directly; the supported entry point for programmatic adjustment creation remains the public adjustment API, which delegates validation to this package.

Key Procedures and Functions

The documented procedures cover the full validation surface of an adjustment record:

  • INIT_CONTEXT_REC — Initializes the package-level context record. It accepts a validation level defaulting to FND_API.G_VALID_LEVEL_FULL and returns a standard return status, establishing how thoroughly subsequent validations run.
  • CACHE_DETAILS — Preloads reference data (such as system parameters and approval limits) into package memory to avoid repeated queries during validation.
  • WITHIN_APPROVAL_LIMITS — Determines whether the adjustment amount, expressed in the invoice currency, falls within the approving user's authorization; it returns an approval flag and return status.
  • VALIDATE_TYPE — Confirms that the adjustment type is valid for the adjustment record.
  • VALIDATE_PAYSCHD — Validates the adjustment against its corresponding AR_PAYMENT_SCHEDULES row, and accepts a flag indicating whether the call originates from LLCA processing.
  • VALIDATE_AMOUNT — Checks the adjustment amount, optionally enforcing approval limits and amount tolerance through the check-approval-limits and check-amount flags.
  • VALIDATE_RCVTRXCCID — Validates the receivables transaction code (AR_RECEIVABLES_TRX) code combination identifier, with an LLCA-call indicator.
  • VALIDATE_DATES — Validates the apply date and GL date against the payment schedule and open accounting periods.
  • VALIDATE_REASON_CODE — Ensures a valid adjustment reason code is supplied.
  • VALIDATE_DOC_SEQ — Validates document sequence assignment for the adjustment.
  • VALIDATE_ASSOCIATED_RECEIPT — Checks the receipt associated with the adjustment.
  • VALIDATE_USSGL_CODE — Validates the USSGL transaction code, supporting federal/transaction-code requirements.
  • VALIDATE_DESC_FLEXFIELD — Validates the descriptive flexfield segments on the adjustment.
  • VALIDATE_CREATED_FROM — Validates the origin (created-from) value of the adjustment.
  • VALIDATE_OVER_APPLICATION and VALIDATE_OVER_APPLICATION_LLCA — Detect over-application conditions, with a variant for LLCA flows.

Tables Accessed

The package reads and, in limited cases, writes through APPS synonyms. AR_ADJUSTMENTS and AR_PAYMENT_SCHEDULES are the primary records validated. AR_APPROVAL_USER_LIMITS and AR_SYSTEM_PARAMETERS supply approval and system-level controls. AR_RECEIVABLES_TRX and AR_CASH_RECEIPTS resolve transaction codes and associated receipts, while AR_DISTRIBUTIONS and GL_CODE_COMBINATIONS support accounting validation. AR_LLCA_ADJ_TRX_ERRORS_GT is the globalization error interface table. GL_PERIOD_STATUSES verifies period open status, GL_USSGL_TRANSACTION_CODES validates USSGL codes, and FND_DESCRIPTIVE_FLEXS validates flexfield definitions. FND_DOCUMENT_SEQUENCES and FND_DOC_SEQUENCE_ASSIGNMENTS validate document sequencing, and FND_PROFILE_OPTION_VALUES supplies profile option settings.

Usage Notes

Because AR_ADJVALIDATE_PVT is classified PVT and referenced by one other package, it is invoked indirectly. In Oracle EBS 12.1.1 and 12.2.2, the Receivables Adjustments form and concurrent/adjustment-creation programs call the public adjustment API (AR_ADJUSTMENT_API), which calls this package for validation before inserting or updating AR_ADJUSTMENTS. Custom code should likewise use the public API rather than calling these procedures directly, since the internal signatures and validation ordering may change between releases. The procedures are designed to be called in sequence within a single API flow, each returning a standard FND_API return status that the caller inspects to decide whether to continue or raise an error. The CHK_APPROVAL_LIMITS and CHK_AMOUNT flags on VALIDATE_AMOUNT allow the caller to suppress duplicate checks when approval limits or amount tolerance have already been verified. The FROM_LLCA_CALL parameter, present on VALIDATE_PAYSCHD and VALIDATE_RCVTRXCCID with a default of 'N', lets the LLCA processing path reuse the same validation logic while adjusting behavior for globalization-specific error handling via AR_LLCA_ADJ_TRX_ERRORS_GT.