AP-04 EBS R12.x Accounts Payable Tier 2 Data Fix

PO Matching Tolerance Analysis

Analyzes all PO matching tolerance controls and identifies invoices at or beyond quantity, price, amount, and exchange rate tolerance thresholds.

PlatformOracle EBS R12.x
Input RequiredInvoice ID or PO Number
Diagnostic Checks28+
Data Sources7 Oracle tables
Fix Options3 guided fixes
Backup CreatedYes — Automatic

Why This Fails — and What It Costs

Oracle EBS 3-way and 4-way purchase order matching is the primary control that prevents AP from paying more than was ordered and received. When it works correctly, it is invisible — invoices validate cleanly and process to payment. When it fails, it generates a specific class of system holds — QUANTITY RECEIVED, QTY ORD, PRICE, and AMOUNT — that block the invoice from validation until the underlying discrepancy between the invoice, the PO, and the receipt is resolved. These holds are the correct behavior of the matching engine, not errors. The difficulty is that the resolution path is different for each hold type, and each resolution requires coordination between the AP team, the Purchasing team, and sometimes the Receiving team.

The tolerance configuration in AP_PO_MATCHING_CONTROLS determines when a variance becomes a hold. A 0% quantity tolerance means any overbilling — even a single unit — places a QUANTITY RECEIVED hold. A 5% price tolerance means the invoice price can be up to 5% above the PO price before a PRICE hold fires. When these tolerances are not aligned with the business's actual operational flexibility, the result is a high volume of holds for minor variances that the business considers acceptable — and an AP team spending time releasing holds rather than processing payments.

The subtler problem is the interaction between matching holds and invoice aging. An invoice placed on a QUANTITY RECEIVED hold requires action from the Receiving team before it can be released — but Receiving may have received the goods against a different PO line, or the receipt may be in transit and not yet entered. Meanwhile, the invoice ages on hold, the vendor's payment terms clock continues to run, and the discount cutoff date — if the invoice carries a discount term — approaches. AP-04 identifies these time-sensitive conditions and flags invoices where the hold resolution delay is creating a financial cost through lost discounts or late payment risk.

AP-04 runs a complete analysis of the matching engine state — tolerance configuration by operating unit, all invoices at or beyond tolerance thresholds with exact variance amounts, receipt existence and quantity status per shipment, exchange rate variance for multi-currency matched invoices, and aging analysis with discount risk flags. It generates a prioritized resolution list ordered by financial impact.

What This Script Diagnoses

AP-04 systematically investigates every major condition that can cause the issue this diagnostic targets. Below is the complete coverage breakdown.

Tolerance Configuration
AP_PO_MATCHING_CONTROLS setup — quantity tolerance %, price tolerance %, amount tolerance $. Operating unit vs. vendor site override tolerances. Tolerance type: goods vs. services.
Quantity Variance Analysis
Billed qty vs. received qty vs. ordered qty per shipment. Exact overage amount and percentage. Whether receipt is in transit. Whether tolerance is set to 0% (strict).
Price Variance Analysis
Billed unit price vs. PO line price. Variance % vs. price tolerance. Price override flag on PO shipment. Currency conversion for multi-currency POs.
Amount Tolerance
Total invoice amount vs. total PO shipment amount. Amount tolerance in functional currency. Service lines with amount-based matching.
Exchange Rate Variance
Rate variance for foreign currency invoices vs. daily rate tolerance in AP system options. Exchange rate gain/loss account setup.

What the Report Looks Like

Representative output showing the diagnostic running against a real-world scenario. The script identifies every condition, states the root cause, and generates the fix.

AP-04 — AP-04 Diagnostic Report
════════════════════════════════════════════════════════════
  ORACLE EBS R12 — PO MATCHING TOLERANCE DIAGNOSTIC
