saleshdr.SETRANGE("No.",SLine."Document No.");
IF saleshdr.FINDSET() THEN BEGIN
REPEAT
recItem.RESET;
recItem.SETRANGE("No.",SLine."No."); // ETDdate := dateformula field.. & First approval Date := date field ..
IF recItem.FINDSET() THEN BEGIN
ETDdate := recItem."Lead Time Calculation";
Sline.ETD := CALCDATE(saleshdr."First approval date", ETDdate);
SLine.MODIFY;
END;
UNTIL SLine.NEXT = 0;
END;