Need help populating 1099 for removal of excess after tax contribution

Hello:

Some background:

 

1. I made an excess after-tax contribution of $20647 in Dec 2021.  This amount was rolled-over to a Roth immediately.

 

2. The excess was removed in July (before the October 15th 2021 deadline) and $16442.20 (minus loss of $4204.80) was returned to me. So did not amend the 2021 return since I removed the exces by October 15th 2021.  

 

3. I received a 1099-R from the custodian with $16442.20 (there was a loss) in Box 1 and codes PJ in Box 7 and the rest all empty/unchecked. 

 

My questions:

 

5. Now I need to generate a 1099-R for the excess conribution as the administrator.  Do I enter P or 8 in Box 7? 

 

6. Should be entering in Box 1. Is it $20647 or $16442? Also, do I need to check or fill any other boxes on the 1099? 

 

7. Anything else I need to be doing on my 2022 tax return?

 

Hope dmertz or Champ stops by to respond....Thanks.