Hi Sivaramakrishan,
If there is a field in R3 which tells you that a company is already closed, just filter it in the query..If the company which are already closed still have transactions, just ask your consultants in R3 if the transactions are valid..
Regards,
Loed