找回密码
 注册账号

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

初学者课程:T3自学|T6自学|U8自学软件下载课件下载工具下载资料:通资料|U8资料|NC|培训|年结积分规则 | 使用常见问题Q&A
知识库:U8 | | NC | U9 | OA | 政务U8|U9|NCC|NC65|NC65客开|NCC客开新手必读 | 任务 | 快速增金币用友QQ群[微信群]
查看: 2955|回复: 9

[求助] 用友材料出库单和产成品入库单无法参考生产订单

[复制链接]
发表于 2013-9-25 17:09:31 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册账号

×
未命名.JPG
如上图,对应的子项无法取得,同样的问题存在于产成品入库单。
发表于 2013-9-26 10:38:19 | 显示全部楼层
有效吗?试一下瞧
回复 点赞 拍砖

使用道具 举报

发表于 2013-9-26 13:02:35 | 显示全部楼层
审核了吗?或者是不是已经被参照过了?
回复 点赞 拍砖

使用道具 举报

 楼主| 发表于 2013-9-29 15:21:03 | 显示全部楼层
没有被参照过,用数据库软件查看了下,抽选子件的sql语句少了一截,是个残缺的sql句。可能是之前的实施老师升级T6 3.3到T6 5.1时改过系统表,就是目前找不到到底改在哪儿,无法修正这个语句,哎,坑爹!
回复 点赞 拍砖

使用道具 举报

 楼主| 发表于 2013-10-9 12:13:18 | 显示全部楼层
有米有高手?
回复 点赞 拍砖

使用道具 举报

 楼主| 发表于 2013-10-17 14:58:08 | 显示全部楼层
本帖最后由 darbell 于 2013-10-17 15:00 编辑

