>Hello there.
>
>I think you donno the behaviour of SCAN..ENDSCAN
>
>YOU SHOULD NEVER SELECT OTHER WORKAREA within the scope of scan..endscan
>
>This will work fine when the work area never change.
I think you need to check reality - SCAN...ENDSCAN will automatically reselect the proper work area.
I might try issuing TABLEUPDATE() after each loop - the problem appears to be a collision between updates submitted against the two tables colliding and not arbitrating as expected.