用友财务软件互动问答平台

 找回密码
 立即注册
查看: 933|回复: 1

用友U8.51软件中查询供应商库存表?

[复制链接]
发表于 2016-9-25 15:59:09 | 显示全部楼层 |阅读模式
问题现象:在用友8.51erp系统中用友U8版本号:U8.51软件的供应链产品线存货核算模块出现如下问题:进入库存管理查询供应商库存表:1、账表—》库存账—》供应商库存表—》过滤(此表没有数据)2、存货核算系统期初数据与库存期初数据对不上:如:存货编号为31010012的咀中华在库存中的期初数是:8429,在存货的期初数据是:6679。请帮忙解答!
原因分析:问题1:存货没有出库跟踪入库,而“供应商库存表”是对出入库跟踪的业务进行查询,这是产品定义的需求,并非数据错误;【问题2分析】:首先查看2004年末存货与库存是否对应。但查询后发现,在2004年的库存模块中,现存量查询和收发存汇总表不一致,以您给出的存货为例,分别是8429和6679;而查询存货模块中的收发存汇总表为6679;再查2005年期初数据,发现存货前后可对照,库存前后也可对照(对照04年现存量)。则可初步判断结转中问题不大,可能现存量在2004年有问题。在2004年整理现存量后,发现各种数据皆能对应,即:库存内部,存货内部以及库存与存货间在04年数据都可对应。因此,结转时,可能将当时错误的数据结转过来,造成数据不一致。故需要修复2005年的数据。
解决方案:在用友erp 系统版本U8.51软件中【问题2解决】:将年前年后的数据汇总并对比,修正需要修正的数据。具体脚本如下(特别注意,此脚本只适用非批次和非出入跟踪业务):useufdata_222_2005--筛选04年相关数据selecta.brdflag,a.cwhcode,b.cinvcode,casebrdflagwhen1theniquantityelse(-1)*iquantityendasiquantityintoufdata_222_2004..aafromufdata_222_2004..rdrecordajoin(ufdata_222_2004..rdrecordsbjoininventoryconb.cinvcode=c.cinvcode)ona.id=b.idwherebpufirst1andbiafirst1andc.btrack=0selectcwhcode,cinvcode,sum(iquantity)asiquantityintoufdata_222_2004..bbfromufdata_222_2004..aagroupbycwhcode,cinvcode--筛选05年相关数据selecta.brdflag,a.cwhcode,b.cinvcode,cbatch,casebrdflagwhen1theniquantityelse(-1)*iquantityendasiquantity--intoufdata_222_2005..aafromufdata_222_2005..rdrecordajoin(ufdata_222_2005..rdrecordsbjoininventoryconb.cinvcode=c.cinvcode)ona.id=b.idwherebisstqc=1andc.btrack=0selectcwhcode,cinvcode,sum(iquantity)asiquantityintoufdata_222_2005..bbfromufdata_222_2005..aagroupbycwhcode,cinvcode--关联查询需要修正记录selectb.iquantity,c.iquantity,*fromufdata_222_2005..rdrecordajoin(ufdata_222_2005..rdrecordsbjoinufdata_222_2004..bbconb.cinvcode=c.cinvcode)ona.id=b.idanda.cwhcode=c.cwhcodewhereb.iquantityc.iquantityanda.bisstqc=1andcvouchtype='34'--修正记录updateufdata_222_2005..rdrecordssetiquantity=c.iquantityfromufdata_222_2005..rdrecordajoin(ufdata_222_2005..rdrecordsbjoinufdata_222_2004..bbconb.cinvcode=c.cinvcode)ona.id=b.idanda.cwhcode=c.cwhcodewhereb.iquantityc.iquantityanda.bisstqc=1andcvouchtype='34'droptableufdata_222_2005..aadroptableufdata_222_2004..aadroptableufdata_222_2005..bbdroptableufdata_222_2004..bb--另注:以下步骤是插入上年未结转得数据。需要新建账套结转2004年得数据才可进行。已通过电话告知。其中ufdata_333_2005为新建账套结转后得05年度账useufdata_333_2005--选择该转而未转的数据至临时表,需要关联两个数据库SELECT[bRdFlag],[cBusType],[cBusCode],[cVouCode],[ID],[ValueID],[JustID],[dVouDate],[dKeepDate],[iMonth],[iPZID],[iPZDate],[cPZtype],[cPZdigest],[cInvHead],[cDifHead],[cOppHead],[cVouType],[cPTCode],[cSTCode],[cWhCode],[cAccDep],[cInvCode],[cRdCode],[cVenCode],[cCusCode],[cOrderCode],[cARVCode],[cBillCode],[cDLCode],[cPSPCode],[cProCode],[cDepCode],[cPersonCode],[cHandler],[iAInQuantity],[iAOutQuantity],[iInCost],[iOutCost],[iAInPrice],[iAOutPrice],[cBatchCode],[iDebitDifCost],[iCreditDifCost],[cAccounter],[cMaker],[bFlag],[bMoneyFlag],[bSale],[cMemo],[cDefine1],[cDefine2],[cDefine3],[cDefine4],[cDefine5],[cDefine6],[cDefine7],[cDefine8],[cDefine9],[cDefine10],[cFree1],[cFree2],[cPZID],[cDefine22],[cDefine23],[cDefine24],[cDefine25],[cDefine26],[cDefine27],[cItem_class],[cItemCode],[cName],[cItemCName],[noJustQuantity],[cFree3],[cFree4],[cFree5],[cFree6],[cFree7],[cFree8],[cFree9],[cFree10],[cDefine11],[cDefine12],[cDefine13],[cDefine14],[cDefine15],[cDefine16],[cDefine28],[cDefine29],[cDefine30],[cDefine31],[cDefine32],[cDefine33],[cDefine34],[cDefine35],[cDefine36],[cDefine37],[psvsid],[cCXHDcode],[cCXFScode]intotempaaaFROM[UFDATA_333_2005].[dbo].[IA_Subsidiary]wherecinvcodenotin(selectcinvcodefromufdata_222_2005..ia_subsidiary)--将临时表中数据,插入用户现在使用的数据库中INSERTINTO[UFDATA_222_2005].[dbo].[IA_Subsidiary]([bRdFlag],[cBusType],[cBusCode],[cVouCode],[ID],[ValueID],[JustID],[dVouDate],[dKeepDate],[iMonth],[iPZID],[iPZDate],[cPZtype],[cPZdigest],[cInvHead],[cDifHead],[cOppHead],[cVouType],[cPTCode],[cSTCode],[cWhCode],[cAccDep],[cInvCode],[cRdCode],[cVenCode],[cCusCode],[cOrderCode],[cARVCode],[cBillCode],[cDLCode],[cPSPCode],[cProCode],[cDepCode],[cPersonCode],[cHandler],[iAInQuantity],[iAOutQuantity],[iInCost],[iOutCost],[iAInPrice],[iAOutPrice],[cBatchCode],[iDebitDifCost],[iCreditDifCost],[cAccounter],[cMaker],[bFlag],[bMoneyFlag],[bSale],[cMemo],[cDefine1],[cDefine2],[cDefine3],[cDefine4],[cDefine5],[cDefine6],[cDefine7],[cDefine8],[cDefine9],[cDefine10],[cFree1],[cFree2],[cPZID],[cDefine22],[cDefine23],[cDefine24],[cDefine25],[cDefine26],[cDefine27],[cItem_class],[cItemCode],[cName],[cItemCName],[noJustQuantity],[cFree3],[cFree4],[cFree5],[cFree6],[cFree7],[cFree8],[cFree9],[cFree10],[cDefine11],[cDefine12],[cDefine13],[cDefine14],[cDefine15],[cDefine16],[cDefine28],[cDefine29],[cDefine30],[cDefine31],[cDefine32],[cDefine33],[cDefine34],[cDefine35],[cDefine36],[cDefine37],[psvsid],[cCXHDcode],[cCXFScode])select*fromufdata_333_2005..tempaaa。
回复

