This article applies to Microsoft Dynamics NAV for all regions.

Consider the following scenario in Microsoft Dynamics NAV 5.0 Service Pack 1 (SP1):

  • You set the Reservation parameter to "Always" for an item.

  • You have a sales order for the item. Additionally, the ordered quantity for the item is more than the available quantity in the inventory.


In this scenario, when you create a pick by using the available quantity for the item in the pick worksheet, you receive the following error message:

Nothing to handle

Symptoms

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 5.0 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.

Resolution



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 Keys in the Prod. Order Component table (5407) as follows:

    Existing code

    ...
    { ;Status,Prod. Order No.,Routing Link Code,Flushing Method }

    { ;Status,Prod. Order No.,Location Code }

    { ;Item No.,Variant Code,Location Code,Status,Due Date;

    // Delete the following line.
    SumIndexFields=Expected Quantity,Remaining Qty. (Base),Cost Amount,Overhead Amount;
    // End of the deleted line.

    MaintainSIFTIndex=No }

    { ;Status,Prod. Order No.,Prod. Order Line No.,Item Low-Level Code;

    MaintainSQLIndex=No }
    ...

    Replacement code

    ...
    { ;Status,Prod. Order No.,Routing Link Code,Flushing Method }

    { ;Status,Prod. Order No.,Location Code }

    { ;Item No.,Variant Code,Location Code,Status,Due Date;

    // Add the following line.
    SumIndexFields=Expected Quantity,Remaining Qty. (Base),Cost Amount,Overhead Amount,Qty. Picked (Base);
    // End of the added line.

    MaintainSIFTIndex=No }

    { ;Status,Prod. Order No.,Prod. Order Line No.,Item Low-Level Code;

    MaintainSQLIndex=No }
    ...
  2. Change the code in the Fields in the Warehouse Activity Line table (5767) as follows:

    Existing code

    ...
    ERROR(Text015);

    IF "Bin Code" <> '' THEN BEGIN

    CreatePick.CheckReservation(

    // Delete the following lines.
    "Location Code","Source Type","Source Subtype","Source No.",

    "Source Line No.","Source Subline No.","Qty. per Unit of Measure","Qty. to Handle (Base)");
    // End of the deleted lines.

    CreatePick.GetReservationStatus(ReservationExists,ReservedForItemLedgEntry);

    IF ReservationExists AND NOT ReservedForItemLedgEntry THEN

    ERROR(Text016,"Item No.");
    ...

    Replacement code

    ...
    ERROR(Text015);

    IF "Bin Code" <> '' THEN BEGIN

    CreatePick.CheckReservation(

    // Add the following lines.
    AvailableQty,"Location Code","Source Type","Source Subtype","Source No.",

    "Source Line No.","Source Subline No.","Qty. per Unit of Measure",

    "Qty. to Handle","Qty. to Handle (Base)");
    // End of the added lines.



    CreatePick.GetReservationStatus(ReservationExists,ReservedForItemLedgEntry);

    IF ReservationExists AND NOT ReservedForItemLedgEntry THEN

    ERROR(Text016,"Item No.");
    ...
  3. Change the code in the Documentation in the Whse. Management codeunit (5775) as follows:

    Existing code

    ...
    ERROR(Text000);

    END;



    // Delete the following line.
    BEGIN
    // End of the deleted line.

    END.

    }

    }
    ...

    Replacement code

    ...
    ERROR(Text000);

    END;



    // Add the following lines.
    PROCEDURE GetOutboundDocLineQtyOtsdg@3(SourceType@1006 : Integer;SourceSubType@1005 : '0,1,2,3,4,5,6,7,8,9,10';SourceNo@1004 : Code[20];SourceLineNo@1003 : Integer;SourceSubLineNo@1002 : Integer;VAR QtyOutstanding@1001 : Decimal;VAR QtyBaseOutstanding@1000 : Decimal);

    VAR

    WhseShptLine@1009 : Record 7321;

    BEGIN

    WhseShptLine.SETCURRENTKEY("Source Type");

    WhseShptLine.SETRANGE("Source Type",SourceType);

    WhseShptLine.SETRANGE("Source Subtype",SourceSubType);

    WhseShptLine.SETRANGE("Source No.",SourceNo);

    WhseShptLine.SETRANGE("Source Line No.",SourceLineNo);

    IF WhseShptLine.FINDSET THEN BEGIN

    WhseShptLine.CALCSUMS("Qty. Outstanding (Base)","Qty. Outstanding");

    QtyOutstanding := WhseShptLine."Qty. Outstanding";

    QtyBaseOutstanding := WhseShptLine."Qty. Outstanding (Base)";

    END ELSE

    GetSrcDocLineQtyOutstanding(SourceType,SourceSubType,SourceNo,

    SourceLineNo,SourceSubLineNo,QtyOutstanding,QtyBaseOutstanding);

    END;



    PROCEDURE GetSrcDocLineQtyOutstanding@7(SourceType@1006 : Integer;SourceSubType@1005 : '0,1,2,3,4,5,6,7,8,9,10';SourceNo@1004 : Code[20];SourceLineNo@1003 : Integer;SourceSubLineNo@1002 : Integer;VAR QtyOutstanding@1001 : Decimal;VAR QtyBaseOutstanding@1000 : Decimal);

    VAR

    SalesLine@1008 : Record 37;

    PurchaseLine@1009 : Record 39;

    TransferLine@1010 : Record 5741;

    ServiceLine@1012 : Record 5902;

    ProdOrderComp@1013 : Record 5407;

    ProdOrderLine@1014 : Record 5406;

    BEGIN

    CASE SourceType OF

    DATABASE::"Sales Line":

    IF SalesLine.GET(SourceSubType,SourceNo,SourceLineNo) THEN BEGIN

    QtyOutstanding := SalesLine."Outstanding Quantity";

    QtyBaseOutstanding := SalesLine."Outstanding Qty. (Base)";

    END;

    DATABASE::"Purchase Line":

    IF PurchaseLine.GET(SourceSubType,SourceNo,SourceLineNo) THEN BEGIN

    QtyOutstanding := PurchaseLine."Outstanding Quantity";

    QtyBaseOutstanding := PurchaseLine."Outstanding Qty. (Base)";

    END;

    DATABASE::"Transfer Line":

    IF TransferLine.GET(SourceNo,SourceLineNo) THEN

    CASE SourceSubType OF

    0: // Direction = Outbound

    BEGIN

    QtyOutstanding :=

    ROUND(TransferLine."Whse Outbnd. Otsdg. Qty (Base)" / (QtyOutstanding / QtyBaseOutstanding),0.00001);

    QtyBaseOutstanding := TransferLine."Whse Outbnd. Otsdg. Qty (Base)";

    END;

    1: // Direction = Inbound

    BEGIN

    QtyOutstanding :=

    ROUND(TransferLine."Whse. Inbnd. Otsdg. Qty (Base)" / (QtyOutstanding / QtyBaseOutstanding),0.00001);

    QtyBaseOutstanding := TransferLine."Whse. Inbnd. Otsdg. Qty (Base)";

    END;

    END;

    DATABASE::"Service Line":

    IF ServiceLine.GET(SourceSubType,SourceNo,SourceLineNo) THEN BEGIN

    QtyOutstanding := ServiceLine."Outstanding Quantity";

    QtyBaseOutstanding := ServiceLine."Outstanding Qty. (Base)";

    END;

    DATABASE::"Prod. Order Component":

    IF ProdOrderComp.GET(SourceSubType,SourceNo,SourceLineNo,SourceSubLineNo) THEN BEGIN

    QtyOutstanding := ProdOrderComp."Remaining Quantity";

    QtyBaseOutstanding := ProdOrderComp."Remaining Qty. (Base)";

    END;

    DATABASE::"Prod. Order Line":

    IF ProdOrderLine.GET(SourceSubType,SourceNo,SourceLineNo) THEN BEGIN

    QtyOutstanding := ProdOrderLine."Remaining Quantity";

    QtyBaseOutstanding := ProdOrderLine."Remaining Qty. (Base)";

    END;

    ELSE BEGIN

    QtyOutstanding := 0;

    QtyBaseOutstanding := 0;

    END;

    END;

    END;



    BEGIN
    // End of the added lines.

    END.

    }

    }
    ...
  4. Change the code in the CalcLineReservedQtyonInvt function in the WMS Management codeunit (7302) as follows:

    Existing code

    ...
    ReservEntry2.SETRANGE("Lot No.",LotNo);

    IF ReservEntry2.FIND('-') THEN

    REPEAT

    // Delete the following line.
    ReservQtyonInvt := ReservQtyonInvt + ReservEntry2."Quantity (Base)";
    // End of the deleted line.

    UNTIL ReservEntry2.NEXT = 0;

    UNTIL ReservEntry.NEXT = 0;

    EXIT(ReservQtyonInvt);
    ...

    Replacement code

    ...
    ReservEntry2.SETRANGE("Lot No.",LotNo);

    IF ReservEntry2.FIND('-') THEN

    REPEAT

    // Add the following line.
    ReservQtyonInvt := ReservQtyonInvt + ReservEntry2."Quantity (Base)" - ReservEntry2."Reserved Pick & Ship Qty.";
    // End of the added line.

    UNTIL ReservEntry2.NEXT = 0;

    UNTIL ReservEntry.NEXT = 0;

    EXIT(ReservQtyonInvt);
    ...
  5. Change the code in the CreateTempLine function in the Create Pick codeunit (7312) as follows:

    Existing code 1

    ...
    RemQtyToPickBase@1000000002 : Decimal;

    QtyToPickBase@1000000001 : Decimal;

    QtyToTrackBase@1009 : Decimal;

    // Delete the following lines.
    BEGIN

    CheckReservation(

    LocationCode,SourceType,SourceSubType,SourceNo,SourceLineNo,SourceSubLineNo,

    QtyPerUnitofMeasure,TotalQtytoPick);
    // End of the deleted lines.


    RemQtyToPick := TotalQtytoPick;

    RemQtyToPickBase := TotalQtytoPickBase;

    ItemTrackingMgt.CheckWhseItemTrkgSetup(ItemNo,SNRequired,LNRequired,FALSE);
    ...

    Replacement code 1

    ...
    RemQtyToPickBase@1000000002 : Decimal;

    QtyToPickBase@1000000001 : Decimal;

    QtyToTrackBase@1009 : Decimal;

    // Add the following lines.
    QtyBaseMaxAvailToPick@1014 : Decimal;

    BEGIN


    GetLocation(LocationCode);

    IF Location."Directed Put-away and Pick" THEN

    QtyBaseMaxAvailToPick := // Total qty (excl. Receive bin content) that are not assigned to any activity/ order

    CalcTotalQtyOnBinType('',LocationCode,ItemNo,VariantCode) -

    CalcTotalQtyAssgndOnWhse(LocationCode,ItemNo,VariantCode) +

    CalcTotalQtyAssgndOnWhseAct(TempWhseActivLine."Activity Type"::"Put-away",LocationCode,ItemNo,VariantCode) -

    CalcTotalQtyOnBinType(GetBinTypeFilter(0),LocationCode,ItemNo,VariantCode) // Receive area

    ELSE

    QtyBaseMaxAvailToPick :=

    CalcAvailableQty(ItemNo,VariantCode,1) -

    CalcPickQtyAssigned(LocationCode,ItemNo,VariantCode,FromBinCode,TempWhseItemTrkgLine);

    CheckReservation(

    QtyBaseMaxAvailToPick,LocationCode,SourceType,SourceSubType,SourceNo,SourceLineNo,SourceSubLineNo,

    QtyPerUnitofMeasure,TotalQtytoPick,TotalQtytoPickBase);
    // End of the added lines.

    RemQtyToPick := TotalQtytoPick;

    RemQtyToPickBase := TotalQtytoPickBase;

    ItemTrackingMgt.CheckWhseItemTrkgSetup(ItemNo,SNRequired,LNRequired,FALSE);
    ...


    Existing code 2

    ...
    CreateTempItemTrkgLines(ItemNo,VariantCode,QtyToTrackBase);

    END;


    // Delete the following line.
    IF TotalQtytoPick <>0 THEN BEGIN
    // End of the deleted line.

    TempWhseItemTrkgLine.RESET;

    TempWhseItemTrkgLine.SETFILTER("Qty. to Handle",'<> 0');

    IF TempWhseItemTrkgLine.FIND('-') THEN BEGIN
    ...

    Replacement code 2

    ...
    CreateTempItemTrkgLines(ItemNo,VariantCode,QtyToTrackBase);

    END;


    // Add the following line.
    IF TotalQtytoPickBase <> 0 THEN BEGIN
    // End of the added line.

    TempWhseItemTrkgLine.RESET;

    TempWhseItemTrkgLine.SETFILTER("Qty. to Handle",'<>0');

    IF TempWhseItemTrkgLine.FIND('-') THEN BEGIN
    ...
  6. Change the code in the CheckReservation function in the Create Pick codeunit (7312) as follows:

    Existing code 1

    ...
    END;

    END;

    // Delete the following line.
    PROCEDURE CheckReservation@45(LocationCode@1007 : Code[10];SourceType@1005 : Integer;SourceSubType@1004 : '0,1,2,3,4,5,6,7,8,9,10';SourceNo@1003 : Code[20];SourceLineNo@1002 : Integer;SourceSubLineNo@1001 : Integer;QtyPerUnitofMeasure@1000 : Decimal;VAR Quantity@1006 : Decimal);
    // End of the deleted line.

    VAR

    ReservEntry@1010 : Record 337;

    ReservEntry2@1011 : Record 337;
    ...

    Replacement code 1

    ...
    END;

    END;

    // Add the following line.
    PROCEDURE CheckReservation@45(QtyBaseAvailToPick@1009 : Decimal;LocationCode@1007 : Code[10];SourceType@1005 : Integer;SourceSubType@1004 : '0,1,2,3,4,5,6,7,8,9,10';SourceNo@1003 : Code[20];SourceLineNo@1002 : Integer;SourceSubLineNo@1001 : Integer;QtyPerUnitofMeasure@1000 : Decimal;VAR Quant

    ity@1006 : Decimal;VAR QuantityBase@1008 : Decimal);
    // End of the added line.

    VAR

    ReservEntry@1010 : Record 337;

    ReservEntry2@1011 : Record 337;
    ...

    Existing code 2

    ...
    ReservEntry@1010 : Record 337;

    ReservEntry2@1011 : Record 337;

    Quantity2@1012 : Decimal;

    // Delete the following line.
    BEGIN
    // End of the deleted line.

    ReservEntry.SETCURRENTKEY(

    "Source ID","Source Ref. No.","Source Type","Source Subtype",

    "Source Batch Name","Source Prod. Order Line","Reservation Status");
    ...

    Replacement code 2

    ...
    ReservEntry@1010 : Record 337;

    ReservEntry2@1011 : Record 337;

    Quantity2@1012 : Decimal;

    // Add the following lines.
    QtyBaseResvdNotOnILE@1018 : Decimal;

    QtyResvdNotOnILE@1013 : Decimal;

    WhseManagement@1014 : Codeunit 5775;

    SrcDocQtyBaseToBeFilledByInvt@1015 : Decimal;

    SrcDocQtyToBeFilledByInvt@1016 : Decimal;

    QuantityBase2@1019 : Decimal;

    BEGIN

    ReservationExists := FALSE;

    ReservedForItemLedgEntry := FALSE;

    Quantity2 := Quantity;

    QuantityBase2 := QuantityBase;
    // End of the added lines.

    ReservEntry.SETCURRENTKEY(

    "Source ID","Source Ref. No.","Source Type","Source Subtype",

    "Source Batch Name","Source Prod. Order Line","Reservation Status");
    ...

    Existing code 3

    ...
    ReservEntry.SETRANGE("Reservation Status",ReservEntry."Reservation Status"::Reservation);

    IF ReservEntry.FIND('-') THEN BEGIN

    ReservationExists := TRUE;

    // Delete the following line.
    Quantity2 := Quantity;
    // End of the deleted line.

    Quantity := Quantity * QtyPerUnitofMeasure;

    REPEAT

    IF ReservEntry2.GET(ReservEntry."Entry No.",NOT ReservEntry.Positive) AND
    ...

    Replacement code 3

    ...
    ReservEntry.SETRANGE("Reservation Status",ReservEntry."Reservation Status"::Reservation);

    IF ReservEntry.FIND('-') THEN BEGIN

    ReservationExists := TRUE;

    Quantity := Quantity * QtyPerUnitofMeasure;

    REPEAT

    IF ReservEntry2.GET(ReservEntry."Entry No.",NOT ReservEntry.Positive) AND
    ...

    Existing code 4

    ...
    REPEAT

    IF ReservEntry2.GET(ReservEntry."Entry No.",NOT ReservEntry.Positive) AND

    (ReservEntry2."Source Type" <> DATABASE::"Item Ledger Entry")

    // Delete the following lines.
    THEN

    Quantity := Quantity - ReservEntry2."Quantity (Base)";

    UNTIL ReservEntry.NEXT = 0;



    IF Quantity <0 THEN

    Quantity := 0;

    Quantity := ROUND(Quantity / QtyPerUnitofMeasure,0.00001);

    IF Quantity = 0 THEN BEGIN
    // End of the deleted lines.

    GetLocation(LocationCode);

    IF Location."Always Create Pick Line" THEN BEGIN

    ReservedForItemLedgEntry := FALSE;
    ...

    Replacement code 4

    ...
    REPEAT

    IF ReservEntry2.GET(ReservEntry."Entry No.",NOT ReservEntry.Positive) AND

    (ReservEntry2."Source Type" <> DATABASE::"Item Ledger Entry")

    // Add the following lines.
    THEN BEGIN

    QtyBaseResvdNotOnILE += ReservEntry2."Quantity (Base)";

    QtyResvdNotOnILE += ReservEntry2.Quantity;

    END;

    UNTIL ReservEntry.NEXT = 0;

    WhseManagement.GetOutboundDocLineQtyOtsdg(SourceType,SourceSubType,

    SourceNo,SourceLineNo,SourceSubLineNo,SrcDocQtyToBeFilledByInvt,SrcDocQtyBaseToBeFilledByInvt);

    SrcDocQtyBaseToBeFilledByInvt := SrcDocQtyBaseToBeFilledByInvt - QtyBaseResvdNotOnILE;

    SrcDocQtyToBeFilledByInvt := SrcDocQtyToBeFilledByInvt - QtyResvdNotOnILE;



    IF QuantityBase >SrcDocQtyBaseToBeFilledByInvt THEN BEGIN

    QuantityBase := SrcDocQtyBaseToBeFilledByInvt;

    Quantity := SrcDocQtyToBeFilledByInvt;

    END;



    IF QuantityBase <=SrcDocQtyBaseToBeFilledByInvt THEN

    IF QuantityBase >QtyBaseAvailToPick THEN BEGIN

    QuantityBase := QtyBaseAvailToPick;

    Quantity := ROUND(QtyBaseAvailToPick / QtyPerUnitofMeasure,0.00001);

    END;

    IF QuantityBase = 0 THEN BEGIN
    // End of the added lines.

    GetLocation(LocationCode);

    IF Location."Always Create Pick Line" THEN BEGIN

    ReservedForItemLedgEntry := FALSE;
    ...

    Existing code 5

    ...
    IF Location."Always Create Pick Line" THEN BEGIN

    ReservedForItemLedgEntry := FALSE;

    Quantity := Quantity2;

    END;

    END ELSE

    ReservedForItemLedgEntry := TRUE;
    ...

    Replacement code 5

    ...
    IF Location."Always Create Pick Line" THEN BEGIN

    ReservedForItemLedgEntry := FALSE;

    Quantity := Quantity2;

    // Add the following line.
    QuantityBase := QuantityBase2;
    // End of the added line.

    END;

    END ELSE

    ReservedForItemLedgEntry := TRUE;
    ...
  7. Change the code in the Documentation function in the Create Pick codeunit (7312) as follows:

    Existing code

    ...
    EXIT(xReservedQty > Item."Reserved Qty. on Inventory");

    END;

    // Delete the following line.
    BEGIN
    // End of the deleted line.

    END.

    }

    }
    ...

    Replacement code

    ...
    EXIT(xReservedQty >Item."Reserved Qty. on Inventory");

    END;



    // Add the following lines.
    PROCEDURE CalcTotalQtyAssgndOnWhse@1102601005(LocationCode@1002 : Code[10];ItemNo@1003 : Code[20];VariantCode@1004 : Code[10]) : Decimal;

    VAR

    WhseShipmentLine@1010 : Record 7321;

    ProdOrderComp@1011 : Record 5407;

    QtyAssgndToWhseAct@1012 : Decimal;

    QtyAssgndToShipment@1013 : Decimal;

    QtyAssgndToProdComp@1014 : Decimal;

    BEGIN

    QtyAssgndToWhseAct +=

    CalcTotalQtyAssgndOnWhseAct(TempWhseActivLine."Activity Type"::" ",LocationCode,ItemNo,VariantCode);

    QtyAssgndToWhseAct +=

    CalcTotalQtyAssgndOnWhseAct(TempWhseActivLine."Activity Type"::"Put-away",LocationCode,ItemNo,VariantCode);

    QtyAssgndToWhseAct +=

    CalcTotalQtyAssgndOnWhseAct(TempWhseActivLine."Activity Type"::Pick,LocationCode,ItemNo,VariantCode);

    QtyAssgndToWhseAct +=

    CalcTotalQtyAssgndOnWhseAct(TempWhseActivLine."Activity Type"::Movement,LocationCode,ItemNo,VariantCode);

    QtyAssgndToWhseAct +=

    CalcTotalQtyAssgndOnWhseAct(TempWhseActivLine."Activity Type"::"Invt. Put-away",LocationCode,ItemNo,VariantCode);

    QtyAssgndToWhseAct +=

    CalcTotalQtyAssgndOnWhseAct(TempWhseActivLine."Activity Type"::"Invt. Pick",LocationCode,ItemNo,VariantCode);



    WITH WhseShipmentLine DO BEGIN

    SETCURRENTKEY("Item No.","Location Code","Variant Code","Due Date");

    SETRANGE("Location Code",LocationCode);

    SETRANGE("Item No.",ItemNo);

    SETRANGE("Variant Code",VariantCode);

    CALCSUMS("Qty. Picked (Base)");

    QtyAssgndToShipment := "Qty. Picked (Base)";

    END;



    WITH ProdOrderComp DO BEGIN

    SETCURRENTKEY("Item No.","Variant Code","Location Code",Status,"Due Date");

    SETRANGE("Location Code",LocationCode);

    SETRANGE("Item No.",ItemNo);

    SETRANGE("Variant Code",VariantCode);

    CALCSUMS("Qty. Picked (Base)");

    QtyAssgndToProdComp := "Qty. Picked (Base)";

    END;



    EXIT(QtyAssgndToWhseAct + QtyAssgndToShipment + QtyAssgndToProdComp);

    END;



    PROCEDURE CalcTotalQtyAssgndOnWhseAct@1102601006(ActivityType@1003 : Option;LocationCode@1004 : Code[10];ItemNo@1005 : Code[20];VariantCode@1006 : Code[10]) : Decimal;

    VAR

    WhseActivLine@1002 : Record 5767;

    BEGIN

    WITH WhseActivLine DO BEGIN

    SETCURRENTKEY(

    "Item No.","Location Code","Activity Type","Bin Type Code",

    "Unit of Measure Code","Variant Code","Breakbulk No.","Action Type");

    SETRANGE("Location Code",LocationCode);

    SETRANGE("Item No.",ItemNo);

    SETRANGE("Variant Code",VariantCode);

    SETRANGE("Activity Type",ActivityType);

    SETRANGE("Breakbulk No.",0);

    SETFILTER("Action Type",'%1|%2',"Action Type"::" ","Action Type"::Take);

    CALCSUMS("Qty. Outstanding (Base)");

    EXIT("Qty. Outstanding (Base)");

    END;

    END;



    PROCEDURE CalcTotalQtyOnBinType@1102601007(BinTypeFilter@1004 : Text[1024];LocationCode@1003 : Code[10];ItemNo@1002 : Code[10];VariantCode@1001 : Code[10]) : Decimal;

    VAR

    WhseEntry@1000 : Record 7312;

    BEGIN

    WITH WhseEntry DO BEGIN

    SETCURRENTKEY("Item No.","Location Code","Variant Code","Bin Type Code");

    SETRANGE("Item No.",ItemNo);

    SETRANGE("Location Code",LocationCode);

    SETRANGE("Variant Code",VariantCode);

    IF BinTypeFilter <>'' THEN

    SETFILTER("Bin Type Code",BinTypeFilter);

    CALCSUMS("Qty. (Base)");

    EXIT("Qty. (Base)");

    END;

    END;
    // End of the added lines.

    }

    }
    ...


Prerequisites

You must have the in the Microsoft Dynamics NAV 5.0 SP1 installed to apply this hotfix.

Removal information

You cannot remove this hotfix.

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

Status

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.

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Thank you for your feedback!

×