SAP B1 物料需求計(jì)劃_第1頁
SAP B1 物料需求計(jì)劃_第2頁
SAP B1 物料需求計(jì)劃_第3頁
SAP B1 物料需求計(jì)劃_第4頁
全文預(yù)覽已結(jié)束

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

報(bào)表呈現(xiàn),查詢范圍:只考慮已審批且未完成全部收貨的生產(chǎn)訂單按款號(hào)匯總生產(chǎn)所需原材料匯總,出結(jié)果后可直接賦值至采購訂單進(jìn)行采購,如涉及到多個(gè)供應(yīng)商,需進(jìn)行刪減。復(fù)制到采購訂單后自動(dòng)加載物料編碼、數(shù)量、單價(jià)代碼呈現(xiàn):(有自定義字段:t7.u_ClothType,刪除后可運(yùn)行)selectt2.Itemcode,isnull(t0.Project,'未輸入')項(xiàng)目,t8.CardName,isnull(t7.u_ClothType,'未輸入')款號(hào),t2.ItemName,t2.ItemCode,t2.ItemType,sum(t0.PlannedQty)生產(chǎn)數(shù)量,t2.InvntryUom物料單位,--isnull(t3.Quantity,0)物料計(jì)劃單位用量,sum(isnull(t0.PlannedQty,0)*isnull(t3.Quantity,0))物料計(jì)劃總用量,isnull(t4.onhand,0)庫存量,sum(isnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)-isnull(t4.onhand,0)-t1.IssuedQty)需采購量合計(jì),t5.ItmsGrpNam,sum(isnull(case whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=50thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.09 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>50andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=200thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.06 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>200andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.04 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.02 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=200thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.03 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>200andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.02 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.01end,0))增購的損耗備用量,sum(isnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)-isnull(t4.onhand,0)-t1.IssuedQty+isnull((case whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=50thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.09 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>50andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=200thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.06 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>200andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.04 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.02 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=200thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.03 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>200andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.02 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.01end),0))數(shù)量,isnull(t6.CardCode,'未采購過')供應(yīng)商編碼,isnull(t6.CardName,'未采購過')供應(yīng)商名稱,isnull(cast(t6.Priceasvarchar),'未采購過')采購單價(jià),sum(isnull(t6.Price*(isnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)-isnull(t4.onhand,0)+isnull((case whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=50thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.09 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>50andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=200thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.06 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>200andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.04 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.02 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=200thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.03 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>200andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.02 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.01end),0)),0))采購金額fromOWORt0innerjoinWOR1t1ont0.DocEntry=t1.DocEntryinnerjoinOITMt7ont0.ItemCode=t7.ItemCodeinnerjoinOITMt2ont1.ItemCode=t2.ItemCodeinnerjoin(selectz0.Codefather,z1.Code,z1.QuantityfromOITTz0 innerjoinITT1z1onz0.Code=z1.Father)t3ont3.father=t0.ItemCodeandt3.Code=t1.ItemCodeleftjoin(selectItemCode,sum(onhand)onhandfromOITWx0 wherex0.WhsCodenotin('104','105')groupbyItemCode)t4ont1.ItemCode=t4.ItemCodeinnerjoinOITBt5ont2.ItmsGrpCod=t5.ItmsGrpCodleftjoin(selectc0.CardCode,c0.CardName,c1.Price,c1.ItemCodefromOPORc0 innerjoinPOR1c1onc0.DocEntry=c1.DocEntry innerjoin( selectc0.CardCode,c0.CardName,c1.ItemCode,MAX(c0.DocEntry)DocEntryfromOPORc0 innerjoinPOR1c1onc0.DocEntry=c1.DocEntry --wherec1.ItemCode='Z000815' groupbyc0.CardCode,c0.CardName,c1.ItemCode )cc0oncc0.DocEntry=c0.DocEntryandcc0.CardCode=c0.CardCodeandcc0.CardName=c0.CardNameandcc0.ItemCode=c1.ItemCode )t6ont6.ItemCode=t1.ItemCodeleftjoinOQUTt8ont0.U_SCXQ=t8.DocEntrywheret0.PlannedQty>t0.CmpltQtyandt0.Status='R'and(t0.DocEntry=[%0]or[%0]='')and(t0.ItemCode='[%1]'or'[%1]'='')and(t2.ItemNamelike'%[%2]%'or'[%2]'='')and(t0.postDate>='[%3]'or'[%3]'='')and(t0.postDate<='[%4]'or'[%4]'='')and(t0.Project='[%5]'or'[%5]'='')and(t8.CardNa

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論