PO: Finally close error

本文介绍了解决在尝试最终关闭采购订单(PO)时遇到的系统错误的方法。当存在未验证的发票时,系统会阻止PO的最终关闭。文章提供了一个SQL查询来查找这些未验证的发票,并建议在尝试关闭PO之前先验证这些发票。

今天发现用户在在PO做finally close时候报错:

Error: You cannot finally close this purchase order because there are outstanding invoices and/or credit memos

metalink上有对此的解释:

cause: Issue was caused by invalid data.  Some invoice lines were not validated.

This is a valid system error if invoices that are not validated are matched to the PO user is trying to finally close.

Action should be taken to validate these invoices before attempting to finally close the PO.

如何后台查找没有验证的invoice:

SELECT ai.invoice_id, ai.invoice_num
  FROM po_headers_all               ph,
       po_distributions_all         pd,
       po_releases_all              pr,
       ap_invoice_distributions_all aid,
       ap_invoices_all              ai
 WHERE ph.po_header_id = &po_header_id
   AND ph.po_header_id = pd.po_header_id
   AND pd.po_release_id = pr.po_release_id(+)
   AND pd.po_distribution_id = aid.po_distribution_id
   AND aid.invoice_id = ai.invoice_id
   AND (exists (select 'hold'
                  from ap_holds_all ah
                 where ai.invoice_id = ah.invoice_id
                   AND ah.release_lookup_code is null) OR exists
        (select 'unvalidated dist'
           from ap_invoice_distributions_all aid2
          where ai.invoice_id = aid2.invoice_id
            and nvl(aid2.match_status_flag, 'N') <> 'A'));

 

if no records shown for above script, please refer to metalink: Doc ID 1306249.1 for oracle Bug

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值