Can not find the desired plan order number
Can we recover deleted plan order?
No, there is no log.
I do not know the purpose of the custom table. However, if your business process depends on the planned order always to exist, then you need to rethink your program logic. Planned orders are VERY temporary, by design.
If you are still in the design phase, you can re write your code to accommodate all the possible things that might go wrong. If you have a one-time error event that you are trying to solve, and you KNOW that there should be a Production order to confirm, you can use the material number, date, and quantity to try to find a matching unconfirmed PO to confirm.
I suspect that the planned order was never converted to a production order. In this case, there would be nothing to confirm in SAP.
You might want to think about loading your planned orders as 'firm'. At least then MRP will not delete them.