local procedure CreateReservationEntry(SalesLine: Record /Sales Line/)
var
TempReservationEntry: Record /Reservation Entry/ temporary;
TempTrackingSpecification: Record /Tracking Specification/ temporary;
UnitofMeasureManagement: Codeunit /Unit of Measure Management/;
CreateReservEntry: Codeunit /Create Reserv. Entry/;
QtyToAssign: Decimal;
QtyToAssignBase: Decimal;
begin
QtyToAssign := SalesLine./Outstanding Quantity/;
QtyToAssignBase := UnitofMeasureManagement.CalcBaseQty(QtyToAssign, SalesLine./Qty. per Unit of Measure/);
TempReservationEntry./Lot No./ := 'TEST';
CreateReservEntry.CreateReservEntryFor(Database::/Sales Line/, SalesLine./Document Type/.AsInteger(), SalesLine./Document No./, '', 0,
SalesLine./Line No./, SalesLine./Qty. per Unit of Measure/, QtyToAssign, QtyToAssignBase, TempReservationEntry);
begin
CreateReservEntry.CreateEntry(SalesLine./No./, SalesLine./Variant Code/, SalesLine./Location Code/, SalesLine.Description, 0D,
SalesLine./Shipment Date/, 0, Enum::/Reservation Status/::Surplus);
end;
end;