Search Results po_autosource_documents_n1




Overview

PO.PO_AUTOSOURCE_DOCUMENTS_ALL is a Purchasing (PO) schema table that was historically used to store ranked document references for the Oracle Purchasing sourcing/autosource rules engine. In releases documented here (12.1.1 and 12.2.2), the ETRM metadata explicitly records that this table is no longer used. Despite its legacy status, the object remains VALID in the data dictionary and resides in the APPS_TS_ARCHIVE tablespace, indicating that Oracle retained the physical structure and any residual rows for upgrade and backward-compatibility purposes rather than dropping it.

Functionally, the table was designed to associate a given autosource rule and supplier combination with an ordered set of candidate purchasing documents (for example blanket purchase agreements or catalog quotations), where SEQUENCE_NUM established the ranking preference. Rows linked back to source documents through DOCUMENT_HEADER_ID and DOCUMENT_LINE_ID, providing the sourcing engine with the document-level detail needed to apply the rule.

From a data modeling perspective, the metadata's heuristic Data Vault classification for this object is link. This is consistent with its structure: it resolves many-to-many associations between autosource rules, suppliers, and source purchasing documents, and carries descriptive attributes that would normally be modeled as a satellite attached to that link.

Key Information Stored

The documented table contains 33 columns in the 12.2.2 physical schema. The most significant are:

The surrogate primary key is PO_AUTOSOURCE_DOCUMENTS_PK (AUTOSOURCE_RULE_ID, VENDOR_ID, SEQUENCE_NUM). The business-key candidate is the unique index PO_AUTOSOURCE_DOCUMENTS_U1 on (AUTOSOURCE_RULE_ID, VENDOR_ID, SEQUENCE_NUM, ORG_ID), which adds the operating unit to the uniqueness constraint. Two nonunique indexes support lookups: PO_AUTOSOURCE_DOCUMENTS_N1 on DOCUMENT_HEADER_ID and PO_AUTOSOURCE_DOCUMENTS_N2 on DOCUMENT_LINE_ID.

Common Use Cases and Queries

Because the table is no longer used by current application logic, practical use cases center on data archaeology, migration validation, and audit. Typical patterns include reconstructing historical sourcing rule preferences, verifying that no residual rows remain before retiring customizations, and tracing which documents a rule once ranked.

A representative query joining the rule and supplier dimensions:

  • SELECT pad.autosource_rule_id, pad.vendor_id, pad.sequence_num, pad.document_type_code, pad.document_header_id, pad.document_line_id FROM po.po_autosource_documents_all pad WHERE pad.autosource_rule_id = :rule_id ORDER BY pad.vendor_id, pad.sequence_num;
  • Row-count checks for obsolescence: SELECT COUNT(*) FROM po.po_autosource_documents_all;
  • Referential integrity audit against PO_HEADERS_ALL: SELECT pad.* FROM po.po_autosource_documents_all pad WHERE NOT EXISTS (SELECT 1 FROM po.po_headers_all ph WHERE ph.po_header_id = pad.document_header_id);
  • Operating-unit scoped reporting using the U1 key columns.

Related Objects

  • PO.PO_AUTOSOURCE_RULES — joined on AUTOSOURCE_RULE_ID; defines the sourcing rule itself.
  • PO.PO_VENDORS — joined on VENDOR_ID; supplier master.
  • PO.PO_HEADERS_ALL — joined on DOCUMENT_HEADER_ID; source document header.
  • PO.PO_LINES_ALL — joined on DOCUMENT_LINE_ID; source document line.
  • PO_AUTOSOURCE_DOCUMENTS_U1 — unique business-key index on (AUTOSOURCE_RULE_ID, VENDOR_ID, SEQUENCE_NUM, ORG_ID).
  • PO_AUTOSOURCE_DOCUMENTS_N1 / N2 — nonunique indexes supporting header and line lookups.
  • FND_USER / FND_LOGINS — referenced by the standard Who audit columns.

Because the object is archived and unused, the primary recommendation is to treat it as read-only legacy data and avoid building new dependencies against it.