Search Results get_invoice_match_option




Overview

APPS.PO_AUTO_HEADER_PROCESS_PVT is a private (PVT) PL/SQL package body within the Oracle Purchasing module of Oracle E-Business Suite, delivered under release 12.1.1 and 12.2.2. Its business function is to support Procurement automation by deriving, defaulting, validating, and persisting purchasing document headers that are generated automatically rather than entered manually by a user. The package operates primarily against the purchasing "draft" entity model, in which header records are constructed and validated before being merged into the permanent purchasing schema. It is an internal companion to the public purchasing APIs and is not intended as a standalone integration interface. As a private package, it is invoked by other Purchasing components rather than called directly by customers; the ETRM metadata records that it is referenced by one other package. Release history embedded in the source header (version 120.18.12020000.4, dated 2013/05/08) confirms ongoing maintenance across the 12.1.x and 12.2.x code lines.

Key Procedures and Functions

The package exposes five documented procedures. FETCH_HEADERS retrieves the set of header records to be processed, selecting from the purchasing interface and draft structures so that downstream logic operates on an in-memory working set. DERIVE_AND_DEFAULT_HEADERS applies purchasing defaults and derivation rules to each header, populating values that the source did not supply. VALIDATE_HEADER performs the header-level validation step, confirming that required attributes and their relationships are consistent before the record is committed. MERGE_TO_HEADERS_DRAFT writes the validated header content into the headers draft table, and MERGE_TO_ORG_ASSIGN_DRAFT writes the corresponding organization assignment rows into the organization assignment draft table. The package also declares the private procedure get_invoice_match_option, which the source comments describe as deriving the invoice match option for a given vendor and vendor site. This helper is directly relevant to searches for "get_invoice_match_option": it accepts a vendor identifier and vendor site identifier and returns the invoice match option as an OUT NOCOPY VARCHAR2 parameter. Because it is a private procedure, it is not callable from external code and is reached only through the package's own processing flow.

Tables Accessed

The package reads and writes the following objects through APPS synonyms: AP_PRODUCT_SETUP, FINANCIALS_SYSTEM_PARAMETERS, and FINANCIALS_SYSTEM_PARAMS_ALL supply financials and product-level setup values used during defaulting; PO_SYSTEM_PARAMETERS_ALL supplies Purchasing-specific defaults. HR_LOCATIONS_ALL provides location data used when deriving vendor ship-to and bill-to attributes. PO_HEADERS, PO_HEADERS_ALL, PO_HEADERS_INTERFACE, and PO_HEADERS_S represent the live purchasing header schema and the interface staging area from which automatic headers are drawn. PO_HEADERS_DRAFT_ALL, PO_DRAFTS, PO_GA_ORG_ASSIGNMENTS_S, and PO_GA_ORG_ASSIGN_DRAFT are the draft and organization assignment structures into which processed records are merged.

Usage Notes

PO_AUTO_HEADER_PROCESS_PVT is invoked internally by Purchasing automation flows, including automatic document creation and sourcing-to-purchasing document generation, where headers must be built programmatically and validated before commit. It should not be called directly by custom code; customers requiring document creation should use the supported public purchasing APIs. Debug behavior is controlled through PO_DEBUG flags declared at package level (is_debug_stmt_on and is_debug_unexp_on), which emit diagnostic output when enabled.