用数据库跟踪执行的结果,上面为正常sql句,下面为异常(表上颜色处为对比异常,sql句少了一截,为啥?软件问题?):
select  '' as SELCOL,(PP_POMain.MainID) as MainID,(PP_POMain.cInvCode) as cInvCode,(Inventory.cInvName) as cInvName,(computationUnit.cComUnitName) as cComUnitName,(Inventory.cInvStd) as cInvStd,(Inventory.cComUnitCode) as cComUnitCode,(isnull(PP_POMain.fQuantity,0)) as fQuantity,(isnull(PP_POMain.fInquantity,0)) as fInquantity,(isnull(CUR.iCurQuantity,0)) as iCurQuantity,(PP_POMain.dStartDate) as dStartDate,(PP_POMain.dEndDate) as dEndDate,(PP_POMain.citemName) as citemname,(PP_POMain.citemcode) as citemcode,(fitem.cItem_Name) as citem_name,(PP_POMain.citem_Class) as citem_Class,(Inventory.cinvaddcode) as cinvaddcode,(PmSocode.csocode) as csocode,(pp_pomain.cmemo) as cmemo,(pp_pomain.cclose) as cclose,(isnull(pp_pomain.cbomsocode, '' )) as cbomsocode,(isnull(pp_pomain.fbhgquantity,0)) as fbhgquantity,(isnull(pp_pomain.fhgquantity,0)) as fhgquantity,(isnull(pp_pomain.fquantityed,0)) as fquantityed,(isnull(pp_pomain.fnum,0)) as fnum,(isnull(pp_pomain.finnum,0)) as finnum,(PP_POMain.cbatch) as cpobatch,((case when inventory.igrouptype = 1 then computationunit2.ichangrate else (case when inventory.igrouptype = 0 then null else (case when (pp_pomain.fnum = 0 or pp_pomain.fnum is null) or (pp_pomain.fquantity = 0 or pp_pomain.fquantity is null) then null else pp_pomain.fquantity / pp_pomain.fnum end) end) end) ) as iinvexchrate from PP_POMain left join ( select pp_pomain.mainid, so_sodetails.csocode from ( select * from pp_pomain where len(csosids)-len(replace(csosids,',',''))<=2 ) pp_pomain left join so_sodetails on pp_pomain.csosids = ',' + cast(so_sodetails.isosid as varchar(50)) + ',' union select  pp_pomain.mainid, so_sodetails.csocode from ( select * from pp_pomain where len(csosids)-len(replace(csosids,',',''))>2 ) pp_pomain  left join so_sodetails on pp_pomain.csosids like '%,' + cast(so_sodetails.isosid as varchar(50)) + ',%' ) PmSocode on PmSocode.mainid = pp_pomain.mainid  left join rdrecords on pp_pomain.irdautoid=rdrecords.autoid left join rdrecord on rdrecords.id=rdrecord.id left join computationunit as computationunit2 on pp_pomain.cunitid = computationunit2.ccomunitcode  inner join PP_ProductPO ON PP_POMain.ID=PP_ProductPO.ID LEFT OUTER JOIN (SELECT '' AS  iCurQuantity,MAINID FROM PP_POMain) CUR ON CUR.MAINID = PP_POMain.MAINID LEFT OUTER JOIN  Inventory  ON Inventory.cInvCode = PP_POMain.cInvCode LEFT OUTER JOIN  computationUnit ON Inventory.cComUnitCode =  computationUnit.cComunitCode  left join fitem on pp_pomain.citem_class = fitem.citem_class where (PP_POMain.id in (27) and PP_POMain.bUsed=0  and  exists(select * from PP_PODetails where PP_PODetails.MainID=PP_POMain.MainID) and  PP_POMain.ID in (select ID from PP_ProductPO where iState=2)   ) and PP_POMain.mainid in (select mainid from pp_podetails where  isnull(fquantity,0)>isnull(foutquantity,0) or isnull(fnum,0)>isnull(foutnum,0))  and (PP_POMain.cclose='' or PP_POMain.cclose is null)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
select  '' as SELCOL,(PP_POMain.MainID) as MainID,(PP_POMain.cInvCode) as cInvCode,(Inventory.cInvName) as cInvName,(computationUnit.cComUnitName) as cComUnitName,(Inventory.cInvStd) as cInvStd,(Inventory.cComUnitCode) as cComUnitCode,(isnull(PP_POMain.fQuantity,0)) as fQuantity,(isnull(PP_POMain.fInquantity,0)) as fInquantity,(isnull(CUR.iCurQuantity,0)) as
iCurQuantity,(PP_POMain.dStartDate) as dStartDate,(PP_POMain.dEndDate) as dEndDate,(PP_POMain.citemName) as citemname,(PP_POMain.citemcode) as citemcode,(fitem.cItem_Name) as
citem_name,(PP_POMain.citem_Class) as citem_Class,(Inventory.cinvaddcode) as cinvaddcode,(PmSocode.csocode) as csocode,(pp_pomain.cmemo) as cmemo,(pp_pomain.cclose) as cclose,(isnull(pp_pomain.cbomsocode, ''
)) as cbomsocode,(isnull(pp_pomain.fbhgquantity,0)) as fbhgquantity,(isnull(pp_pomain.fhgquantity,0)) as fhgquantity,(isnull(pp_pomain.fquantityed,0)) as fquantityed,(isnull(pp_pomain.fnum,0)) as fnum,(isnull(pp_pomain.finnum,0)) as finnum,(PP_POMain.cbatch) as cpobatch,((case when inventory.igrouptype = 1 then computati) as iinvexchrate from PP_POMain left join ( select pp_pomain.mainid, so_sodetails.csocode from ( select * from pp_pomain where len(csosids)-len(replace(csosids,',',''))<=2 ) pp_pomain left join so_sodetails on pp_pomain.csosids = ',' + cast(so_sodetails.isosid as varchar(50)) + ',' union select  pp_pomain.mainid, so_sodetails.csocode from ( select * from pp_pomain where len(csosids)-len(replace(csosids,',',''))>2 ) pp_pomain  left join so_sodetails on pp_pomain.csosids like '%,' + cast(so_sodetails.isosid as varchar(50)) + ',%' ) PmSocode on PmSocode.mainid = pp_pomain.mainid  left join rdrecords on pp_pomain.irdautoid=rdrecords.autoid left join rdrecord on rdrecords.id=rdrecord.id left join computationunit as computationunit2 on pp_pomain.cunitid = computationunit2.ccomunitcode  inner join PP_ProductPO ON PP_POMain.ID=PP_ProductPO.ID LEFT OUTER JOIN (SELECT '' AS  iCurQuantity,MAINID FROM PP_POMain) CUR ON CUR.MAINID = PP_POMain.MAINID LEFT OUTER JOIN  Inventory  ON Inventory.cInvCode = PP_POMain.cInvCode LEFT OUTER JOIN  computationUnit ON Inventory.cComUnitCode =  computationUnit.cComunitCode  left join fitem on pp_pomain.citem_class = fitem.citem_class where (PP_POMain.id in (3) and PP_POMain.bUsed=0  and  exists(select * from PP_PODetails where PP_PODetails.MainID=PP_POMain.MainID) and  PP_POMain.ID in (select ID from PP_ProductPO where iState=2)   ) and PP_POMain.mainid in (select mainid from pp_podetails where  isnull(fquantity,0)>isnull(foutquantity,0) or isnull(fnum,0)>isnull(foutnum,0))  and (PP_POMain.cclose='' or PP_POMain.cclose is null)
回复 点赞 拍砖

使用道具 举报

 楼主| 发表于 2013-10-25 16:04:24 | 显示全部楼层
是否存储过程创建表结构,数据长度过小,导致动态sql句被截断
回复 点赞 拍砖

使用道具 举报

发表于 2013-10-29 11:05:27 | 显示全部楼层
看一看,路过学习
回复 点赞 拍砖

使用道具 举报

发表于 2013-11-18 14:17:37 | 显示全部楼层
找个测试正常的帐套,再跟踪下对比怎么修改就可以了!
回复 点赞 拍砖

使用道具 举报

发表于 2014-1-7 13:06:12 | 显示全部楼层
我也遇到材料和产成品无法跟出问题,查数据库也是SQL语句缺失,你找到问题解决方法了么,我手机15258836582 姓吕 望一起探讨
回复 点赞 拍砖

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

QQ|站长微信|Archiver|手机版|小黑屋|用友之家 ( 蜀ICP备07505338号|51072502110008 )

GMT+8, 2024-11-24 18:54 , Processed in 0.105488 second(s), 13 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表