Search Results val_gl_periods_for_rules




Overview

ARP_DATES is a PL/SQL package in the Oracle E-Business Suite Receivables (AR) module, owned by the APPS schema and declared with AUTHID CURRENT_USER. It encapsulates the date-derivation logic that determines General Ledger (GL) accounting dates and transaction dates for AutoAccounting rule-based revenue and receivables distributions. The package resolves how a transaction's GL date and transaction date should be calculated from the accounting rules assigned to transaction lines, the rule duration, and the rule start date, and it validates whether those derived dates fall within a valid, open GL period.

In Oracle EBS 12.1.1 and 12.2.2, ARP_DATES is a supporting utility rather than a user-facing API. It is invoked during transaction entry, transaction import, and the Receivables AutoInvoice process, ensuring that accounting distributions generated from rules are stamped with dates that comply with the accounting calendar and set of books configuration. Its presence in the ETRM documentation with an "OTHER" classification confirms it is an internal helper package, referenced by two other packages, rather than a published open interface.

Key Procedures and Functions

  • VAL_GL_PERIODS_FOR_RULES — Validates that the GL period implied by an accounting rule is valid for the specified set of books. It accepts a request identifier, the accounting rule identifier, the accounting rule duration, the rule start date, and the set of books identifier. This procedure is used to confirm that rule-driven distributions will land in a legitimate accounting period before the transaction is processed, protecting against date errors during rule-based date derivation.
  • DERIVE_GL_TRX_DATES_FROM_RULES — Derives the GL date and transaction date for a customer transaction from its assigned accounting rules. The procedure takes the customer transaction identifier along with the GL date and transaction date as IN OUT NOCOPY parameters, allowing it to return computed values in place. It also carries an IN OUT NOCOPY recalculation-tax flag, plus optional parameters describing the transaction creation source and whether the GL date was defaulted. This procedure is the object the user searched for and is the core routine that maps rule start dates and durations onto valid GL dates.

Tables Accessed

The package reads and writes against core Receivables and GL tables through APPS synonyms:

  • RA_CUSTOMER_TRX — the transaction header (transaction date and request context).
  • RA_CUSTOMER_TRX_LINES — line-level accounting rule duration and rule start date, which drive date derivation.
  • RA_CUST_TRX_LINE_GL_DIST — the distribution records whose GL dates are set or validated.
  • RA_RULES and RA_RULE_SCHEDULES — the accounting rule definitions and schedule templates used to compute periods.
  • AR_SYSTEM_PARAMETERS — system-level defaults that influence date derivation behavior.
  • GL_PERIODS and GL_PERIOD_TYPES — the accounting calendar used to confirm valid, open periods.
  • AR_TRX_HEADER_GT — a global temporary table supplying creation-source and defaulted-GL-date metadata for the derivation call.
  • DBMS_SQL — used dynamically for the package's internal date or period queries.

Usage Notes

ARP_DATES is not called directly by end users. It is typically invoked by Receivables forms such as the Transactions workbench and by the AutoInvoice concurrent program, as well as by the two dependent packages identified in the metadata. The P_created_from parameter, added to handle invoice API calls, and the defaulted GL date flag indicate that the package distinguishes between interactive entry and programmatic import when deciding whether to override or preserve existing dates. Because the GL date and transaction date parameters are declared IN OUT NOCOPY, custom code invoking this package must pass host variables capable of being updated in place. Oracle recommends calling the supported transaction APIs rather than ARP_DATES directly, since the package is internal and its signature may change between patch levels.