Search Results test_insert_inv_ps
Overview
ARP_MAINTAIN_PS2 is an internal Oracle Receivables maintenance package owned by the APPS schema and classified under ETRM as an "OTHER" API. Its documented role is to maintain payment schedule (PS) and adjustment records generated in the context of the AutoInvoice and receivables transaction processing flow. In Oracle EBS 12.1.1 and 12.2.2, ARP_MAINTAIN_PS2 functions as the sibling companion to ARP_MAINTAIN_PS, providing the private implementation routines used to insert payment schedules, child adjustments, and credit memo related schedules for invoices, debit memos, credit memos, and adjustments after they have been created or reversed.
The package header carries the source control identifier $Header: ARTEMP2S.pls 120.4.12010000.1 2008/07/24 16:56:22 appldev ship $, confirming that the object has been shipped since the 12.0/12.1 code line and remains present, unchanged in form, in the 12.2.2 release. The name suffix "PS2" distinguishes it from the primary payment schedule package and identifies it as a secondary, transactional maintenance component that supports the correction and regeneration of schedule lines when transactions are adjusted, reversed, or created through the AutoInvoice interface.
Key Procedures and Functions
The documented package exposes eighteen procedures, largely organized into three groups:
- INSERT_INV_PS_PRIVATE — Private routine that inserts payment schedule records for an invoice, receiving system information, profile information, the customer transaction identifier, and the identifier of a reversed cash receipt.
- INSERT_CM_PS_PRIVATE — Inserts the payment schedule rows associated with a credit memo transaction, accepting system information, profile information, and the customer transaction identifier.
- INSERT_CHILD_ADJ_PRIVATE — Two overloaded forms that create child adjustment records for a transaction. One overload accepts only the transaction identifier plus optional adjustment and GL dates; the second additionally accepts system and profile information.
- INSERT_CM_CHILD_ADJ_PRIVATE — Creates child adjustment rows for a credit memo, using system information, profile information, and the transaction identifier.
- TEST_BUILD_IPS_SQL, TEST_BUILD_IRA_SQL, TEST_BUILD_UPS_SQL, TEST_BUILD_IAD_SQL — Diagnostic procedures that construct and validate the dynamic SQL used for inserting into the payment schedules, receivable applications, and adjustments tables. These routines build SQL text through DBMS_SQL rather than executing DML directly.
- TEST_INSERT_INV_PS, TEST_AI_INSERT_INV_PS, TEST_INSERT_CM_PS, TEST_AI_INSERT_CM_PS — Test harness procedures used to invoke the private insert routines, including variant entry points that accept a request identifier and a select SQL statement for AutoInvoice-oriented testing.
- TEST_INSERT_CHILD_ADJ, TEST_AI_INSERT_CHILD_ADJ, TEST_INSERT_CM_CHILD_ADJ, TEST_AI_INSERT_CM_CHILD_ADJ — The corresponding test routines for the child adjustment paths, mirroring the invoice and credit memo test entry points for both standalone and AutoInvoice (AI) execution modes.
- INIT — Initialization procedure used to prepare the package state or cursor identifiers prior to invocation.
Consistent with the ETRM metadata, no parameter signatures beyond those visible in the source excerpt are asserted here. The package preserves eleven package-level cursor or bind handles (the ips_*, ira_*, ups_*, and iad_* integers) that correspond to the four principal insert targets: invoice payment schedules, receivable applications, payment schedule updates, and adjustments.
Tables Accessed
The package reads and writes through APPS synonyms on the core Receivables tables. Payment schedule maintenance touches AR_PAYMENT_SCHEDULES and AR_PAYMENT_SCHEDULES_S, which store installment and due-date information for each transaction. Adjustment maintenance touches AR_ADJUSTMENTS, AR_ADJUSTMENTS_ALL, and AR_ADJUSTMENTS_S, which hold both the base adjustment records and their multi-organization and incremental views. Application logic references AR_RECEIVABLE_APPLICATIONS and AR_RECEIVABLE_APPLICATIONS_S for cash application and reversal linkage.
Contextual and validation data are retrieved from RA_CUSTOMER_TRX (header transactions), RA_CUST_TRX_TYPES and RA_CUST_TRX_TYPES_ALL (transaction type rules), RA_TERMS (payment terms used to compute schedule due dates), and AR_SYSTEM_PARAMETERS (system-level configuration). The DUAL pseudo-table is used for single-row selection, DBMS_SQL is used for dynamic SQL construction in the TEST_BUILD routines, and PLITBLM is referenced for PL/SQL table management. Because all access is mediated by APPS synonyms, the package operates entirely in the Oracle Receivables application schema and honors standard MOAC and Multi-Org security where applicable.
Usage Notes
ARP_MAINTAIN_PS2 is an internal implementation package and is not documented as a public API. The private procedures are invoked by its two dependent packages, which ETRM records as the only referenced-by callers. In practice these callers are Receivables transaction processing components that need to rebuild or correct payment schedules following invoice creation, credit memo creation, adjustment application, or cash receipt reversal.
The TEST_% procedures are not intended for production use. They exist to exercise the dynamic SQL builders and insert routines, and the AutoInvoice-oriented variants accept a request identifier and select statement so the insert logic can be validated against a concurrent request context. Direct invocation from custom code is strongly discouraged; customizations should use supported Receivables public APIs such as AR_RECEIVABLE_APPLICATIONS_API or the AutoInvoice interface tables. The relevant resident-technical note for 12.1.1 and 12.2.2 is that the package is a stable shipped object; its version stamp remains unchanged across both releases, and its dependencies are confined to standard APPS synonyms and the DBMS_SQL built-in.