Hi Yash,
In t-code OB28 ( Vlidations ) you can define pre-requisities, checks to be done and warning and error message as per your requirement.
Validation can be defined at Header level, Item level and complete document level.
In your case You can define validation and item level.
While defining validations you can use System tables, BKPF and BSEG tables. If logic or requirement is complex then you can use available exits also.
IN pre-requisities you can define in pre-requisities ( Company code and T-code combination)
In check you can check if business area pertains to co code. AS per result you can give error message.
If business ares are more then you can create Sets (GS01) for both co code business area and use the same in validations.
Hope this helps.
Thanks,
Saurabh