[いいえ] を設定すると、"BOM の数量展開" レポートに不完全なアイテムが表示されます。Microsoft Dynamics NAV 2009 SP1 または Microsoft Dynamics NAV 2009 R2 の項目テーブルの品目番号を使用して、運用 BOM の場合

適用先
Microsoft Dynamics NAV 2009 R2 Dynamics NAV 2009 Service Pack 1

この記事は、すべての言語ロケールの Microsoft Dynamics NAV に適用されます。

現象

Microsoft Dynamics NAV で、 [いいえ] を設定するとします。品目テーブルの品目番号を使用して生産 BOM の場合は、"BOM の数量展開" レポートを実行すると、レポートに不完全なアイテムが表示されます。
この問題は、次の製品で発生します。

  • Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)
  • Microsoft Dynamics NAV 2009 R2

解決策

修正プログラムの情報

サポートされている修正プログラムが Microsoft から入手できるようになりました。 ただし、この記事で説明されている問題を修正することのみを目的としています。 この特定の問題が発生しているシステムにのみ適用します。 この修正プログラムは、追加のテストを受け取る場合があります。 したがって、この問題の影響を大きく受けない場合は、次の Microsoft Dynamics NAV 2009 Service Pack またはこの修正プログラムを含む次の Microsoft Dynamics NAV バージョンを待つことをおすすめします。

注 特別なケースでは、Microsoft Dynamics および関連製品のテクニカル サポート プロフェッショナルが特定の更新プログラムによって問題が解決されると判断した場合、通常はサポート呼び出しに対して発生する料金が取り消されることがあります。 ただし、特定の更新プログラムの対象とならない追加の質問および問題については、通常のサポート料金が適用されます。

            
          

インストール情報

Microsoft は、明示または黙示の保証なしで、説明のみを目的としてプログラミング例を提供しています。 これには、商品性または特定の目的への適合性に関する暗黙の保証が含まれますが、これらに限定されません。 この記事では、デモンストレーションされているプログラミング言語と、プロシージャの作成とデバッグに使用されるツールについてよく理解していることを前提としています。 マイクロソフト サポート窓口では、特定のプロシージャの機能説明に関するご質問に対して支援いたしますが、本例を特定の目的を満たすために機能を追加したり、プロシージャを構築することは行いません。

注 この修正プログラムをインストールする前に、すべての Microsoft Navision クライアント ユーザーがシステムからログオフされていることを確認します。 これには、Microsoft Navision Application Services (NAS) クライアント ユーザーが含まれます。 この修正プログラムを実装するときにログオンする唯一のクライアント ユーザーである必要があります。

この修正プログラムを実装するには、開発者ライセンスが必要です。

[Windows ログイン] ウィンドウまたは [データベース ログイン] ウィンドウのユーザー アカウントに "SUPER" ロール ID を割り当てることをお勧めします。 ユーザー アカウントに "SUPER" ロール ID を割り当てることができない場合は、ユーザー アカウントに次のアクセス許可があることを確認する必要があります。

  • 変更するオブジェクトの [変更] アクセス許可。
  • システム オブジェクト ID 5210 オブジェクトとシステム オブジェクト ID 9015 オブジェクトの Execute アクセス許可。

                
メモ データ修復を実行する必要がない限り、データ ストアに対する権限は必要ありません。

コードの変更

メモ 運用環境のコンピューターに修正プログラムを適用する前に、制御された環境でコード修正を常にテストします。
この問題を解決するには、次の手順を実行します。

  1. BOM レポートの数量展開 (99000753) のデータ項目番号 2 関数のコードを次のように変更します。
    既存のコード 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,
    ...
    

    既存のコード 2

    ...
                             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);
    ...
    
  2. BOM の数量爆発レポート (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 Service Pack 1 (SP1)
  • Microsoft Dynamics NAV 2009 R2

                
              

アンインストール情報

この修正プログラムを削除することはできません。

状態

Microsoft は、これが "適用対象" セクションに記載されている Microsoft 製品の問題であることを確認しました。

参考資料

VSTF DynamicsNAV SE: 251802

注: この資料は、"迅速な公開" を目的としてマイクロソフト サポート組織により直接作成されたものです。 ここに含まれる情報は、新しい問題に対応するため、そのままの状態で提供されます。 情報を迅速に公開するため、この資料には誤植などが含まれる可能性があり、また、予告なく改訂される場合があります。 その他の注意事項については、使用条件を参照してください。