Report 出现REP-1401错误

[复制链接]
查看11 | 回复4 | 2008-5-27 15:39:39 | 显示全部楼层 |阅读模式
大侠,REP-1401是什么错误?谁能指点指点,谢谢 。
回复

使用道具 举报

千问 | 2008-5-27 15:39:39 | 显示全部楼层
function CF_huayinFormula return Number is
huayin number;
dep number;
begin
select distinct nvl(wo.department_id,0)
intodep
fromwip_operations wo,mtl_system_items_b msi,wip_discrete_jobs wdj
where wo.organization_id=:Org_id
and wo.wip_entity_id=wdj.wip_entity_id
and wo.organization_id=msi.organization_id
and wdj.primary_item_id=msi.inventory_item_id
and msi.segment1=:Item
and wo.department_id in (5,6,45);


if dep=5 then


select nvl(A.T_quan,0)
intohuayin --please update right dept
from
(select msi.organization_id org,msi.segment1 Item,msi.primary_uom_code Uom,msi.unit_volume Uom_u,--wo.department_id dept,

sum(nvl(To_move.T_quan,0)+nvl(Back_move.T_quan,0))T_quan
from wip_operations wo,mtl_system_items_b msi,wip_discrete_jobs wdj,

(select
wmt.wip_entity_id ,wmt.to_department_id, -1*sum(nvl(wmt.transaction_quantity,0)) T_quan
from wip_move_transactions wmt
where wmt.fm_operation_seq_num>wmt.to_operation_seq_num
and(to_char(wmt.transaction_date,'yyyy/mm/dd') between :Begin_date and:End_date)
and wmt.to_department_id in (5,6,45)--department id
and wmt.organization_id=:Org_id
group by wmt.wip_entity_id,wmt.to_department_id)Back_move,

(select wmt.wip_entity_id ,wmt.fm_department_id ,sum(nvl(wmt.transaction_quantity,0))T_quan
from wip_move_transactions wmt
where wmt.fm_operation_seq_numerror.jpg (10.78 KB, 下载次数: 3)
下载附件
2009-5-18 16:36 上传

回复

使用道具 举报

千问 | 2008-5-27 15:39:39 | 显示全部楼层
中图是完整的报错信息,谢谢。
回复

使用道具 举报

千问 | 2008-5-27 15:39:39 | 显示全部楼层
问题出在哪呢?郁闷ing
回复

使用道具 举报

千问 | 2008-5-27 15:39:39 | 显示全部楼层
原帖由 sudn 于 2009-5-18 16:54 发表
问题出在哪呢?郁闷ing

估计你要检查一下SQL语句,看是否会返回多个值
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行