Hi
I am still not clear on your requirement. But if you want to write a validation on any of the above t codes above, post a transaction and after that pass in BKPF the document no to get the value of TCODE field from BKPF. Now you can write a validation of giving this field as a prerequisite.
In addition to that, you have talked about substituion during partial clearing in Reference 1 field. But it is not clear what exactly you want to do.
regards
Sanil Bhandari