If the error specifically for that personnel id, then check the availability of that id in HR master, validity date of the personnel.
Also, discuss with HR consultant on deriving the active personnel from their masters. So that, you can identify the status of that id.