cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent help needed - GGB1 substitution and vendor/customer clearing!

Former Member
0 Kudos

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!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You can write ABAP in the RG program to access any table within R/3. But the updates you do will be limited to the BSEG postings and fields. So you should be able to trace the document flow to get the document numbers you want. the s/b an asignment number or a reference doc that you can trace back doc flow.

pls assign points to say thanks.

Former Member
0 Kudos

Maybe to explain a bit more deeper. I need to get document numbers of down payment and invoice which I'm clearing during this transaction. So, problem is that during execution of substitution I don't know this numbers, simply they are not available in it. Only table that I see is BSEG which is being populated with values of clearing document which is being created. If I'm clearing down payment 1500002, with invoice 1700005, during execution of substitution I don't see this document numbers. So, if criterions based on which my substitution should work (in my case if down payment and invoice are in different posting periods) are in this documents, there is no way (as I can see) to check this.

So, it is no problem to make some select statement for BSEG, BKPF or BSIK... but based on what? Any ideas?