Before saving the PO I have included some conditions.
I am checking the cost center based on the company code.
If Cost center is belogs to particular company code I should allow the user to save PO otherwise should display error message to the user.
I have included the logic in corresponding exit.
I am able to get the error message but If I am trying to save the PO again its givin short dump with message "ITAB DUPLICATE ENTRIES".
Please help me to come out of this problem.