rTransfer.RESET; rTransfer.SETRANGE(rTransfer.Section,pTransfer.Section::S1); rTransfer.SETRANGE(rTransfer.Transfer,FALSE); rTransfer.SETRANGE(rTransfer.Marked,TRUE); IF rTransfer.FIND('-') THEN BEGIN REPEAT //Here, code fill in Table 83 and Register "Item Reclass. Journal UNTIL rTransfer.NEXT = 0; //Here is the problem. ********* IF rTransfer.FIND('-') THEN REPEAT rTransfer.Transfer := TRUE; rTransfer.Doc := DocNum; rTransfer.Date := WORKDATE; rTransfer.Time := TIME; rTransfer.MODIFY; UNTIL rTransfer.NEXT = 0; //***************Why the last REPEAT only Modify first record??
Answers
In your loop you modify
which is part of your filter as FALSE;
This modification messes the sort order and as a result some records are skipped.
If your version id >= 4.x where you have FINDSET available as a command then you should study the doc for this and use it specifying that you are about to modify key values.
If your version does not supprt that then you could try the following:
I think that if you add the above line it changes the value temporarily to keep the correct sorting order but since it is AFTER the MODIFY the change is not applied.
Have a go with this and let us know if it was helpful.
Regards.
Like example in Nav Help.
Best Regards
Please set it yourself, the next time one of your questions is solved:
Sorry Luc. Next time i will make it!
BR