Hi Ozair,
When you are uploading through the payment lot change, add in a extra functionality, where in for each contract account it will trigger the FM FKK_ACCOUNT_BALANCE_COMPUTE.
Once done, if the export parameter E_SUM_OPENITEMS of the FM is not matching with the amount against the contract account in the file, then delete that record from further processing.
You can write a log for the unprocessed records and then check it manually.
Once the above check is done, only then proceed forward to post the payment lot.
The only scenario, I am thinking-off will not be catered with the above logic is;say there are two outstanding invoices-$ 50 and $200..Customer make a payment for 200 and not the 50. Then it be a mismatch and will have to be checked manually.Is this a valid scenario in you Business context?
Hope it helps...
Thanks,
Amlan