發(fā)布于:2018-01-23 14:01:04
問(wèn)題現(xiàn)象:成本管理中在做生成計(jì)劃成本時(shí),出現(xiàn)“單位無(wú)定義,請(qǐng)修改數(shù)據(jù)后重試”
解決方案:1、參照?qǐng)?zhí)行如下腳本,將“材料單位轉(zhuǎn)換率定義”中缺少的記錄補(bǔ)充上去: create view tp as SELECT Inventory.cinvcode as 存貨編碼 , CA_AWPC.camoID AS 成本材料編碼, CA_AWPC.cUnit AS 成本材料單位,ComputationUnit.cComUnitName AS 實(shí)際存貨單位 FROM Inventory INNER JOIN ComputationUnit ON Inventory.cComUnitCode = ComputationUnit.cComunitCode INNER JOIN CA_AWPC ON Inventory.cInvCode = CA_AWPC.camoID where CA_AWPC.cUnit<>ComputationUnit.cComUnitName and CA_AWPC.camoID not in(select distinct cmatid from CA_matdf) go SET IDENTITY_INSERT CA_MatDf ON GO INSERT INTO [UFDATA_007_2006].[dbo].[CA_MatDf]([cMatID], [cUnit], [cSpecification], [iRat], [cComments], [cMatName]) select distinct camoid,cunit,cInvStd,1.0,null,cInvName from CA_AWPC a inner join inventory b on a.camoid=b.cinvcode where camoid in (select distinct 成本材料編碼 from tp) order by camoid GO SET IDENTITY_INSERT CA_MatDf OFF GO 2、執(zhí)行如下腳本查詢出產(chǎn)品屬性中沒(méi)有定義工序的產(chǎn)品記錄: select * from CA_propt where cprocedureid='' 3、在產(chǎn)品屬性定義中將未定義工序的產(chǎn)品按用戶需求進(jìn)行補(bǔ)充; 4、重新進(jìn)行計(jì)劃成本計(jì)算即可。