PA模块报错-实际返回的行数超出请求的行数(分析标准FORM报错解决思路)
2014-07-28 22:52
507 查看
录入预算报错时报错:
分析:这个错误是select into 语句返回多行的结果,但具体在哪?
两种方法查找,trace 或者debug
1.trace
启用调试
获取trace文件
-bash-3.2$ tkprof ERPDEV_ora_7532_RICK.trc $HOME/7532_rick.fchela.txt
TKPROF: Release 11.2.0.2.0 - Development on Mon Jul 28 11:21:34 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
分析trace文件
TKPROF: Release 11.2.0.2.0 - Development on Mon Jul 28 11:39:10 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Trace file: ERPDEV_ora_7532_RICK.trc
Sort options: default
********************************************************************************
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
********************************************************************************
SQL ID: ga9j9xk5cy9s0 Plan Hash: 467424113
select /*+ index(idl_sb4$ i_idl_sb41) +*/ piece#,length,piece
from
idl_sb4$ where obj#=:1 and part=:2 and version=:3 order by piece#
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 8 0.00 0.00 0 0 0 0
Execute 8 0.00 0.01 0 0 0 0
Fetch 22 0.01 0.15 12 66 0 14
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 38 0.01 0.17 12 66 0 14
...........
内容太多找不到出错点
用debug
分析保存时触发器执行顺序
(1)WHEN-V ALIDA TE-RECORD(将页面上的所有数据提交到数据库,若页面上有重复的数据,则提交
第一次时成功但只是将数据先写到数据库中一类似临时表的地方,在提交第二条重复记录的时候报错,执
行事务回滚,原来执行成功的指令也将被撤消)
(2) PRE-INSER T
(3) ON-INSER T
(4) POST-INSER T
(5) POST-FORMS-COMMIT
(6) PRE-BLOCK(BLOCK 级)
(7) KEY-COMMIT
(8) WHEN-NEW-ITEM-INST ANCE
做界面跟踪
好像是在WHEN-V ALIDA TE-RECORD 里面
备份AU_TOP下的fmb文件以及PA_TOP下的fmx文件
在form触发器里debug
发现不是 WHEN-V ALIDA TE-RECORD 里面
在pre-insert以及on-insert外层定位
FND_MESSAGE.DEBUG('validate');
matrix1.when_validate_record;
FND_MESSAGE.DEBUG('end validate');
FND_MESSAGE.DEBUG('on-insert');
matrix5.validate_resource_level;
FND_MESSAGE.DEBUG('on-insert -1');
matrix.insert_update_record;
FND_MESSAGE.DEBUG('end on-insert');
发现是在on-insert里面的matrix.insert_update_record;报错
做精确定位
if(:matrix_control.p1 is not null) then
--{
l_period_type_code := null;
fnd_message.debug(' insert_update_record 3');
fnd_message.debug(' :matrix_control.p1 3:'||:matrix_control.p1);
select period_type_code into l_period_type_code
from pa_budget_periods_v where period_name = :matrix_control.p1;
fnd_message.debug(' insert_update_record 4');
找到问题,form被以前开发中修改过,取期间code时没加模块限制,返回多行数据
解决,加模块限制
--modify by cxy 2014-07-28
select period_type_code into l_period_type_code
from pa_budget_periods_v where period_name = :matrix_control.p1
and period_type_m = 'PA Period';
分析:这个错误是select into 语句返回多行的结果,但具体在哪?
两种方法查找,trace 或者debug
1.trace
启用调试
获取trace文件
-bash-3.2$ tkprof ERPDEV_ora_7532_RICK.trc $HOME/7532_rick.fchela.txt
TKPROF: Release 11.2.0.2.0 - Development on Mon Jul 28 11:21:34 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
分析trace文件
TKPROF: Release 11.2.0.2.0 - Development on Mon Jul 28 11:39:10 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Trace file: ERPDEV_ora_7532_RICK.trc
Sort options: default
********************************************************************************
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
********************************************************************************
SQL ID: ga9j9xk5cy9s0 Plan Hash: 467424113
select /*+ index(idl_sb4$ i_idl_sb41) +*/ piece#,length,piece
from
idl_sb4$ where obj#=:1 and part=:2 and version=:3 order by piece#
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 8 0.00 0.00 0 0 0 0
Execute 8 0.00 0.01 0 0 0 0
Fetch 22 0.01 0.15 12 66 0 14
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 38 0.01 0.17 12 66 0 14
...........
内容太多找不到出错点
用debug
分析保存时触发器执行顺序
(1)WHEN-V ALIDA TE-RECORD(将页面上的所有数据提交到数据库,若页面上有重复的数据,则提交
第一次时成功但只是将数据先写到数据库中一类似临时表的地方,在提交第二条重复记录的时候报错,执
行事务回滚,原来执行成功的指令也将被撤消)
(2) PRE-INSER T
(3) ON-INSER T
(4) POST-INSER T
(5) POST-FORMS-COMMIT
(6) PRE-BLOCK(BLOCK 级)
(7) KEY-COMMIT
(8) WHEN-NEW-ITEM-INST ANCE
做界面跟踪
好像是在WHEN-V ALIDA TE-RECORD 里面
备份AU_TOP下的fmb文件以及PA_TOP下的fmx文件
在form触发器里debug
发现不是 WHEN-V ALIDA TE-RECORD 里面
在pre-insert以及on-insert外层定位
FND_MESSAGE.DEBUG('validate');
matrix1.when_validate_record;
FND_MESSAGE.DEBUG('end validate');
FND_MESSAGE.DEBUG('on-insert');
matrix5.validate_resource_level;
FND_MESSAGE.DEBUG('on-insert -1');
matrix.insert_update_record;
FND_MESSAGE.DEBUG('end on-insert');
发现是在on-insert里面的matrix.insert_update_record;报错
做精确定位
if(:matrix_control.p1 is not null) then
--{
l_period_type_code := null;
fnd_message.debug(' insert_update_record 3');
fnd_message.debug(' :matrix_control.p1 3:'||:matrix_control.p1);
select period_type_code into l_period_type_code
from pa_budget_periods_v where period_name = :matrix_control.p1;
fnd_message.debug(' insert_update_record 4');
找到问题,form被以前开发中修改过,取期间code时没加模块限制,返回多行数据
解决,加模块限制
--modify by cxy 2014-07-28
select period_type_code into l_period_type_code
from pa_budget_periods_v where period_name = :matrix_control.p1
and period_type_m = 'PA Period';
相关文章推荐
- PA模块报错-实际返回的行数超出请求的行数(分析标准FORM报错解决思路)
- PA模块报错-实际返回的行数超出请求的行数(分析标准FORM报错解决思路)
- ora-01422 实际返回的行数超出请求的行数
- ORA-01422: 实际返回的行数超出请求的行数
- 在删除表时出现错误:递归sql级别1出现错误 ,实际返回的行数超出请求的行数
- oracle:ORACLE 实际返回的行数超出请求的行数
- ORA-01422: 实际返回的行数超出请求的行数
- 部署在服务器上的应用请求json文件返回404解决方法及原因分析
- Monkey测试实际Native Crash问题的分析与解决思路
- iOS开发工具-如何使用网络封包分析工具Charles,通过配置proxy对http、https、tcp、udp 等协议的请求响应过程交互信息进行分析、判断、解决我们移动开发中的遇到的各种实际问题。
- ORA-01000: 超出打开游标的最大数 问题的分析和解决
- 访问php时提示内存位置访问无效的解决办法和思路分析
- 解决cmd下返回的错误的原因分析拒绝访问找不到网络路径
- WINCE中蓝牙扫描模块现10050,控制器无法找到错误的解决思路
- DISCUZ 附件批量上传列表空白等问题原因分析及解决思路
- 关于WAMP出现无法启动的一些分析以及解决思路
- jetty请求form表单太大解决
- 标准功能模块组件 -- “文档管理组件,网络文档管理,网络存储”,B/S版本组件可独立运行,也可集成到其他项目里,数据结构清晰思路严谨
- PrintWriter返回乱码的分析及解决
- 用HttpWebRequest做POST请求时返回Http 417 错误解决方法