PO number check across all order types
I have a specific requirement from my client regarding PO number.
I understand that we can check with respect to a document type that whether a PO number already exists (lets say, i created an order with a PO and it can be informed when i try to create another order with the same PO). But, my client wants to check whether a sales document (irrespective of order type) is created generated already with the same PO across all order types (in this case, first an order is created with a PO, and the system should inform if the end user tries to create a debit memo with the same PO). Hope I am clear.
Any suggestion is appreciated. It is required to find solution immediately.
Thanks in advance.