Hi Mahesh,
Validation should work in this case. I have the same scenario in my project i have used validation for the same:
Prerequisite
BSEG-HKONT IN XXXXX AND
BSEG-KOSTL <> ''
Check
NOT ( BSEG-KOSTL IN ABCD)
Message: Output if prerequisite is met and check is not fullfilled
Account <BSEG-HKONT> should not be posted to Cost center <BSEG-KOSTL> !
Thanks
Bhaskar Basam