GetItem(IcodItemNo : Code[20];VAR OrecItem : Record Item) // GetItem // Gets the item in "tmpItem" // PARAMETERS: // IcodItemNo : item no to get // OrecItem : record in which the item will be put IF tmpitem."No." <> IcodItemNo then IF not tmpitem.get(IcodItemNo) THEN begin recItem.get(IcodItemNo); tmpitem := recItem; tmpitem.insert(FALSE); end; OrecItem := tmpitem;-"tmpItem" is a global temptable on T27:"Item".
recItemLedgerEntry.RESET; recItemLedgerEntry.SETCURRENTKEY+SETRANGE+SETFILTER; IF recItemLedgerEntry.FIND('-') THEN REPEAT GetItem(recItemLedgerEntry."Item No.",LrecItem); //LrecItem is a local variable ... UNTIL recItemLedgerEntry.NEXT = 0;