Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

An item is not reserved against item ledger entries that are created for the item as expected if you set the Always value in the Reserve field in the item in Microsoft Dynamics NAV


View products that this article applies to.

This article applies to Microsoft Dynamics NAV for all countries and all language locales.

↑ Back to the top


Symptoms

Assume that you have an item in which the Reserve value is set to Always in Microsoft Dynamics NAV. When you create a production order for the item, the item is not reserved against item ledger entries that are created for the item as expected.
Note In this situation, the item is reserved against purchase orders that are created for the item.
This problem occurs in the following products:
  • Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)
  • Microsoft Dynamics NAV 2009
  • Microsoft Dynamics NAV 5.0 Service Pack 1 (SP1)
  • Microsoft Dynamics NAV 5.0

↑ Back to the top


Cause

This problem occurs because the reserved quantity in item ledger entries are not calculated when the system reserves a line automatically.

↑ Back to the top


Resolution

Hotfix information

A supported hotfix is now available from Microsoft. However, it is only intended to correct the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft Dynamics NAV service pack or the next Microsoft Dynamics NAV version that contains this hotfix.

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Technical Support Professional for Microsoft Dynamics and related products determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

↑ Back to the top




Installation information

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

Note Before you install this hotfix, verify that all Microsoft Navision client users are logged off the system. This includes Microsoft Navision Application Services (NAS) client users. You should be the only client user who is logged on when you implement this hotfix.

To implement this hotfix, you must have a developer license.

We recommend that the user account in the Windows Logins window or in the Database Logins window be assigned the "SUPER" role ID. If the user account cannot be assigned the "SUPER" role ID, you must verify that the user account has the following permissions:
  • The Modify permission for the object that you will be changing.
  • The Execute permission for the System Object ID 5210 object and for the System Object ID 9015 object.


Note You do not have to have rights to the data stores unless you have to perform data repair.

Code changes

