Search Results po_send_ap_match_data




Overview

The APPS.GMF_PO_AP_MATCH_DATA package body is a Process Manufacturing (OPM) utility that supports the reconciliation of purchase order receipt and invoice data for a given purchasing document. Its central purpose is to return the quantitative matching state between what was ordered, received, accepted, billed, and cancelled on the purchasing side, together with the identifier of the associated AP invoice, so that a calling program can perform a three-way match between the PO and Accounts Payable. The package belongs to the GMF (Process Manufacturing Financials) family of objects, as evidenced by the gmfmtchb.pls source header and the GMF_ naming prefix, and it is registered under the APPS schema with an API classification of OTHER.

The user searching for inv_num will find that this token is the invoice identifier returned by the package's single documented procedure. It is an IN OUT parameter whose value is populated by the embedded cursor, meaning the caller supplies a slot and the procedure fills it with the invoice_id from AP_INVOICE_DISTRIBUTIONS_ALL.

Key Procedures and Functions

The package documents exactly one public program unit:

  • PO_SEND_AP_MATCH_DATA — The sole documented procedure. It opens and fetches from an internal cursor that joins PO line locations, PO distributions, and AP invoice distributions for a supplied purchase order header. Its role is to emit the matching quantities (ordered, received, billed, cancelled, and accepted) and the matched invoice identifier back to the caller, while using an IN OUT row-to-fetch counter to control cursor lifecycle and returning a numeric status code to signal success, end-of-data (100), or an Oracle error via SQLCODE.

An internal cursor named PO_SEND_AP, parameterised by poheaderid, is not exposed as a public API but drives the procedure. The status code convention — 100 for no more rows and the raw SQL error otherwise — allows callers to loop until completion.

Tables Accessed

  • PO_LINE_LOCATIONS_ALL — Supplies the shipment-level quantities: quantity, quantity_received, quantity_billed, quantity_cancelled, and quantity_accepted, which form the core of the match result.
  • PO_DISTRIBUTIONS_ALL — Provides the accounting distribution linkage between the purchase order header and its line locations, and the join key po_distribution_id used to reach AP data.
  • AP_INVOICE_DISTRIBUTIONS_ALL — Supplies invoice_id, the value returned into inv_num, completing the three-way match between purchasing and payables.

Usage Notes

Because the object is a package body with no documented callers ("Referenced by 0 other packages"), it is best understood as an internal integration hook rather than a broadly shared public API. In Oracle EBS 12.1.1 and 12.2.2 it would typically be invoked from OPM purchasing or payables processing logic — such as a receiving/invoicing match concurrent program, a PL/SQL-based reconciliation routine, or custom code extending OPM three-way match reporting. The IN OUT row_to_fetch parameter indicates the caller is expected to drive an iterative loop, incrementing the counter and calling repeatedly until the procedure returns statuscode = 100, at which point the cursor is closed. Because it reaches into AP_INVOICE_DISTRIBUTIONS_ALL, any caller must account for AP data volumes and should treat the returned inv_num as the invoice distribution's owning invoice identifier, not an invoice number string.

Note that the source excerpt reflects an early port (version 115.0, dated 1999), so the package predates the 12.x architecture yet remains compatible through APPS synonyms. No formal API classification beyond OTHER is assigned, so customisations should avoid depending on undocumented behaviour of the private cursor.