Urgent help needed - GGB1 substitution and vendor/customer clearing!
Problem is following, I need to create substitution to change tax account and tax code during clearing of vendor or customer documents, and rule is if downpayment and invoice are in two different periods, use account xxx insead yyy. So, I used standard RG... program to create it, but I have following issue; during execution of transaction FB1K or FB1D, I don't have transfered document numbers of invoice and downpayment which I try to clear in RG... report. In fact, only table which I can access is BSEG and only data are data of clearing document which is being created. So, is there any user exit, badi, anything, which I could use to fetch document numbers of documents which I'm trying to clear.
I would really apreciate any kind of help or hint!