Note Always test code fixes in a controlled environment before you apply the fixes to your production computers.
To resolve this problem, follow these steps:
  1. Change the code in the SetSalesLine function in the Reservation Management codeunit (99000845) as follows:
    Existing code
    ...
    SetPointerFilter(CalcReservEntry2);

    // Delete the following lines.
    IF (CalcReservEntry."Location Code" <> '') AND
    Location.GET(CalcReservEntry."Location Code") AND
    (Location."Bin Mandatory" OR Location."Require Pick")
    THEN
    CalcReservedQtyOnPick(TotalAvailQty,QtyAllocInWhse);
    // End of the lines.

    END;

    PROCEDURE SetReqLine@13(NewReqLine@1000 : Record 246);
    ...
    Replacement code
    ...
    SetPointerFilter(CalcReservEntry2);

    // Add the following line.
    CallCalcReservedQtyOnPick;

    END;

    PROCEDURE SetReqLine@13(NewReqLine@1000 : Record 246);
    ...
  2. Change the code in the SetReqLine function in the Reservation Management codeunit (99000845) as follows:
    Existing code
    ...
    GetItemSetup(CalcReservEntry);
    SetPointerFilter(CalcReservEntry2);
    END;

    PROCEDURE SetPurchLine@2(NewPurchLine@1000 : Record 39);
    ...
    Replacement code
    ...
    GetItemSetup(CalcReservEntry);

    SetPointerFilter(CalcReservEntry2);

    // Add the following line.
    CallCalcReservedQtyOnPick;

    END;

    PROCEDURE SetPurchLine@2(NewPurchLine@1000 : Record 39);
    ...
  3. Change the code in the SetPurchLine function in the Reservation Management codeunit (99000845) as follows:
    Existing code
    ...
    ((CreateReservEntry.SignFactor(CalcReservEntry) * ForPurchLine."Outstanding Qty. (Base)") < 0);

    SetPointerFilter(CalcReservEntry2);
    END;

    PROCEDURE SetItemJnlLine@3(NewItemJnlLine@1000 : Record 83);
    ...
    Replacement code
    ...
    ((CreateReservEntry.SignFactor(CalcReservEntry) * ForPurchLine."Outstanding Qty. (Base)") < 0);

    SetPointerFilter(CalcReservEntry2);

    // Add the following line.
    CallCalcReservedQtyOnPick;

    END;

    PROCEDURE SetItemJnlLine@3(NewItemJnlLine@1000 : Record 83);
  4. Change the code in the SetItemJnlLine function in the Reservation Management codeunit (99000845) as follows:
    Existing code
    ...
    ((CreateReservEntry.SignFactor(CalcReservEntry) * ForItemJnlLine."Quantity (Base)") < 0);

    SetPointerFilter(CalcReservEntry2);
    END;

    PROCEDURE SetProdOrderLine@9(NewProdOrderLine@1000 : Record 5406);
    ...
    Replacement code
    ...
    ((CreateReservEntry.SignFactor(CalcReservEntry) * ForItemJnlLine."Quantity (Base)") < 0);

    SetPointerFilter(CalcReservEntry2);

    // Add the following line.
    CallCalcReservedQtyOnPick;

    END;

    PROCEDURE SetProdOrderLine@9(NewProdOrderLine@1000 : Record 5406);
    ...
  5. Change the code in the SetProdOrderLine function in the Reservation Management codeunit (99000845) as follows:
    Existing code
    ...
    Positive := ForProdOrderLine."Remaining Qty. (Base)" < 0;

    SetPointerFilter(CalcReservEntry2);
    END;

    PROCEDURE SetProdOrderComponent@11(NewProdOrderComp@1000 : Record 5407);
    ...
    Replacement code
    ...
    Positive := ForProdOrderLine."Remaining Qty. (Base)" < 0;

    SetPointerFilter(CalcReservEntry2);

    // Add the following line.
    CallCalcReservedQtyOnPick;

    END;

    PROCEDURE SetProdOrderComponent@11(NewProdOrderComp@1000 : Record 5407);
  6. Change the code in the SetProdOrderComponent function in the Reservation Management codeunit (99000845) as follows:
    Existing code
    ...
    Positive := ForProdOrderComp."Remaining Qty. (Base)" > 0;

    SetPointerFilter(CalcReservEntry2);
    END;

    PROCEDURE SetPlanningComponent@12(NewPlanningComponent@1000 : Record 99000829);
    ...
    Replacement code
    ...
    Positive := ForProdOrderComp."Remaining Qty. (Base)" > 0;

    SetPointerFilter(CalcReservEntry2);

    // Add the following line.
    CallCalcReservedQtyOnPick;

    END;

    PROCEDURE SetPlanningComponent@12(NewPlanningComponent@1000 : Record 99000829);
    ...
  7. Change the code in the SetPlanningComponent function in the Reservation Management codeunit (99000845) as follows:
    Existing code
    ...
    Positive := ForPlanningComponent."Net Quantity (Base)" > 0;

    SetPointerFilter(CalcReservEntry2);
    END;

    PROCEDURE SetItemLedgEntry@34(NewItemLedgEntry@1000 : Record 32);
    ...
    Replacement code
    ...
    Positive := ForPlanningComponent."Net Quantity (Base)" > 0;

    SetPointerFilter(CalcReservEntry2);

    // Add the following line.
    CallCalcReservedQtyOnPick;

    END;

    PROCEDURE SetItemLedgEntry@34(NewItemLedgEntry@1000 : Record 32);
    ...
  8. Change the code in the SetItemLedgEntry function in the Reservation Management codeunit (99000845) as follows:
    Existing code
    ...
    GetItemSetup(CalcReservEntry);

    SetPointerFilter(CalcReservEntry2);
    END;

    PROCEDURE SetTransferLine@47(NewTransLine@1000 : Record 5741;Direction@1001 : 'Outbound,Inbound');
    ...
    Replacement code
    ...
    GetItemSetup(CalcReservEntry);

    SetPointerFilter(CalcReservEntry2);

    // Add the following line.
    CallCalcReservedQtyOnPick;

    END;

    PROCEDURE SetTransferLine@47(NewTransLine@1000 : Record 5741;Direction@1001 : 'Outbound,Inbound');
    ...
  9. Change the code in the SetTransferLine function in the Reservation Management codeunit (99000845) as follows:
    Existing code
    ...
    GetItemSetup(CalcReservEntry);

    SetPointerFilter(CalcReservEntry2);
    END;

    PROCEDURE SetServLine@48(NewServiceInvLine@1000 : Record 5902);
    ...
    Replacement code
    ...
    GetItemSetup(CalcReservEntry);

    SetPointerFilter(CalcReservEntry2);

    // Add the following line.
    CallCalcReservedQtyOnPick;

    END;

    PROCEDURE SetServLine@48(NewServiceInvLine@1000 : Record 5902);
    ...
  10. Change the code in the SetServLine function in the Reservation Management codeunit (99000845) as follows:
    Existing code
    ...
    SetPointerFilter(CalcReservEntry2);

    // Delete the following lines.
    IF (CalcReservEntry."Location Code" <> '') AND
    Location.GET(CalcReservEntry."Location Code") AND
    (Location."Bin Mandatory" OR Location."Require Pick")
    THEN
    CalcReservedQtyOnPick(TotalAvailQty,QtyAllocInWhse);
    // End of the lines.

    END;

    PROCEDURE SetBOMJnlLine@61(NewBOMJnlLine@1000 : Record 89);
    Replacement code
    ...
    SetPointerFilter(CalcReservEntry2);

    // Add the following line.
    CallCalcReservedQtyOnPick;

    END;

    PROCEDURE SetBOMJnlLine@61(NewBOMJnlLine@1000 : Record 89);
    ...
  11. Change the code in the SetBOMJnlLine function in the Reservation Management codeunit (99000845) as follows:
    Existing code
    ...
    ((CreateReservEntry.SignFactor(CalcReservEntry) * ForBOMJnlLine."Quantity (Base)") < 0);

    SetPointerFilter(CalcReservEntry2);
    END;

    PROCEDURE SetJobJnlLine@20(NewJobJnlLine@1000 : Record 210);
    ...
    Replacement code
    ...
    ((CreateReservEntry.SignFactor(CalcReservEntry) * ForBOMJnlLine."Quantity (Base)") < 0);

    SetPointerFilter(CalcReservEntry2);

    // Add the following line.
    CallCalcReservedQtyOnPick;

    END;

    PROCEDURE SetJobJnlLine@20(NewJobJnlLine@1000 : Record 210);
    ...
  12. Change the code in the SetJobJnlLine function in the Reservation Management codeunit (99000845) as follows:
    Existing code
    ...
    ((CreateReservEntry.SignFactor(CalcReservEntry) * ForJobJnlLine."Quantity (Base)") < 0);

    SetPointerFilter(CalcReservEntry2);
    END;

    PROCEDURE SalesLineUpdateValues@54(VAR CurrentSalesLine@1000 : Record 37;VAR QtyToReserve@1001 : Decimal;VAR QtyReservedThisLine@1002 : Decimal);
    ...
    Replacement code
    ...
    ((CreateReservEntry.SignFactor(CalcReservEntry) * ForJobJnlLine."Quantity (Base)") < 0);

    SetPointerFilter(CalcReservEntry2);

    // Add the following line.
    CallCalcReservedQtyOnPick;

    END;

    PROCEDURE SalesLineUpdateValues@54(VAR CurrentSalesLine@1000 : Record 37;VAR QtyToReserve@1001 : Decimal;VAR QtyReservedThisLine@1002 : Decimal);
    ...
  13. Change the code in the CallCalcReservedQtyOnPick function in the Reservation Management codeunit (99000845) as follows:
    Existing code
    ...
    CreateReservEntry2.CreateRemainingReservEntry(SurplusEntry,QtyToSave);
    END;

    BEGIN
    END.
    }
    ...
    Replacement code
    ...
    CreateReservEntry2.CreateRemainingReservEntry(SurplusEntry,QtyToSave);
    END;

    // Add the following lines.
    PROCEDURE CallCalcReservedQtyOnPick@104();
    BEGIN
    IF Positive AND
    (CalcReservEntry."Location Code" <> '') AND
    Location.GET(CalcReservEntry."Location Code") AND
    (Location."Bin Mandatory" OR Location."Require Pick")
    THEN
    CalcReservedQtyOnPick(TotalAvailQty,QtyAllocInWhse);
    END;
    // End of the lines.

    BEGIN
    END.
    }
    ...

Prerequisites

You must have one of the following products installed to apply this hotfix:
  • Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)
  • Microsoft Dynamics NAV 2009
  • Microsoft Dynamics NAV 5.0 Service Pack 1 (SP1)
  • Microsoft Dynamics NAV 5.0

Removal information

You cannot remove this hotfix.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

↑ Back to the top


Keywords: kb, kbmbspartner, kbmbscodefix, kbmbsquickpub, kbmbsmigrate, kbsurveynew, kbnoloc, kbqfe

↑ Back to the top

Article Info
Article ID : 2451419
Revision : 2
Created on : 9/25/2018
Published on : 9/25/2018
Exists online : False
Views : 313