使用道具 举报

发表于 2016-9-25 17:38:58 | 显示全部楼层
用友U8ERP软件免费下载地址截止2016年已发布的版本全部在下方,安装教程请认真参考:http://www.yyrjxz.com/xue/u8azjc.html 进行安装。
1、用友MERPu811软件免费下载地址:http://www.yyrjxz.com/yongyou/MERPU811.1.html
2、用友U82.0erp软件免费下载地址:http://www.yyrjxz.com/yongyouu8/u8old820.html
3、用友U83.0erp软件免费下载地址:http://www.yyrjxz.com/yongyouu8/u8old830.html
4、用友U852erp软件免费下载地址:http://www.yyrjxz.com/yongyouu8/U852.html
5、用友U860erp软件免费下载地址:http://www.yyrjxz.com/yongyouu8/u860.html
6、用友U861erp软件免费下载地址:http://www.yyrjxz.com/yongyouu8/u861xz.html
7、用友U870erp软件免费下载地址:http://www.yyrjxz.com/yongyouu8/u870.html
8、用友U872erp软件免费下载地址:http://www.yyrjxz.com/yongyouu8/u871.html
9、用友U82.0erp软件免费下载地址:http://www.yyrjxz.com/yongyouu8/U872.html
10、用友U890erp软件免费下载地址:http://www.yyrjxz.com/yongyouu8/u890.html
11、用友U810.0erp软件免费下载地址:http://www.yyrjxz.com/yongyouu8/U810.0.html
12、用友U810.1erp软件免费下载地址:http://www.yyrjxz.com/yongyouu8/U8V10.1.html
13、用友U811.0erp软件免费下载地址:http://www.yyrjxz.com/yongyouu8/U8V11.0.html
14、用友U8+v11.1erp软件免费下载地址:http://www.yyrjxz.com/yongyouu8/U8V11.1.html
15、用友U8+v12.0erp软件免费下载地址:http://www.yyrjxz.com/yongyouu8/u8120.html
16、用友U8+v12.1erp软件免费下载地址:http://www.yyrjxz.com/yongyouu8/u8121.html
17、用友U8+v12.5erp软件免费下载地址:http://www.yyrjxz.com/yongyouu8/u8125.html
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|手机版|小黑屋|用友十万个为什么 ( 赣ICP备13006939号 )

GMT+8, 2025-6-17 03:14 , Processed in 0.075582 second(s), 19 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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