ItemLedgEntryNo := ItemLedgEntryNo + 1;
WITH ItemJnlLine DO BEGIN
ItemLedgEntry.INIT;
ItemLedgEntry.“Entry No.” := ItemLedgEntryNo;
ItemLedgEntry.“Item No.” := “Item No.”;
ItemLedgEntry.“Posting Date” := “Posting Date”;
ItemLedgEntry.“Document Date” := “Document Date”;
ItemLedgEntry.“Entry Type” := “Entry Type”;
ItemLedgEntry.“Source No.” := “Source No.”;
ItemLedgEntry.“Document No.” := “Document No.”;
ItemLedgEntry.“Transfer Order No.” := “Transfer Order No.”;
ItemLedgEntry.“External Document No.” := “External Document No.”;
ItemLedgEntry.“External Document No2” := “External Document No2”;
ItemLedgEntry.IntDoc := IntDoc;
ItemLedgEntry.Description := Description;
ItemLedgEntry.“Location Code” := “Location Code”;
ItemLedgEntry.“Applies-to Entry” := “Applies-to Entry”;
ItemLedgEntry.“Source Type” := “Source Type”;
ItemLedgEntry.“Transaction Type” := “Transaction Type”;
ItemLedgEntry.“Transport Method” := “Transport Method”;
ItemLedgEntry.“Country Code” := “Country Code”;
ItemLedgEntry.“Entry/Exit Point” := “Entry/Exit Point”;
ItemLedgEntry.Area := Area;
ItemLedgEntry.“Transaction Specification” := “Transaction Specification”;
ItemLedgEntry.“Drop Shipment” := “Drop Shipment”;
ItemLedgEntry.“No. Series” := “Posting No. Series”;
{IF ItemLedgEntry.Description = Item.Description THEN
ItemLedgEntry.Description := ‘’;} //#1 SIS01.01
ItemLedgEntry.“Prod. Order No.” := “Prod. Order No.”;
ItemLedgEntry.“Prod. Order Line No.” := “Prod. Order Line No.”;
ItemLedgEntry.“Prod. Order Comp. Line No.” := “Prod. Order Comp. Line No.”;
ItemLedgEntry.“Variant Code” := “Variant Code”;
ItemLedgEntry.“Unit of Measure Code” := “Unit of Measure Code”;
ItemLedgEntry.“Qty. per Unit of Measure” := “Qty. per Unit of Measure”;
ItemLedgEntry.“Derived from Blanket Order” := “Derived from Blanket Order”;
ItemLedgEntry.“Cross-Reference No.” := “Cross-Reference No.”;
ItemLedgEntry.“Originally Ordered No.” := “Originally Ordered No.”;
ItemLedgEntry.“Originally Ordered Var. Code” := “Originally Ordered Var. Code”;
ItemLedgEntry.“Out-of-Stock Substitution” := “Out-of-Stock Substitution”;
ItemLedgEntry.“Item Category Code” := “Item Category Code”;
ItemLedgEntry.Nonstock := Nonstock;
ItemLedgEntry.“Purchasing Code” := “Purchasing Code”;
ItemLedgEntry.“Return Reason Code” := “Return Reason Code”;
ItemLedgEntry.“Product Group Code” := “Product Group Code”;
ItemLedgEntry.“Serial No.” := “Serial No.”;
ItemLedgEntry.“Lot No.” := “Lot No.”;
ItemLedgEntry.“Warranty Date” := “Warranty Date”;
ItemLedgEntry.“Expiration Date” := “Expiration Date”;
IF “Entry Type” IN
[“Entry Type”::Sale,
“Entry Type”::“Negative Adjmt.”,
“Entry Type”::Transfer,
“Entry Type”::Consumption]
THEN BEGIN
ItemLedgEntry.Quantity := -Quantity;
ItemLedgEntry.“Invoiced Quantity” := -“Invoiced Quantity”;
END ELSE BEGIN
ItemLedgEntry.Quantity := Quantity;
ItemLedgEntry.“Invoiced Quantity” := “Invoiced Quantity”;
END;
END;
the field that i’m talking about are External Document No2