| Case Number | 00117687 |
| Oracle Module | Accounts Payable (AP) / Purchasing (PO) |
| EBS Version | R12 |
| Functional Area | Invoice Processing / PO Matching / Tax Distributions |
| Related Patches | None |
invoice_price_variance amount but a NULL PRICE_VAR_CODE_COMBINATION_ID.posted_flag = 'N' and the affected distribution has LINE_TYPE_LOOKUP_CODE = 'TAX' with a non-zero invoice_price_variance.When a PO-matched AP invoice has tax lines with a price variance (the tax amount differs from the PO-expected amount), the system should automatically populate PRICE_VAR_CODE_COMBINATION_ID on the TAX distribution from the PO distribution's variance_account_id. This population was omitted, leaving the column NULL and causing validation to fail when it tries to generate the IPV/TIPV accounting entry.
Use the following query to identify affected distributions, substituting the invoice ID:
SELECT * FROM ap_invoice_distributions_all id WHERE id.posted_flag = 'N' AND id.PRICE_VAR_CODE_COMBINATION_ID IS NULL AND NVL(id.invoice_price_variance, 0) <> 0 AND id.LINE_TYPE_LOOKUP_CODE = 'TAX' AND id.PO_DISTRIBUTION_ID IS NOT NULL AND id.invoice_id = &Invoice_ID;
Run data_fix.sql. A backup of the affected AP_INVOICE_DISTRIBUTIONS_ALL rows is created.
Confirm the backup table row count matches the expected number of affected distributions.
Update AP_INVOICE_DISTRIBUTIONS_ALL.PRICE_VAR_CODE_COMBINATION_ID from PO_DISTRIBUTIONS_ALL.variance_account_id for the affected invoice TAX distributions joined via po_distribution_id.
Issue COMMIT. Retry invoice validation or cancellation to confirm it proceeds without the missing variance account error.
posted_flag = 'N') TAX distributions on PO-matched invoices with a non-zero invoice_price_variance. Test in a non-production instance before applying to production, as sequence values and distribution IDs may differ between environments.
| File | Description |
|---|---|
| data_fix.sql | Creates backup of affected AP_INVOICE_DISTRIBUTIONS_ALL rows; updates PRICE_VAR_CODE_COMBINATION_ID from PO_DISTRIBUTIONS_ALL.variance_account_id for unposted TAX distributions with null variance account and non-zero invoice_price_variance. |
| Table | Action |
|---|---|
| AP_INVOICE_DISTRIBUTIONS_ALL | Update PRICE_VAR_CODE_COMBINATION_ID from PO variance_account_id |
| PO_DISTRIBUTIONS_ALL | Read only — source for variance_account_id |