存货核算反结账之后 ,再结账回去的时候就出现这个错误提示了。跪求大神帮忙看看- 。-{:3_50:}万分感谢{:3_64:}~~
(存货核算期末结帐)失败,原因是::
null
Caused exception message is: null
Caused exception message is: 执行sql失败,sql :INSERT INTO GZTZ29WUYAZ1IYXRUQQC6ND565S29(FID,FBillId,FBillEntryId,FEntryTableMame,FNumber,FBizDate,FCompanyOrgUnitID,FMaterialId,
Fstorageorgunitid,Fwarehouseid,FBaseQty,FBaseQtyBak,FActualCost,FPrice,FReverseQty,FCalculateKind,
FSeqNum,FFiVouchered,FBizTypeID,FSourceBillID,FSourceBillEntryID,FSourceBillEntrySeq,FSourceUnitActualCost,
FActualCostBak,FbillTypeID,FTransactionTypeID,FisCombition,FisSrcBilInCurrPid,FIsPresent,
FStockTransBillEntryID,FAUDITTIME,FSourceBillTypeID,FIsReversed,FLot,FIsReWork,
FOutwarehouseType,FBillTypeName,FAssistPropertyID,FProjectID,FTrackNumberID,
FUnitID,FQty,FWrittenOffBaseQty,FUnWriteOffBaseQty,FisWriteOffVouched)
SELECT Bill.FBillEntryId,Bill.FBillId,Bill.FBillEntryId,FEntryTableMame,Bill.FNumber,Bill.FBizDate,
Bill.FCompanyOrgUnitID,Bill.FMaterialId,Bill.Fstorageorgunitid,Bill.Fwarehouseid,
case when FCalculateKind = 2 then FPeriodBeginQty else Bill.FBaseQty end,
case when FCalculateKind = 2 then FPeriodBeginQty else Bill.FBaseQty end,
case when FCalculateKind = 2 then FPeriodBeginBalance else Bill.FActualCost end,
Bill.FBaseUnitActualCost as FPrice,Bill.FReverseQty,Bill.FCalculateKind,Bill.FSeqNum,
ISNULL(Bill.FFiVouchered, 0) AS FFiVouchered,Bill.FBizTypeID,Bill.FSourceBillID,Bill.FSourceBillEntryID,
Bill.FSourceBillEntrySeq,0 AS FSourceUnitActualCost,
case when FCalculateKind = 2 then FPeriodBeginBalance else Bill.FActualCost end,Bill.FbillTypeID,
Bill.FTransactionTypeID,0 AS FisCombition,0 AS FisSrcBilInCurrPid,Bill.FIsPresent,BILL.FStockTransBillEntryID,
BILL.FAUDITTIME,Bill.FSourceBillTypeID,Bill.FIsReversed,Bill.FLot,Bill.FIsReWork,
Bill.FOutwarehouseType,Bill.FBillTypeName,Bill.FAssistPropertyID,Bill.FProjectID,Bill.FTrackNumberID,
Bill.FUnitID,Bill.FQty,Bill.FWrittenOffBaseQty,Bill.FUnWriteOffBaseQty,Bill.FisWriteOffVouched
From (
SELECT Entry.FMaterialID,ENTRY.FCompanyOrgUnitId AS FCompanyOrgUnitID,ENTRY.FStorageOrgUnitID AS FStorageOrgUnitID,ENTRY.FWarehouseID AS FWarehouseID,
0 AS FPeriodBeginCostDiff,0 AS FPeriodBeginBalance,0 AS FIncomeCostAdjustAmt,
ENTRY.FStandardCost AS FStandardCost,ENTRY.FActualCost AS FActualCost,ENTRY.FBaseQty AS FBaseQty,
CASE WHEN ENTRY.FUNITID=ENTRY.FBASEUNITID OR ENTRY.FBaseQty=0 THEN ISNULL(ENTRY.FUNITACTUALCOST,0)
ELSE TO_DECIMAL(TO_DECIMAL(ENTRY.FActualCost, 17, 4)/ENTRY.FBaseQty, 21, 8) END AS FBaseUnitActualCost,
0 AS FPeriodBeginQty,Bill.FBillTypeID,BILL.FNumber,Bill.FBizDate,
ENTRY.FUnitID,ENTRY.FQty, 0 as FWrittenOffBaseQty,0 as FUnWriteOffBaseQty,
BILL.FBIZTYPEID,BILL.FTRANSACTIONTYPEID,
BILL.FFIVOUCHERED,ENTRY.FSEQ AS FSEQNUM,BILL.FID AS FBILLID,ENTRY.FID AS FBILLENTRYID,
0 AS FCALCULATEKIND,BILL.FISREVERSED,ENTRY.FREVERSEQTY,NULL AS FSTOCKTRANSBILLENTRYID,BILL.FAUDITTIME,
BILL.FSOURCEBILLTYPEID,ENTRY.FLOT AS FLOT,ENTRY.FISPRESENT,
to_char(ENTRY.FSourceBillID) AS FSourceBillID,to_char(ENTRY.FSourceBillEntryID) AS FSourceBillEntryID,ENTRY.FSourceBillEntrySeq,
-1 AS FOutwarehouseType,'T_IM_ManufactureRecBillEntry' AS FEntryTableMame,0 as FIsReWork ,'生产入库单' as FBillTypeName,ENTRY.FAssistPropertyID,ENTRY.FProjectID,ENTRY.FTrackNumberID ,0 as FisWriteOffVouched
FROM T_IM_ManufactureRecBillEntry ENTRY
INNER JOIN T_IM_ManufactureRecBill BILL ON BILL.FID = ENTRY.FParentID
WHERE BILL.FBaseStatus = 4 AND (BILL.FIsInitBill = 0 OR BILL.FIsInitBill IS NULL)
AND (BILL.FBIZDATE >=TO_DATE('2015-04-26 00:00:00') AND BILL.FBIZDATE <=TO_DATE('2015-05-25 23:59:59.995')) AND (ENTRY.FBIZDATE >=TO_DATE('2015-04-26 00:00:00') AND ENTRY.FBIZDATE <=TO_DATE('2015-05-25 23:59:59.995'))
AND ENTRY.FCompanyOrgUnitId = 'mNoAAAAAAS/M567U'
) Bill
Caused exception message is: error occurred during batching: ORA-01400: cannot insert NULL into ("JF2"."GZTZ29WUYAZ1IYXRUQQC6ND565S29"."FMATERIALID")
推荐阅读