Search Results credit_process_flag




Overview

PA_DRAFT_INV_ITEMS_AR is an Oracle Projects (PA) archive table that stores historical copies of rows from the PA_DRAFT_INV_ITEMS transactional table. Its documented purpose is explicit: it exists for Archive/Purge operations, and the columns mirror the structure of the main draft invoice items table so that purged or archived billing lines can be removed from the live table while remaining available for audit, retention, or reporting. The table is owned by the PA schema and is valid in both Oracle EBS 12.1.1 and 12.2.2. In the documented 12.2.2 schema the table carries 65 columns, preserving the full drafting context of each invoice line together with the purge metadata used to tie rows back to a specific archival run.

The ETRM metadata classifies this object, by heuristic Data Vault analysis of its foreign key structure, as standalone. In modeling terms, this suggests the table does not behave as a classic hub or link with a hard network of enforced parent references; it is a copy-and-retain store keyed primarily by purge context. The only documented foreign key is PURGE_BATCH_ID referencing PA_PURGE_BATCHES_ALL. Because the archive copy preserves the same business identities as the source table (project, draft invoice number, line number) but intentionally relaxes the live transactional relationships, it is best treated as a persistence/retention construct rather than a normalized dimension in a reporting star schema.

Key Information Stored

The table preserves both the drafted billing content and the purge bookkeeping. The most significant columns are:

No surrogate primary key column is documented separately; the table is keyed by purge batch plus the inherited invoice line identity.

Common Use Cases and Queries

The principal use case is retention reporting: after a purge run removes draft invoice detail from the live table, historical reporting must still reconcile previously drafted or credited lines. A typical query joins the archive to the purge batch to isolate one run:

  • SELECT i.draft_invoice_num, i.line_num, i.amount, i.invoice_line_type FROM pa.pa_draft_inv_items_ar i WHERE i.purge_batch_id = :batch_id ORDER BY i.draft_invoice_num, i.line_num;
  • Project-level history: SELECT project_id, SUM(amount) FROM pa.pa_draft_inv_items_ar WHERE purge_project_id = :project_id GROUP BY project_id;
  • Retention exposure: SELECT draft_invoice_num, line_num, retn_billing_method, retn_total_retention, retained_amount FROM pa.pa_draft_inv_items_ar WHERE retention_rule_id IS NOT NULL;
  • Tax reconciliation: SELECT output_vat_tax_id, output_tax_classification_code, SUM(acct_amount) FROM pa.pa_draft_inv_items_ar GROUP BY output_vat_tax_id, output_tax_classification_code;

Because the table holds archive copies, queries should always filter by PURGE_BATCH_ID or PURGE_PROJECT_ID to avoid scanning unrelated purge history.

Related Objects

The documented relationship data is deliberately thin, so the most significant dependencies are the source and purge-control objects:

  • PA_PURGE_BATCHES_ALL — the only documented foreign key target; join on PA_DRAFT_INV_ITEMS_AR.PURGE_BATCH_ID = PA_PURGE_BATCHES_ALL.PURGE_BATCH_ID to obtain batch status, dates, and run attributes.
  • PA_DRAFT_INV_ITEMS — the live source table from which archived rows are copied; column comments are inherited per the documented description.
  • PA_DRAFT_INVOICES_ALL / PA_DRAFT_INVOICES — draft invoice headers associated through DRAFT_INVOICE_NUM for header-level reconciliation.
  • PA_PROJECTS_ALL — PROJECT_ID and PURGE_PROJECT_ID resolve to project definitions.
  • PA_TASKS — TASK_ID and EVENT_TASK_ID resolve to project task structure.
  • PA_PROJECT_EVENTS — EVENT_NUM and EVENT_TASK_ID tie archived billing lines to the originating events.
  • GL_CODE_COMBINATIONS — CC_REV_CODE_COMBINATION_ID resolves credit revenue accounts.

These joins allow the archive table to be used for historical project billing reconciliation without querying the live transactional table.