Skip to content

KVSFCYPurchaseConsignment#

Procedures#

TransferReqLineToKVSFCYConsignConsumptionLine(Record Requisition Line, Record KVSFCYConsignConsumptionLine, Decimal, Boolean) :#

Summary: Transfers reservation entries from a requisition line to a consignment consumption line for purchase consignment processing. This procedure handles the complex transfer of reservation entries between planning documents and consignment consumption documents, managing both inbound and outbound reservation flows. It validates item consistency, location matching, and quantity relationships between the source requisition line and target consignment consumption line. The procedure supports both complete transfer of all reservations and partial transfer of specific quantities, handling different reservation statuses (reservation, tracking, surplus, prospect) and maintaining proper item tracking relationships. It manages the directional aspects of reservations by swapping inbound/outbound subtypes to reflect the consignment consumption workflow. This enables seamless integration between demand planning and purchase consignment fulfillment by preserving critical reservation data and item tracking information throughout the transfer process.

procedure TransferReqLineToKVSFCYConsignConsumptionLine(var ReqLine: Record "Requisition Line"; var KVSFCYConsignConsumptionLine: Record "KVSFCYConsignConsumptionLine"; TransferQty: Decimal; TransferAll: Boolean): 

Parameters:

  • ReqLine: Source requisition line containing the reservation entries to be transferred from planning to consignment consumption.
  • KVSFCYConsignConsumptionLine: Target consignment consumption line that will receive the transferred reservation entries and item tracking data.
  • TransferQty: Decimal quantity to be transferred when performing partial transfer operations, ignored when TransferAll is true.
  • TransferAll: Boolean flag indicating whether to transfer all reservation entries (true) or only the specified TransferQty amount (false).

Events#

OnBeforeDoPrintPurchHeader(Record KVSFCYConsignConsumptionHeader, Integer, Boolean) :#

Summary: Event before printing consignment consumption header.

[IntegrationEvent(false, false)]
local procedure OnBeforeDoPrintPurchHeader(var KVSFCYConsignConsumptionHeader: Record "KVSFCYConsignConsumptionHeader"; ReportUsage: Integer; var IsPrinted: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYPurchaseConsignment", 'OnBeforeDoPrintPurchHeader', '', false, false)]
local procedure DoSomethingOnBeforeDoPrintPurchHeader(var KVSFCYConsignConsumptionHeader: Record "KVSFCYConsignConsumptionHeader"; ReportUsage: Integer; var IsPrinted: Boolean)
begin
end;

Parameters:

  • KVSFCYConsignConsumptionHeader: The consignment consumption header to print.
  • ReportUsage: The report usage type.
  • IsPrinted: Whether the document has been printed.