Monday, September 25, 2017

AP Invoice distribution is not created - Payables Open Interface Invoices Import program

R12:imported invoices show distribution class of preview.

Load invoices via ap_invoices_interface and ap_invoice_lines_interface, run Payables Open Interface Import. The invoices are created but when we look in the distribution screen, the distribution class shows as "Preview" rather than "Saved". Also, we cannot query the invoice distributions from ap_invoice_distributions_all.

 This is intended functionality, when we import through Payables Open Interface Import, the invoices will get generated and distribution lines will be in preview status. If you do not want to open and check each such imported invoices, you can go ahead and run INVOICE VALIDATION concurrent program which will validate all invoices and you will not have to save each and every invoice to save distribution lines. It will done automatically after running INVOICE VALIDATION program.

With the changes in R12 to the data model for invoices now there are 3 tables:
   - AP_INVOICES_ALL
   - AP_INVOICE_LINES_ALL -> new table
   - AP_INVOICE_DISTRIBUTIONS_ALL

With this new model, also R12 introduced the concept of distributions in 'Preview' and 'Saved' status.

As per AP Development:
   AP Invoice Distributions are not committed to the database in preview mode and distributions can only be viewed in preview mode from the form. There are
   certain control points during which distributions are available in preview mode for the users to verify the results before proceeding for actual
   commit/save of the distributions.

In 11i there was no such functionality and the records in the form were committed to the database.
In 11i customizations were created built around this fact and assuming that the records were always saved to the database.

The customizations no longer work in R12 as the records are not always committed to the database and are only available in the form for the session,
there are instances where those changes are not committed to the database by the user and therefore the extra processing done by the customizations is
incorrect. 

1 comment:

  1. Hi ,

    I have an invoice in Status : Needs Revalidation and Accounted : No. There is a hold due to the invoice lines total does not match the distribution total.

    We could see that for invoice line 2, there are 14 dist lines in the invoice distribution screen

    line total = 822.65

    distribution total = -3797.35

    But when I run APlist or when I run select query on ap_invoice_distributions_all table with the invoice id, it fetches 12 dist lines only for invoice line 2.

    Due to these extra 2 distribution lines (which I could not find in the backend) I am not able to datafix to tally the invoice line and distribution total and proceed to revalidate, account and then cancel the invoice.

    My Audit is chasing me to close this issue, please provide urgent help.

    ReplyDelete

Price List Query for Item

 SELECT qph.list_header_id,        qph.name,        qph.description,        qphh.start_date_active,        qphh.currency_code,        q...