Code P indicates that the taxpayer contributed more than allowed to a 401k, IRA, etc. (through payroll withholding), and must include the excess contributions as income for the year in which the contributions were made. If the excess contributions have not already been claimed in that year, the return would need to be amended to include the excess distribution as income.
If the taxpayer has already included the excess contribution on their tax return of that year, they would not need to do an amended return, and can ignore the Form 1099-R received in the current year.
See Form 1099-R Instructions for Code P for more information.
To avoid the need to amend the return a year after the fact (if you already know you will be receiving a Form 1099-R next year with a Code P), include the data in the tax return in the current year with a Code 8. You can then ignore the Form 1099-R with the Code P when you receive it a year later. Code 8 indicates that the amount is taxable in the tax return you are currently working on, and Code P indicates the amount is taxable in the prior tax year.