Search Results ap_purge_pkg
Overview
APPS.AP_PURGE_PKG is the core PL/SQL engine behind the Payables purge and archive process in Oracle E-Business Suite 12.1.1 and 12.2.2. The package coordinates the multi-phase removal of historical invoice, payment, and accounting data from the active Payables tables, moving them to the corresponding archived history tables so that transactional volumes remain manageable without permanently losing audit information. Declared with AUTHID CURRENT_USER and owned by APPS, the package executes with the privileges of the calling invoker, relying on APPS synonyms for all data access. Its responsibilities span status tracking, concurrency protection, data seeding, summary record creation, user confirmation, deletion, abort handling, and final purge of accounting and Payables records. The header reference (appurges.pls 120.0.12020000.2) confirms this is a production-shipped Oracle module, not a customization.
Key Procedures and Functions
- SET_PURGE_STATUS — Records or updates the status of a purge run, allowing the process to track progress through its lifecycle.
- CHECK_NO_PURGE_IN_PROCESS — Validates that no conflicting purge is already executing, preventing concurrent runs from corrupting shared data.
- SEED_PURGE_TABLES — Populates the interim purge tables with candidate rows based on category, purge name, activity date, organization, and the various status filters (PA, Purchasing, Payables, Assets, CHV, EDI, MRP).
- CREATE_SUMMARY_RECORDS — Generates summary records for a purge run, using a range size to batch the workload.
- CONFIRM_SEEDED_DATA — Confirms the seeded data set against the same category, date, organization, and status criteria before deletion proceeds.
- DELETE_SEEDED_DATA — Performs the physical removal of the confirmed rows, honoring range size and selected status filters.
- ABORT_PURGE — Reverses an in-progress purge, restoring the original status when the run is interrupted or fails.
- PURGE_ACCTG_AND_AP_TABLE — Executes the final purge of accounting entries and Payables base tables once the earlier phases complete.
Every function accepts a P_Debug_Switch parameter, enabling verbose diagnostic output during execution — the term the user searched for. The calling sequence parameter similarly supports traceability.
Tables Accessed
The package reads and writes the principal Payables transactional tables, including AP_INVOICES and AP_INVOICES_ALL, AP_CHECKS and AP_CHECKS_ALL, AP_BATCHES and AP_BATCHES_ALL, AP_HOLDS, AP_ENCUMBRANCE_LINES, and AP_DOC_SEQUENCE_AUDIT. Historical counterparts — AP_HISTORY_INVOICES, AP_HISTORY_CHECKS, and AP_HISTORY_INVOICE_PAYMENTS (with their _ALL variants) — receive the archived rows. Access is achieved through public APPS synonyms, consistent with the package's invoker-rights design.
Usage Notes
AP_PURGE_PKG is normally invoked indirectly through the Payables Purge/Archive concurrent programs and related Oracle Forms (notably the Purge, Archive, and Audit screens), rather than being called directly by end users. Because it is not referenced by any other documented package in the ETRM metadata, custom code calling these functions must respect the seed-confirm-delete-abort sequencing. The P_Debug_Switch flag should be enabled only during controlled troubleshooting, since debug output can be voluminous in production volumes.
-
PACKAGE: APPS.AP_PURGE_PKG
12.1.1
owner:APPS, object_type:PACKAGE, object_name:AP_PURGE_PKG, status:VALID,
-
PACKAGE: APPS.AP_PURGE_PKG
12.2.2
owner:APPS, object_type:PACKAGE, object_name:AP_PURGE_PKG, status:VALID,
-
PACKAGE BODY: APPS.AP_PURGE_PKG
12.1.1
owner:APPS, object_type:PACKAGE BODY, object_name:AP_PURGE_PKG, status:VALID,
-
PACKAGE BODY: APPS.AP_PURGE_PKG
12.2.2
owner:APPS, object_type:PACKAGE BODY, object_name:AP_PURGE_PKG, status:VALID,
-
SYNONYM: APPS.CHV_HISTORY_SCHEDULES
12.2.2
owner:APPS, object_type:SYNONYM, object_name:CHV_HISTORY_SCHEDULES, status:VALID,
-
SYNONYM: APPS.AP_TRIAL_BALANCE
12.1.1
owner:APPS, object_type:SYNONYM, object_name:AP_TRIAL_BALANCE, status:VALID,
-
SYNONYM: APPS.PO_PURGE_VENDOR_LIST
12.1.1
owner:APPS, object_type:SYNONYM, object_name:PO_PURGE_VENDOR_LIST, status:VALID,
-
SYNONYM: APPS.AP_DOC_SEQUENCE_AUDIT
12.1.1
owner:APPS, object_type:SYNONYM, object_name:AP_DOC_SEQUENCE_AUDIT, status:VALID,
-
SYNONYM: APPS.AP_HISTORY_CHECKS
12.2.2
owner:APPS, object_type:SYNONYM, object_name:AP_HISTORY_CHECKS, status:VALID,
-
SYNONYM: APPS.CHV_HISTORY_CUM_PERIODS
12.2.2
owner:APPS, object_type:SYNONYM, object_name:CHV_HISTORY_CUM_PERIODS, status:VALID,
-
SYNONYM: APPS.RCV_SUB_LEDGER_DETAILS
12.2.2
owner:APPS, object_type:SYNONYM, object_name:RCV_SUB_LEDGER_DETAILS, status:VALID,
-
SYNONYM: APPS.AP_HISTORY_INVOICE_PAYMENTS
12.1.1
owner:APPS, object_type:SYNONYM, object_name:AP_HISTORY_INVOICE_PAYMENTS, status:VALID,
-
SYNONYM: APPS.CHV_PURGE_SCHEDULE_LIST
12.1.1
owner:APPS, object_type:SYNONYM, object_name:CHV_PURGE_SCHEDULE_LIST, status:VALID,
-
SYNONYM: APPS.CHV_HISTORY_SCHEDULES
12.1.1
owner:APPS, object_type:SYNONYM, object_name:CHV_HISTORY_SCHEDULES, status:VALID,
-
SYNONYM: APPS.RCV_SUB_LEDGER_DETAILS
12.1.1
owner:APPS, object_type:SYNONYM, object_name:RCV_SUB_LEDGER_DETAILS, status:VALID,
-
SYNONYM: APPS.PO_PURGE_VENDOR_LIST
12.2.2
owner:APPS, object_type:SYNONYM, object_name:PO_PURGE_VENDOR_LIST, status:VALID,
-
SYNONYM: APPS.MRP_ITEM_SOURCING
12.2.2
owner:APPS, object_type:SYNONYM, object_name:MRP_ITEM_SOURCING, status:VALID,
-
SYNONYM: APPS.AP_INVOICE_PREPAYS
12.2.2
owner:APPS, object_type:SYNONYM, object_name:AP_INVOICE_PREPAYS, status:VALID,
-
SYNONYM: APPS.AP_INVOICE_PREPAYS
12.1.1
owner:APPS, object_type:SYNONYM, object_name:AP_INVOICE_PREPAYS, status:VALID,
-
SYNONYM: APPS.ECE_SPSO_ITEMS
12.1.1
owner:APPS, object_type:SYNONYM, object_name:ECE_SPSO_ITEMS, status:VALID,
-
SYNONYM: APPS.AP_HISTORY_INVOICES
12.2.2
owner:APPS, object_type:SYNONYM, object_name:AP_HISTORY_INVOICES, status:VALID,
-
SYNONYM: APPS.AP_HISTORY_INV_PAYMENTS_ALL
12.1.1
owner:APPS, object_type:SYNONYM, object_name:AP_HISTORY_INV_PAYMENTS_ALL, status:VALID,
-
SYNONYM: APPS.AP_TRIAL_BALANCE
12.2.2
owner:APPS, object_type:SYNONYM, object_name:AP_TRIAL_BALANCE, status:VALID,
-
SYNONYM: APPS.AP_HISTORY_INVOICE_PAYMENTS
12.2.2
owner:APPS, object_type:SYNONYM, object_name:AP_HISTORY_INVOICE_PAYMENTS, status:VALID,
-
SYNONYM: APPS.CHV_PURGE_CUM_LIST
12.2.2
owner:APPS, object_type:SYNONYM, object_name:CHV_PURGE_CUM_LIST, status:VALID,
-
SYNONYM: APPS.PO_HISTORY_VENDORS
12.2.2
owner:APPS, object_type:SYNONYM, object_name:PO_HISTORY_VENDORS, status:VALID,
-
SYNONYM: APPS.FINANCIALS_PURGES
12.1.1
owner:APPS, object_type:SYNONYM, object_name:FINANCIALS_PURGES, status:VALID,
-
SYNONYM: APPS.AP_HISTORY_CHECKS
12.1.1
owner:APPS, object_type:SYNONYM, object_name:AP_HISTORY_CHECKS, status:VALID,
-
SYNONYM: APPS.CHV_HISTORY_CUM_PERIODS
12.1.1
owner:APPS, object_type:SYNONYM, object_name:CHV_HISTORY_CUM_PERIODS, status:VALID,
-
SYNONYM: APPS.AP_HISTORY_CHECKS_ALL
12.2.2
owner:APPS, object_type:SYNONYM, object_name:AP_HISTORY_CHECKS_ALL, status:VALID,
-
SYNONYM: APPS.CHV_PURGE_SCHEDULE_LIST
12.2.2
owner:APPS, object_type:SYNONYM, object_name:CHV_PURGE_SCHEDULE_LIST, status:VALID,
-
SYNONYM: APPS.AP_DOC_SEQUENCE_AUDIT
12.2.2
owner:APPS, object_type:SYNONYM, object_name:AP_DOC_SEQUENCE_AUDIT, status:VALID,
-
SYNONYM: APPS.AP_HISTORY_INVOICES
12.1.1
owner:APPS, object_type:SYNONYM, object_name:AP_HISTORY_INVOICES, status:VALID,
-
SYNONYM: APPS.ECE_SPSO_ITEMS
12.2.2
owner:APPS, object_type:SYNONYM, object_name:ECE_SPSO_ITEMS, status:VALID,
-
SYNONYM: APPS.CHV_PURGE_CUM_LIST
12.1.1
owner:APPS, object_type:SYNONYM, object_name:CHV_PURGE_CUM_LIST, status:VALID,
-
SYNONYM: APPS.AP_HISTORY_INV_PAYMENTS_ALL
12.2.2
owner:APPS, object_type:SYNONYM, object_name:AP_HISTORY_INV_PAYMENTS_ALL, status:VALID,
-
SYNONYM: APPS.AP_HISTORY_CHECKS_ALL
12.1.1
owner:APPS, object_type:SYNONYM, object_name:AP_HISTORY_CHECKS_ALL, status:VALID,
-
SYNONYM: APPS.MRP_ITEM_SOURCING
12.1.1
owner:APPS, object_type:SYNONYM, object_name:MRP_ITEM_SOURCING, status:VALID,
-
SYNONYM: APPS.PO_HISTORY_VENDORS
12.1.1
owner:APPS, object_type:SYNONYM, object_name:PO_HISTORY_VENDORS, status:VALID,
-
SYNONYM: APPS.AP_ENCUMBRANCE_LINES
12.1.1
owner:APPS, object_type:SYNONYM, object_name:AP_ENCUMBRANCE_LINES, status:VALID,
-
SYNONYM: APPS.PO_PURGE_REQ_LIST
12.2.2
owner:APPS, object_type:SYNONYM, object_name:PO_PURGE_REQ_LIST, status:VALID,
-
SYNONYM: APPS.AP_PURGE_INVOICE_LIST
12.1.1
owner:APPS, object_type:SYNONYM, object_name:AP_PURGE_INVOICE_LIST, status:VALID,
-
SYNONYM: APPS.AP_PURGE_INVOICE_LIST
12.2.2
owner:APPS, object_type:SYNONYM, object_name:AP_PURGE_INVOICE_LIST, status:VALID,
-
SYNONYM: APPS.PO_PURGE_PO_LIST
12.2.2
owner:APPS, object_type:SYNONYM, object_name:PO_PURGE_PO_LIST, status:VALID,
-
SYNONYM: APPS.AP_RECURRING_PAYMENTS_ALL
12.1.1
owner:APPS, object_type:SYNONYM, object_name:AP_RECURRING_PAYMENTS_ALL, status:VALID,
-
SYNONYM: APPS.AP_HISTORY_INVOICES_ALL
12.2.2
owner:APPS, object_type:SYNONYM, object_name:AP_HISTORY_INVOICES_ALL, status:VALID,
-
PACKAGE: APPS.AP_PURGE_PKG
12.1.1
-
SYNONYM: APPS.PO_PURGE_REQ_LIST
12.1.1
owner:APPS, object_type:SYNONYM, object_name:PO_PURGE_REQ_LIST, status:VALID,
-
SYNONYM: APPS.PO_VENDOR_LIST_HEADERS
12.1.1
owner:APPS, object_type:SYNONYM, object_name:PO_VENDOR_LIST_HEADERS, status:VALID,
-
SYNONYM: APPS.FINANCIALS_PURGES
12.2.2
owner:APPS, object_type:SYNONYM, object_name:FINANCIALS_PURGES, status:VALID,