上午客户有个PO审批后无法打开了,通过工作流查看审批得到
名称 获取 PO 属性
内部名称 GET_PO_DATA
类型 函数
说明
活动版本 10
结果类型 已执行 PO 活动
默认活动结果 例外
消息名称
展开职责 否
函数类型 PL/SQL
函数 PO_POAPPROVAL_INIT1.GET_PO_ATTRIBUTES
循环重新访问时 重置
开销 0
函数活动开销(秒)
错误工作流 系统:错误
询问客户操作是在自动创建采购订单时,二行申请合并为一行,然后又在那一订单行中的两行分配删除了一行,重新添加一行订单行造成的
查了一下
select po_distribution_id, po_line_id, po_header_id, req_distribution_id, quantity_ordered, amount_ordered
from c
where po_header_id = &po_header_id';
发现其中有一行的req_distribution_id为空
又查
po_headers_all
po_lines_all
po_line_locations_all
均未找到此行记录
到METALINK上转了一圈在Doc ID: Note:377334.1中看到解决方案, 其中提到的- Patch 5415047, which will deliver POXPODIS.pld 115.152.11510.16
- Patch 4676111, which will deliver POXPOEPO.fmb 115.445.11510.30
- Patch 4210960, which will deliver POXPOERL.fmb 115.243.11510.29 三个补丁
我们服务器上确实没打过,怪不得,于是
delete po_distributions_all
where po_distribution_id='&po_distribution_id'
然后sysadmin 登录 系统管理员职责 工作流-管理员工作流-状态监控程序
工作流类型:PO 审批 填上项目关键字 查询 重新提交
问题解决
BUG还真多啊,呵呵,下面是METALINK上的文档:
Applies to:
Oracle Purchasing - Version: 11.5.10
This problem can occur on any platform.
Symptoms
The Approval process for Purchase Orders fails with the following error:
Error:
Failed activity: Get PO Attributes
Result: #EXCEPTION
Error Name: -6512
Error Message:ORA-06512: at line
Error Stack: Wf_Engine_Util.Function_Call
(PO_POAPPROVAL_INIT1.GET_PO_ATTRIBUTES, POAPPRV,82207-215181, 126855, RUN)
Cause
This error happens when the quantity ordered or amount is zero in one of the Distributions (po_distributions_all).
Steps to Recreate:
1. Enter the Purchasing Application and query a Purchase Order
2. Click on "Lines"
3. Click on "Distributions"
4. Change the quantity in the Distribution to 0
5. Click "OK" to acknowledge the presenting error
6. Null the value "0", and then tab to the next field
7. Save changes
8. Note that the value will remain as 0
Solution
Data Fix:
1. For the affected distribution check if req_distribution_id is populated:
select po_distribution_id, po_line_id, po_header_id, req_distribution_id, quantity_ordered, amount_ordered
from po_distributions_all
where po_header_id = '&po_header_id';
2. If req_distribution_id is populated for the affected distribution, log a service request to analyze the data and provide a data fix.
Provide a table dump of the following tables via MS Excel for the problematic record(s):
- po_headers_all
- po_lines_all
- po_line_locations_all
- po_distributions_all.
3. If req_distribution_id is null for the affected distribution, follow these steps in a Test instance first:
a. Follow instructions from Note 390023.1 in order to obtain a reset script.
b. Apply reset script. against the document according to instructions from Note 390023.1. The reset script. will modify the document status to Requires Reapproval or Incomplete.
c. Query the document and delete the distribution with zero quantity ordered/amount ordered.
d. Save changes and resubmit approval process.
Code Fix:
Apply the following patches:
- Patch 5415047, which will deliver POXPODIS.pld 115.152.11510.16
- Patch 4676111, which will deliver POXPOEPO.fmb 115.445.11510.30
- Patch 4210960, which will deliver POXPOERL.fmb 115.243.11510.29
References
Bug 5111365 - PO STUCK 'IN PROCESS - ORA-06512 IN GET PO ATTRIBUTES ACTIVITY
Bug 5377142 - DATAFIX: PO STUCK 'IN PROGRESS' ORA-06512 (BUG 5111365)
Bug 5470228 - DATAFIX: PO_POAPPROVAL_INIT1.GET_PO_ATTRIBUTES FAILS WITH ORA-01476
Keywords
EXCEL; POAPPRV; PURCHASE~ORDER~APPROVALS; PO_DISTRIBUTIONS_ALL; IN~PROCESS;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12460239/viewspace-402142/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12460239/viewspace-402142/