>Moises,
>
>Put
>
>
>SELECT ped1
>
>
>before the ENDSCAN
>
It's not actually necessary to reselect the area you're scanning before the end of the loop. SCAN knows what work area it's using and will automatically reselect. Similarly, you don't have to GO TOP before SCAN (unless you're using SCAN WHILE).
Tamar