Hi,
I believe your issue is caused due to database inconsistency, so no note implementaion can solve this. That's why I suggest you read the wiki page to do troubleshooting to identify the missing entries in which table. Anyway, if you can't solve this from your side, I suggest you report incident to SAP since this is not easy to solve.
BR,
Ivy