Featured post

General Ledger Revaluation

General Ledger Revaluation Account balances denominated in foreign currencies are adjusted through the revaluation procedure. Revaluat...

Tuesday, 21 May 2019

Where Is The Invoice Validation Status Stored? How Is The Invoice Validation Status Determined?

Requirement:

How does the Invoices Workbench (APXINWKB) determine the validation status of an invoice?
The validation status of an invoice is displayed at invoice header level, but this information is not stored in the corresponding table AP_INVOICES_ALL like the rest of data at invoice header level.
How does the system store this information?
Solution
There is no column in the AP_INVOICES_ALL table that stores the validation status.
Invoice Distributions are validated individually and the status is stored at the Invoice Distributions level.
This status is stored in  the match_status_flag column of the ap_invoice_distributions_all table (AP_INVOICE_DISTRIBUTIONS_ALL.MATCH_STATUS_FLAG).
Valid values for this column are:
A – Validated (it used to be called Approved)
N or null – Never validated
T – Tested but not validated
S – Stopped
The invoice header form derives the invoice validation status based on the following:
Validated:
  • If ALL of the invoice distributions have a MATCH_STATUS_FLAG = ‘A’
  • If MATCH_STATUS_FLAG is ‘T’ on ALL the distributions and org has no encumbrance enabled then Invoice would show Validated (provided there is no Unreleased Hold)
Never Validated:
  • If all of the invoice distributions have a MATCH_STATUS_FLAG = null or ‘N’
Needs Revalidation:
  • If any of the invoice distributions have a MATCH_STATUS_FLAG = ‘T’ and the org has Encumbrance enabled.
  • If the invoice distributions have MATCH_STATUS_FLAG values = ‘N’, null and ‘A’ (mixed).
  • If the invoice distributions have MATCH_STATUS_FLAG value = ‘S’ (stopped).
  • If there are any rows in AP_HOLDS that do not have a release code.
  • In R12 only, if an invoice line has GENERATE_DISTS set to Y but there are no distributions created yet.  (Distributions displayed in “preview” mode do not exist yet.)
MATCH_STATUS_FLAG would remain ‘T’ if the invoice has a hold which does not allow Accounting.  In such a scenario you cannot account the invoice because event status will be ‘I’.
As soon as the Hold is released from Holds Tab/Invoice Workbench, the event status is set to ‘U’. Invoice is shown as Validated and accounting is allowed. Match_Status_Flag still remains ‘T’.
NOTE:   Encumbrances are turned on in the Financial Options form.  Table: FINANCIALS_SYSTEM_PARAMS_ALL.
Invoice Distributions have Encumbrance flags and IDs.

Reference: Doc ID 301806.1

No comments:

Post a Comment

Please review my topic and update your comments

Note: only a member of this blog may post a comment.