There are at times where the PR / PO is created but deleted it for various reasons be it from MM or SRM side, but its associated commitment doesn’t reverse / clear it off from SAP table level (COOI / COSP), may be due to a bug in the standard program. Though there are various SAP notes mentioned, but would like to highlight here two important steps which would be helpful for you to resolve this issue quickly.
Step 1: Execute RKACOR04 in SE38 transaction code:
Here enter controlling area, object number (get this number from RKACSHOW or from the relevant master table say PRPS for WBS element).
Enter fiscal year and period (if required) and by default logical system checkbox is checked and select checkbox commitments. Execute it first in test mode without “update” checkbox.
It would show the negative or wrong commitment in total records column with the relevant year, value type, cost element, business transaction etc. It would show two main tables here – COOI in items column and COSP in totals column and the wrong or negative value record will show as say 1 in COSP and will show as 0 in COOI, which represents that this value was not cleared / reversed in COSP table.
Upon checking in test mode, now execute in update mode by selecting “update” checkbox and once executed, it would show the number of document lines / records updated.
Step 2: Execute CJEN transaction code (for WBS):
This will reconstruct the project database and will remove the negative or wrong commitments from the project / wbs structure.
Proceed with WBS element transaction or put it as CLSD as appropriate and it will not throw any error message.
Note: This is purely based on my current project experience and I executed these two steps and the issue got resolved completely.