Updating Leavers’ Tax Records when Issuing P45s 
In addition to issuing a P45 to every employee who leaves your company, you also need to update the Tax Data (infotype 0065) records by entering the date of issue of the P45 and any tax details that have changed. You can do this by running the Sample P45 Slip (RPCP45G0) report. This report not only issues P45 slips, it also gives you the option of running a batch input session to update the tax records of the relevant employees.
Procedure
The report selection screen for the Sample P45 Slip (RPCP45G0) report appears.
Use the matchcode function to find a number you do not know.
Result
The system prints the leavers’ tax and pay information for the current tax year in P45 format, and creates new Tax Data (infotype 0065) records for them at the same time. These records contain an active P45 issued indicator and the date on which the P45 was issued.