Search Results get_acct_end_date
Overview
AR_UNACCOUNTED_TRX_SWEEP is an Oracle Receivables PL/SQL package that supports the Unaccounted Transactions Sweep process. Its purpose is to populate the Receivables period-close exception table (AR_PERIOD_CLOSE_EXCPS_GT) with rows representing receivable activity that has not yet been accounted, so that this activity can be reported, reviewed, and swept forward into a subsequent accounting period during period close. The package is owned by APPS and is declared AUTHID CURRENT_USER, meaning its SQL executes with the privileges of the invoking user rather than as definer-rights code.
The package organizes its work around a set of source-type constants: UNACCT_TRX (unaccounted transactions), UNACCT_RCT (unaccounted receipts), UNACCT_ADJ (unaccounted adjustments), UNACCT_BR (unaccounted balances/receivables-related items), and OTHER_EXCEPTIONS. The AR application identifier is fixed as 222, and global variables track the ledger, operating unit, period name and dates, sweep target period, reporting level, and reporting entity. Cash-basis ledgers are recognized through the cash basis flag sourced from the ledger definition, and a fetch limit of 1000 rows is applied per the standard performance guideline. The package is designed to operate at either ledger or entity reporting levels, controlled by reporting-level and reporting-entity globals.
Key Procedures and Functions
- PROCESS_PERIOD — The primary driver routine. It performs the sweep processing for the period in scope, using the period name, sweep-to-period, ledger, and reporting context established in the package globals, and writes qualifying unaccounted activity into the Receivables period-close exceptions table.
- BEFORE_REPORT_ARTRXSWP — A pre-report hook associated with the ARTRXSWP (Unaccounted Transactions Sweep) report. It prepares the session for report execution, resolving ledger, period, and reporting context before the report queries its data.
- GET_ACCT_START_DATE — Returns the accounting start date applicable to the period being swept, derived from period status information.
- GET_ACCT_END_DATE — Returns the accounting end date applicable to the period being swept, complementing the start date to bound the accounting window.
- GET_LEDGER_NAME — Returns the ledger name for the ledger identifier in context, used for reporting attribution.
The package exposes no documented function that returns a value to a calling application; it is a procedural utility package for the sweep process.
Tables Accessed
- AR_SYSTEM_PARAMETERS_ALL / AR_SYSTEM_PARAMETERS — Supplies ledger and operating unit context used to initialize the package globals.
- GL_PERIODS / GL_PERIOD_STATUSES — Provide period names, start and end dates, and period status used by PROCESS_PERIOD, GET_ACCT_START_DATE, and GET_ACCT_END_DATE.
- AR_ADJUSTMENTS_ALL, AR_CASH_RECEIPTS_ALL, AR_CASH_RECEIPT_HISTORY_ALL, AR_DISTRIBUTIONS_ALL, AR_MISC_CASH_DISTRIBUTIONS_ALL, AR_PAYMENT_SCHEDULES_ALL, AR_RECEIVABLE_APPLICATIONS_ALL, AR_TRANSACTION_HISTORY_ALL — The Receivables transaction, receipt, adjustment, distribution, and application tables that are inspected to identify activity lacking accounting entries.
- AR_PERIOD_CLOSE_EXCPS_GT — The period-close exceptions global temporary table that receives the sweep output.
- FND_NEW_MESSAGES — Used for the orphan message text global, supporting message lookup during processing.
- FND_CONCURRENT_PROGRAMS — Referenced in the concurrent program context, typically to resolve program and reporting metadata.
Usage Notes
The package is invoked in the context of the Receivables period-close process, most commonly through the Unaccounted Transactions Sweep concurrent program and its associated ARTRXSWP report. The BEFORE_REPORT_ARTRXSWP hook is called automatically before the report runs, and PROCESS_PERIOD performs the population of exceptions. Because no other packages are documented as referencing AR_UNACCOUNTED_TRX_SWEEP, custom code should call it directly only when reusing its sweep logic, passing the period, ledger, and reporting parameters required by the public globals. In 12.1.1 and 12.2.2, note that this is a period-close diagnostic and forwarding utility rather than a posting engine; it identifies unaccounted activity and places it into a temporary exceptions structure for review, and it does not itself create accounting entries.