How to restrict posting of an invoice against PO if invoicing is already done
The scenario is The invoice creation is and parking is being handled via Interface where vendor details , PO Number and invoice amount (Header) is passed.
I am using bapi_incominginvoice_park to park the invoice.
For the invoice line items amount and quantity , the calculation is being handled through PO history table : EKBE.
The Issue is , if the same PO is passed through Interface twice , the Invoice takes into account the amount and quantity again.
How can i restrict taking into account the quantity and amount already invoiced?
As i have a workflow attached which is linked with Invoice Park Event : (BUS2081 - Parked) So as soon as an invoice is parked a workflow is triggered and if the balance is within tolerance the invoice gets posted automatically through post bapi..
Issue is : Multiple invoice can be posted for the same PO which may lead to paying vendor for same PO more than one.
Would be grateful if someone could guide on how can this situation be avoided.