Search Results ar_cm_val_pvt




Overview

AR_CM_VAL_PVT is a private (PVT) PL/SQL package in the Oracle Receivables module of Oracle E-Business Suite, owned by the APPS schema. Its name reflects its role in the Credit Memo (CM) validation process, where "AR" denotes Receivables, "CM" denotes credit memo, and "VAL" denotes validation. The package is declared with AUTHID CURRENT_USER, meaning its procedures execute with the privileges of the calling user rather than the definer, which is consistent with its classification as a private helper package rather than a public API.

The package provides the underlying logic for defaulting and validating application information between credit memos and invoices (or other transactions). In Oracle Receivables, applying a credit memo to an invoice, or applying an on-account credit against a transaction, requires the system to default values such as apply date, GL date, amount applied, payment schedules, and currency, and then validate that the resulting application conforms to Receivables rules (for example, over-application limits, natural application constraints, and creation sign). AR_CM_VAL_PVT centralizes this defaulting and validation logic so that it can be reused consistently by higher-level public APIs and by the Receivables forms.

Key Procedures and Functions

The ETRM metadata documents six procedures in this package. Each is described below by purpose only; parameter lists are not reproduced here.

  • DEFAULT_APP_IDS — Resolves and returns the identifying keys required for an application operation, such as the credit memo transaction identifier, the invoice transaction identifier, the invoice line identifier, and the payment schedule (installment) identifier. It accepts transaction numbers and line numbers as input and defaults the corresponding internal IDs for downstream use.
  • DEFAULT_APP_INFO — Populates the non-key default values for an application, including apply date, apply GL date, amount applied, applied payment schedule, credit memo GL date and transaction date, credit memo remaining amount and currency, invoice due date, invoice currency and remaining amount, invoice transaction and GL dates, and the system flags governing over-application and natural application. It also returns creation sign and line amount information used in validation.
  • VALIDATE_APP_INFO — Performs the business-rule validation of an application after defaults have been established. It evaluates the apply date, transaction dates, GL dates, amount applied, payment schedule, transaction line, line amount, creation sign, and over-application flag to determine whether the proposed application is permissible.
  • DEFAULT_UNAPP_IDS — The unapplication counterpart of DEFAULT_APP_IDS. It resolves the identifying keys needed to unapply a previously applied credit memo or receipt from a transaction.
  • DEFAULT_UNAPP_INFO — The unapplication counterpart of DEFAULT_APP_INFO. It defaults the date, amount, and schedule information required when reversing or unapplying an application.
  • VALIDATE_UNAPP_INFO — The unapplication counterpart of VALIDATE_APP_INFO. It validates the business rules governing the unapplication of a credit memo or receipt.

Together, the DEFAULT_* procedures perform data derivation and the VALIDATE_* procedures perform rule enforcement, giving the package a symmetric structure across the apply and unapply directions.

Tables Accessed

The package reads and writes the following tables through APPS synonyms:

  • AR_PAYMENT_SCHEDULES — Stores the payment schedule (installment) rows for transactions; used to resolve installments, remaining amounts, and due dates.
  • AR_RECEIVABLE_APPLICATIONS — Stores application records linking payments, credit memos, and invoices; central to both apply and unapply validation.
  • AR_SYSTEM_PARAMETERS — Supplies Receivables system options, including flags controlling over-application and natural application behavior.
  • RA_CUSTOMER_TRX — The transaction header table for invoices, credit memos, and other transactions; used to fetch transaction dates, GL dates, currencies, and amounts.
  • RA_CUSTOMER_TRX_LINES — The transaction line table; used to obtain line amounts and line identifiers.
  • RA_CUST_TRX_TYPES — Defines transaction types and their creation signs, which influence whether an application increases or decreases the balance.
  • HZ_CUST_ACCOUNTS and HZ_CUST_ACCT_RELATE — Customer account and account relationship tables, used to validate that transactions belong to related customers.
  • FND_CURRENCIES — Currency definitions, used when handling cross-currency application checks.
  • DUAL — Used for single-row computations and constant selection.

Usage Notes

As a PVT-classified package, AR_CM_VAL_PVT is not intended for direct invocation by external custom code. It is referenced by two other packages in the ETRM metadata, which are the public APIs that expose apply and unapply functionality. These callers delegate the defaulting and validation work to AR_CM_VAL_PVT, ensuring uniform enforcement of Receivables application rules.

Typical invocation paths include the Receivables application forms, such as the Applications window used to apply credit memos and receipts against invoices, and concurrent programs or public APIs that perform mass application or unapplication. Customizations should call the documented public APIs rather than this private package, because the procedure signatures are not part of Oracle's supported interface and may change between releases. The package is consistent across Oracle EBS 12.1.1 and 12.2.2, reflecting the stable design of the Receivables application engine.