本文適用於所有語言地區的 Microsoft Dynamics NAV。
症狀
在 Microsoft Dynamics NAV 中,當你設定 No.對於生產物料清單,使用項目表中的項目編號,然後執行「物料清單數量爆炸」報告,報告會顯示未完成項目。
此問題發生於以下產品:
- Microsoft Dynamics NAV 2009 服務包 1 (SP1)
- Microsoft Dynamics NAV 2009 R2
解決方式
Hotfix 資訊
Microsoft 現在已經支援熱修補程式。 然而,這僅是為了修正本文所描述的問題。 只應用在遇到這個特定問題的系統上。 此熱修補可能會進行額外測試。 因此,如果您未受到此問題嚴重影響,我們建議您等待下一個 Microsoft Dynamics NAV 2009 服務包或包含此熱修補的 Microsoft Dynamics NAV 版本。
注意:在特殊情況下,若 Microsoft Dynamics 及相關產品的技術支援專業人員判斷特定更新能解決您的問題,通常因支援電話而產生的費用可能會被取消。 一般來說,如果有所描述之特定更新無法解決的其他支援問題,才會收取支援費用。
安裝資訊
Microsoft 僅提供圖例的程式設計範例,不含明示或暗示的擔保。 這包括 (但不限於) 適用于特定目的之可操作性或適用性的暗示擔保。 本文假設您熟悉正在示範的程式設計語言,以及用來建立和進行程式偵錯工具的工具。 Microsoft 技術支援工程師可以協助說明特定程序的功能,但不會修改這些範例以提供附加功能或建構程序來滿足您的特定需求。
注意:安裝此熱修補程式前,請確認所有 Microsoft Navision 用戶端使用者都已登出系統。 這包括Microsoft Navision 應用服務 (NAS) 用戶端使用者。 當你實施這個熱修補時,應該只有你一個登入的客戶端使用者。
要實作這個熱修補,你必須擁有開發者授權。
我們建議在 Windows 登入視窗或資料庫登入視窗中,將使用者帳號分配「SUPER」角色 ID。 若使用者帳號無法被指派「SUPER」角色 ID,您必須驗證該帳號擁有以下權限:
- 你要更改的物件的修改權限。
- 系統物件 ID 5210 的執行權限,以及系統物件 ID 9015 的執行權限。
注意:除非你必須進行資料修復,否則你不必擁有資料儲存的權利。
法規變更
注意:在將修正程式套用到生產電腦之前,務必在受控環境中測試修正。
如果要解決這個問題,請依照下列步驟執行。
在物料清單(BOM)報表中,將資料項目編號2的程式碼 (99000753) 如下:
現行法規1... BomComponent[Level]."Production BOM No." := Item."Production BOM No."; BomComponent[Level].SETRANGE("Production BOM No.",Item."Production BOM No."); BomComponent[Level].SETRANGE("Version Code",VersionCode[Level]); BomComponent[Level].SETFILTER("Starting Date",'%1|..%2',0D,CalculateDate); BomComponent[Level].SETFILTER("Ending Date",'%1|%2..',0D,CalculateDate); NoList[Level] := Item."No."; Quantity[Level] := UOMMgt.GetQtyPerUnitOfMeasure(Item,Item."Base Unit of Measure") / UOMMgt.GetQtyPerUnitOfMeasure( Item, ...替換代碼1
... BomComponent[Level]."Production BOM No." := Item."Production BOM No."; BomComponent[Level].SETRANGE("Production BOM No.",Item."Production BOM No."); BomComponent[Level].SETRANGE("Version Code",VersionCode[Level]); BomComponent[Level].SETFILTER("Starting Date",'%1|..%2',0D,CalculateDate); BomComponent[Level].SETFILTER("Ending Date",'%1|%2..',0D,CalculateDate); // Add the following line. NoListType[Level] := NoListType[Level]::Item; // End of the added line. NoList[Level] := Item."No."; Quantity[Level] := UOMMgt.GetQtyPerUnitOfMeasure(Item,Item."Base Unit of Measure") / UOMMgt.GetQtyPerUnitOfMeasure( Item, ...現有的第二號法規
... BEGIN WHILE BomComponent[Level].NEXT = 0 DO BEGIN Level := Level - 1; IF Level <1 THEN CurrReport.BREAK; // Delete the following line. IF NOT UpperLevelItem.GET(NoList[Level]) THEN // End of the deleted line. UpperLevelItem."Production BOM No." := NoList[Level]; BomComponent[Level].SETRANGE("Production BOM No.",UpperLevelItem."Production BOM No."); BomComponent[Level].SETRANGE("Version Code",VersionCode[Level]); END; ...替換代碼2
... BEGIN WHILE BomComponent[Level].NEXT = 0 DO BEGIN Level := Level - 1; IF Level <1 THEN CurrReport.BREAK; // Add the following line. IF NoListType[NextLevel] = NoListType[NextLevel]::"Production BOM" THEN // End of the added line. UpperLevelItem."Production BOM No." := NoList[Level]; BomComponent[Level].SETRANGE("Production BOM No.",UpperLevelItem."Production BOM No."); BomComponent[Level].SETRANGE("Version Code",VersionCode[Level]); END; ...現行法規3
... BEGIN CompItem.GET(BomComponent[Level]."No."); IF CompItem."Production BOM No."<>'' THEN BEGIN NextLevel := Level + 1; CLEAR(BomComponent[NextLevel]); NoList[NextLevel] := CompItem."No."; VersionCode[NextLevel] := VersionMgt.GetBOMVersion(CompItem."Production BOM No.",CalculateDate,FALSE); BomComponent[NextLevel].SETRANGE("Production BOM No.",CompItem."Production BOM No."); BomComponent[NextLevel].SETRANGE("Version Code",VersionCode[NextLevel]); ...替代代碼3
... BEGIN CompItem.GET(BomComponent[Level]."No."); IF CompItem."Production BOM No."<>'' THEN BEGIN NextLevel := Level + 1; CLEAR(BomComponent[NextLevel]); // Add the following line. NoListType[NextLevel] := NoListType[NextLevel]::Item; // End of the added line. NoList[NextLevel] := CompItem."No."; VersionCode[NextLevel] := VersionMgt.GetBOMVersion(CompItem."Production BOM No.",CalculateDate,FALSE); BomComponent[NextLevel].SETRANGE("Production BOM No.",CompItem."Production BOM No."); BomComponent[NextLevel].SETRANGE("Version Code",VersionCode[NextLevel]); ...現行代碼4
... CompItem, VersionMgt.GetBOMUnitOfMeasure( CompItem."Production BOM No.",VersionCode[NextLevel])); END; IF Level > 1 THEN BEGIN // Delete the following lines. IF BomItem.GET(BomComponent[Level - 1]."No.") THEN BEGIN QtyPerUnitOfMeasure := UOMMgt.GetQtyPerUnitOfMeasure(BomItem,BomComponent[Level - 1]."Unit of Measure Code") / UOMMgt.GetQtyPerUnitOfMeasure( BomItem,VersionMgt.GetBOMUnitOfMeasure(BomItem."Production BOM No.",VersionCode[Level])); // End of the deleted lines. END; END; END; BomComponent[Level].Type::"Production BOM": BEGIN ...替換代碼4
... CompItem, VersionMgt.GetBOMUnitOfMeasure( CompItem."Production BOM No.",VersionCode[NextLevel])); END; IF Level > 1 THEN BEGIN // Add the following lines. IF (BomComponent[Level - 1].Type = BomComponent[Level - 1].Type::Item) THEN BEGIN IF BomItem.GET(BomComponent[Level - 1]."No.") THEN BEGIN QtyPerUnitOfMeasure := UOMMgt.GetQtyPerUnitOfMeasure(BomItem,BomComponent[Level - 1]."Unit of Measure Code") / UOMMgt.GetQtyPerUnitOfMeasure( BomItem,VersionMgt.GetBOMUnitOfMeasure(BomItem."Production BOM No.",VersionCode[Level])); END; // End of the added lines. END; END; END; BomComponent[Level].Type::"Production BOM": BEGIN ...現行代碼5
... BomComponent[Level].Type::"Production BOM": BEGIN ProdBOM.GET(BomComponent[Level]."No."); NextLevel := Level + 1; CLEAR(BomComponent[NextLevel]); NoList[NextLevel] := ProdBOM."No."; VersionCode[NextLevel] := VersionMgt.GetBOMVersion(ProdBOM."No.",CalculateDate,FALSE); BomComponent[NextLevel].SETRANGE("Production BOM No.",NoList[NextLevel]); BomComponent[NextLevel].SETRANGE("Version Code",VersionCode[NextLevel]); BomComponent[NextLevel].SETFILTER("Starting Date",'%1|..%2',0D,CalculateDate); ...替換代碼5
... BomComponent[Level].Type::"Production BOM": BEGIN ProdBOM.GET(BomComponent[Level]."No."); NextLevel := Level + 1; CLEAR(BomComponent[NextLevel]); // Add the following line. NoListType[NextLevel] := NoListType[NextLevel]::"Production BOM"; // End of the added line. NoList[NextLevel] := ProdBOM."No."; VersionCode[NextLevel] := VersionMgt.GetBOMVersion(ProdBOM."No.",CalculateDate,FALSE); BomComponent[NextLevel].SETRANGE("Production BOM No.",NoList[NextLevel]); BomComponent[NextLevel].SETRANGE("Version Code",VersionCode[NextLevel]); BomComponent[NextLevel].SETFILTER("Starting Date",'%1|..%2',0D,CalculateDate); ...在物料清單數量爆炸報告中的全域變數中,將代碼 (99000753) 如下:
現有程式碼... Quantity@1013 : ARRAY [99] OF Decimal; QtyPerUnitOfMeasure@1014 : Decimal; Level@1015 : Integer; NextLevel@1016 : Integer; BOMQty@1017 : Decimal; BEGIN END. } RDLDATA ...替換代碼
... Quantity@1013 : ARRAY [99] OF Decimal; QtyPerUnitOfMeasure@1014 : Decimal; Level@1015 : Integer; NextLevel@1016 : Integer; BOMQty@1017 : Decimal; // Add the following line. NoListType@1018 : ARRAY [99] OF ' ,Item,Production BOM'; // End of the added line. BEGIN END. } RDLDATA ...
先決條件
您必須安裝以下其中一項產品才能套用此熱修補:
- Microsoft Dynamics NAV 2009 服務包 1 (SP1)
- Microsoft Dynamics NAV 2009 R2
移除資訊
你無法移除這個熱修正。
狀態
Microsoft 已確認這是「適用對象」一節中列出的 Microsoft 產品中的問題。
參考資料
VSTF 動力導航 SE:251802
注意本文為 Microsoft 支援單位內部直接建立的「快速發佈」文章。 此處包含的資訊是以其現況提供,用於回應新產生的問題。 由於快速發佈,資料可能包含拼字錯誤,並可能會隨時修訂,不另行通知。 請參閱使用條款以瞭解其他相關考量。