Hi Mona
Are you looking at the customer posting? generally the trading partner will be determined from the customer master and populated in all the items. Do you not have a seperate recon account and customer group for I/C transactions? If yes, than you do not need any validation and in VKOA you can assign a separate GL Account for I/C Postings. I would suggest to go for this kind of set up.
However, if that is not possible and the same customer group is used for both third party and I/C postings, than you should create a simple validation using an user exit.
Essentially, you have to read the trading partner from customer master and check if the value in customer master general data tab is blank. If yes, than for the revenue GL Accounts, the value of trading account is also blank. If not, system should throw an error and should not allow the accounting document to be created.
Thanks & regards
Sanil Bhandari