════════════════════════════════════════════════════════════
  Invoice ID         : 2204891
  PO Number          : PO-2026-07734
  Vendor             : Consolidated Supply Co (Vendor #: 8812)
  Case Number        : 848102
  Report Date        : 22-FEB-2026 14:20:11
════════════════════════════════════════════════════════════

[ SECTION 1 — TOLERANCE CONFIGURATION ]      STATUS: ✓ PASS
────────────────────────────────────────────────────────────
  Qty Tolerance      : 0%  (strict)
  Price Tolerance    : 2%
  Amount Tolerance   : $100
  Match Type         : 3-WAY

[ SECTION 2 — QUANTITY VARIANCE ]            STATUS: ✗ FAIL
────────────────────────────────────────────────────────────
  Qty Ordered        : 500.00
  Qty Received       : 500.00 ✓
  Qty Billed         : 520.00 ✗
  Overage            : 20 units — 4% above ordered
  ✗ FAIL: QTY ORD hold — billed 520 vs ordered 500
  Fix Option 1       : Reduce invoice qty to 500 via price correction
  Fix Option 2       : Amend PO-2026-07734 Line 1 qty to 520 (buyer approval required)

[ SECTION 3 — PRICE VARIANCE ]               STATUS: ✓ PASS
────────────────────────────────────────────────────────────
  PO Unit Price      : $42.50
  Billed Unit Price  : $43.10
  Variance           : 1.4% — within 2% tolerance ✓

[ SECTION 4 — DISCOUNT RISK ]                STATUS: ⚠ WARNING
────────────────────────────────────────────────────────────
  ⚠ Discount date: 28-FEB-2026 — 6 days remaining
  ⚠ Discount amount at risk: $1,280.00 (2% of $64,000)

════════════════════════════════════════════════════════════
  DIAGNOSTIC SUMMARY
════════════════════════════════════════════════════════════
  QTY ORD hold — 20 unit overage must be resolved before 28-FEB-2026
  Priority: HIGH — $1,280 discount expires in 6 days
════════════════════════════════════════════════════════════

The Four-Layer Architecture in AP-04

1
Diagnostic Engine
Runs 28+ checks covering tolerance configuration per OU, quantity variance per shipment, price variance vs PO price, amount tolerance for service lines, exchange rate variance for multi-currency POs, and aging with discount risk analysis.
2
Backup Created
Before any invoice or PO data is modified, CONS_BACKUP.AP_INVOICES_ALL_<case#>, AP_HOLDS_ALL_<case#>, and PO_LINE_LOCATIONS_ALL_<case#> are created and row counts verified.
3
Guided Data Fix
Most matching holds resolve through functional paths — receiving corrections, PO amendments, or quantity correction invoices. For direct-fixable conditions such as tolerance configuration corrections, AP-04 generates the update with full backup.
4
KB Article Generated
Complete KB article generated — invoice ID, PO reference, hold type, variance amounts, tolerance configuration, fix path taken, discount risk flag. Upload directly to your knowledge base.

Backup & Rollback for AP-04

Every table touched by AP-04 data fixes is backed up before the first UPDATE fires. Backup is verified by row count. One script restores the original state if needed.

Tables Backed Up — AP-04

CONS_BACKUP.AP_INVOICES_ALL_<case#> CONS_BACKUP.AP_INVOICE_LINES_ALL_<case#> CONS_BACKUP.AP_HOLDS_ALL_<case#> CONS_BACKUP.PO_LINE_LOCATIONS_ALL_<case#>

Backup happens before any DML. Script aborts if backup creation fails.

Pre-Flight Safety Guards

POSTED_FLAG = 'N'Required ✓
ACCOUNTING_EVENT_ID IS NULLRequired ✓
No active session lockChecked ✓
CONS_BACKUP schema accessibleVerified ✓

FIX_BACKUP_REGISTRY Entry

REGISTRY_ID<auto-generated>
CASE_NUMBER<consultant case#>
SOURCE_TABLE<table modified>
ROWS_BACKED_UP<row count>
BACKUP_VERIFIEDYES ✓
ROLLBACK_SQLStored as CLOB
STATUSACTIVE
ENVIRONMENTPRODUCTION

Auto-Generated Knowledge Base Article

This article is produced automatically at the end of every AP-04 execution — written from actual run output. No manual documentation required.

KB-AP-848102-001 · Script: AP-04
QTY ORD Hold — Invoice Quantity Exceeds PO Ordered Quantity with Discount Risk
Invoice 2204891 for Consolidated Supply Co on hold with QTY ORD hold. 520 units billed against a PO for 500 units. Payment discount of $1,280 at risk — discount date 28-FEB-2026.
Supplier invoiced for 520 units against a PO created for 500. The additional 20 units were a shipment overage accepted at the dock without a PO amendment. Oracle 0% quantity tolerance resulted in a QTY ORD system hold on the invoice.
AP_INVOICES_ALL — INVOICE_AMOUNT, VALIDATION_STATUS (Invoice ID: 2204891)
AP_HOLDS_ALL — HOLD_LOOKUP_CODE = QTY ORD
PO_LINE_LOCATIONS_ALL — QUANTITY, QUANTITY_BILLED (Shipment ID: 441820)
Buyer amended PO-2026-07734 Line 1 quantity from 500 to 520 (authorized: Procurement Manager). QTY ORD hold released automatically on revalidation. Invoice validated and approved. Payment processed 26-FEB-2026 — discount captured.
Dock receiving staff should flag shipment overages to Purchasing immediately for same-day PO amendment. Invoices with discount terms should be flagged in AP-06 holds summary for priority resolution.
APPO MatchingQTY ORDQuantity HoldAP_PO_MATCHING_CONTROLSDiscount RiskEBS R12.2

Most Common Issues Detected by AP-04

Hold

QUANTITY RECEIVED Hold

Billed quantity exceeds received quantity beyond tolerance. AP-04 shows exact shortfall, tolerance setting, and identifies whether additional receipt is expected or invoice qty should be reduced.

Hold

PRICE Hold

Invoice unit price exceeds PO price beyond tolerance. AP-04 calculates the exact variance, shows the PO price and billed price, and identifies whether a PO amendment or price credit memo is appropriate.

Hold

AMOUNT Hold

Total invoice amount exceeds PO shipment amount tolerance. Common for service-based POs. AP-04 shows the exact overage and the correct action.

Setup

Zero Tolerance Configuration

Tolerance set to 0% causing holds on minor variances. AP-04 identifies the tolerance configuration and the business impact of relaxing it.

Tables & Views Examined

Table / ViewSchemaPurpose in Diagnostic
AP_INVOICES_ALL AP Invoice header — amounts, vendor, currency
AP_INVOICE_LINES_ALL AP Invoice lines with PO references
AP_HOLDS_ALL AP Active matching holds
PO_LINE_LOCATIONS_ALL PO Shipment quantities and tolerances
RCV_TRANSACTIONS PO Receipt quantities
AP_PO_MATCHING_CONTROLS AP Tolerance configuration per OU
GL_DAILY_RATES GL Exchange rates for multi-currency
Decision Framework

How Every Fix Decision Is Made

Before any data is modified in a production Oracle database, AP-01 walks through a four-stage decision process. Every condition identified by the diagnostic maps to exactly one resolution path.

1
First Option — Always
Can the front end fix this?

Oracle's own forms and concurrent programs are always the first option. If the condition can be corrected through Oracle's standard UI — a form, a concurrent program, a setup screen — that path is taken first. No consultant SQL required, no database risk, and the fix is fully supported by Oracle. The diagnostic identifies these conditions explicitly and states the exact front-end navigation path.

✓ Functional Fix
2
When Front End Is Not Available
Is a direct data fix safe to apply?

When the front-end path is unavailable or would require an unacceptable volume of manual steps, a direct fix is evaluated against explicit criteria. All of the following must be true before proceeding:

The fix mirrors exactly what Oracle's own code would have done if the underlying condition were corrected
All dependent tables have been identified and will be updated in the same transaction
The fix is fully reversible — a single INSERT from the backup table restores the original state
The environment patch level has been confirmed against the fix logic version
⚡ Direct Fix
3
Hard Stops — No Exceptions
Does this require Oracle Support?

Certain table areas are never touched directly, regardless of how well the underlying structure is understood. The diagnostic flags these conditions and generates the Service Request documentation:

XLA subledger tablesXLA_EVENTS, XLA_AE_HEADERS — incorrect changes corrupt the subledger audit trail in ways undetectable until period close fails or an auditor requests a reconciliation
Workflow engine tablesWF_ITEMS, WF_ITEM_ACTIVITY_STATUSES — ad-hoc DML can corrupt the workflow engine state instance-wide
Recurring conditions after a fix — indicates a code defect, not a data error. Documented and submitted as a Service Request with a reproducible test case
⚠ Oracle Support
4
For All Approved Direct Fixes
Backup → Execute → Verify → Document

A timestamped backup table is created and row-count verified before the first UPDATE fires. Explicit parameter confirmation is required — the script will not self-execute. After execution, a verification query confirms the expected state. A complete change record — rows affected, before and after values, database username, timestamp — is written to the FIX_BACKUP_REGISTRY and becomes the primary artifact in the knowledge base entry for this incident.

📋 Documented
Condition Identified Resolution Path Notes
QTY ORD hold — billed quantity exceeds ordered quantity Functional First Buyer amends the PO line quantity to match the billed amount, or AP creates a quantity correction credit memo to reduce the billed quantity. AP-04 calculates the exact overage and identifies whether a PO amendment is appropriate based on PO status.
QUANTITY RECEIVED hold — billed quantity exceeds received quantity Functional First Receiving team enters the additional receipt transaction for the outstanding quantity. AP-04 shows the exact shortfall per shipment and the RCV_SHIPMENT_HEADERS reference for the receiving transaction.
PRICE hold — invoice price exceeds PO price beyond tolerance Functional First Buyer amends PO price or AP creates a price correction credit memo. AP-04 calculates the exact variance, identifies whether it exceeds the price tolerance, and shows both the PO price and billed price.
AMOUNT hold — total invoice amount exceeds PO shipment amount Functional First Common for services-based POs with amount-based matching. Resolution is a PO amendment or a price correction invoice. AP-04 calculates the exact overage against the PO shipment amount.
0% tolerance causing holds on minor variances Functional First Tolerance adjustment via Payables > Setup > Matching > Matching Tolerances. AP-04 identifies the business impact of the current configuration and the variance amounts that would pass under alternative tolerance settings.
Exchange rate variance hold — multi-currency invoice Functional First AP-04 identifies the rate variance between the invoice rate and the GL daily rate. Resolution is typically a rate correction on the invoice or an exchange rate gain/loss account setup correction.
Receipt in transit — goods received but not yet entered Functional First Coordinate with Receiving to enter the receipt transaction in RCV_TRANSACTIONS. AP-04 identifies whether an expected receipt exists in the receiving module that has not yet been confirmed.
PO closed to receiving — cannot receive against a closed shipment Oracle Support If the PO shipment was closed prematurely and additional goods were received, Oracle Support may need to assist with reopening the shipment. Direct DML on PO shipment close status is not performed.
Safeguards

Nothing Executes Without a Safety Net

Before any data fix runs, the script verifies pre-flight conditions and creates a complete verified backup. If any check fails, the script aborts. There is no partial execution path.

Pre-Flight Checks — All Must Pass
POSTED_FLAG = 'N'
Will not modify a posted transaction under any circumstances
ACCOUNTING_EVENT_ID IS NULL
Will not modify rows with an active or pending XLA accounting event
No active database lock
Checks V$LOCK — will not proceed if another session holds a lock on target rows
CONS_BACKUP schema writable
Backup schema must be accessible before any DML is permitted
Explicit confirmation required
Script outputs a confirmation prompt — DML does not execute until consultant enters the case number as the execution parameter
Backup Methodology

Before the first UPDATE fires, the script creates a complete copy of every row to be modified. Tables are named CONS_BACKUP.<TABLE>_<CASE#> and persist permanently after execution.

AP_INVOICES_ALL
AP_INVOICE_LINES_ALL
AP_HOLDS_ALL
PO_LINE_LOCATIONS_ALL
Row count verified after backup creation. If backup fails for any reason the script aborts without executing any DML. Rollback is a single INSERT from the backup table. No reconstruction required.
AP-04 — Pre-Flight & Backup Verification
════════════════════════════════════════════════════════════
  PRE-FLIGHT SAFETY CHECK
════════════════════════════════════════════════════════════
  Invoice ID         : 2204891
  POSTED_FLAG        : N ✓ Safe to proceed
  ACCOUNTING_EVENT_ID: NULL ✓ No active event
  Session Lock Check : No locks detected ✓
  CONS_BACKUP Schema : Accessible ✓
────────────────────────────────────────────────────────────
  ALL PRE-FLIGHT CHECKS PASSED — Ready to create backup
════════════════════════════════════════════════════════════
  Creating : CONS_BACKUP.AP_INVOICES_ALL_848102
  Rows     : 1 row backed up ✓ Verified
  Creating : CONS_BACKUP.AP_HOLDS_ALL_848102
  Rows     : 1 row backed up ✓ Verified
  Registry : FIX_BACKUP_REGISTRY — ID 2089 created ✓
────────────────────────────────────────────────────────────
  BACKUP COMPLETE
════════════════════════════════════════════════════════════
  Enter case number to confirm : 848102
  Confirmed.
════════════════════════════════════════════════════════════
Knowledge Base

Every Execution Produces a Record

The knowledge base article is generated automatically from the script's execution output. No manual documentation required. It becomes the institutional record — for the team, for auditors, and for every future engagement in the same environment.

Zero Manual Effort
Every field — environment, tables, before/after values, backup reference, root cause, prevention — is generated from actual execution output. Nothing is written by hand.
Patterns Surface Over Time
The first engagement produces findings. The third produces patterns. Recurring conditions that are invisible as individual incidents become obvious as knowledge base trends.
Survives Staff Turnover
The knowledge base is an institutional record of the Oracle environment. A new manager, a new DBA, or an external auditor can read exactly what happened, what was done, and what prevents recurrence.
KB-AP-848102-001
QTY ORD Hold — Invoice Quantity Exceeds PO Ordered Quantity with Discount Risk
EBS R12.2.10 · Accounts Payable
● RESOLVED
Symptom
Invoice 2204891 for Consolidated Supply Co on hold with QTY ORD hold. 520 units billed against a PO for 500 units. Payment discount of $1,280 at risk — discount date 28-FEB-2026.
Root Cause
Supplier invoiced for 520 units against a PO created for 500. The additional 20 units were a shipment overage accepted at the dock without a PO amendment. Oracle 0% quantity tolerance resulted in a QTY ORD system hold on the invoice.
Tables
AP_INVOICES_ALL — INVOICE_AMOUNT, VALIDATION_STATUS (Invoice ID: 2204891)
AP_HOLDS_ALL — HOLD_LOOKUP_CODE = QTY ORD
PO_LINE_LOCATIONS_ALL — QUANTITY, QUANTITY_BILLED (Shipment ID: 441820)
Fix Applied
Buyer amended PO-2026-07734 Line 1 quantity from 500 to 520 (authorized: Procurement Manager). QTY ORD hold released automatically on revalidation. Invoice validated and approved. Payment processed 26-FEB-2026 — discount captured.
Prevention
Dock receiving staff should flag shipment overages to Purchasing immediately for same-day PO amendment. Invoices with discount terms should be flagged in AP-06 holds summary for priority resolution.
Tags
APPO MatchingQTY ORDQuantity HoldAP_PO_MATCHING_CONTROLSDiscount RiskEBS R12.2

Oracle Documentation References

R12 Guide (PDF)Title & ChapterDetail
120apug.pdfOracle Payables User's Guide — Ch. 3: Matching to Purchase Orderspp. 3-32 to 3-36: Two-way and three-way matching, tolerance setup, and matching hold resolution
120apug.pdfOracle Payables User's Guide — Appendix C: Oracle Payables HoldsAppendix C: QTY ORD, QTY REC, PRICE, and AMOUNT matching hold codes and release criteria
120poug.pdfOracle Purchasing User's Guide — Ch. 4: Purchase OrdersCh. 4: Purchase order price tolerances and receipt accrual settings that drive matching holds

Ready to Resolve This in Your Environment?

AP-04 is one of 65 diagnostic scripts covering every major Oracle EBS and Fusion module. William A. Green Consulting runs the script in your environment, applies guided data fixes, and builds the knowledge base that prevents the same issues from recurring.

Schedule a Discovery Call → ← View All 65 Scripts

See this script run autonomously — Oracle AI Platform →