Trying to find link between sales invoice and AA code for query

Hi all,


I need to create a report that will allow me to run a receivables trial balance by AA code (as they are classified on the sales invoice). I have been able to identify the table RM00103 to give me the outstanding balances in each aging category as a summary however I need the open transaction detail and am using table RM20101 for this. I cannot find however what table holds the information so that I can link the AA Trn dimension and Trn dimension code back to the document or invoice number.

Any ideas?