Code P indicates that the taxpayer contributed more than allowed to a 401k, IRA, etc. through payroll withholding.
Excess contributions must be included as income for the year in which the contributions were made. If the excess contributions haven’t already been claimed in that year, the return will need to be amended to include the excess distribution as income.
If the taxpayer has included the excess contribution on his or her tax return, there is no need to complete an amended return and the Form 1099-R received in the current year can be ignored.
If you know you’ll be receiving a Form 1099-R next year with a Code P and want to avoid the need to amend a return, 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.)
See IRS Form 1099-R Instructions for Code P for more information.