You would have to use the ORDOCNUM link batch to the payables document and then the batch ID would be on the payables document record.
select * from two..gl20000 GL
INNER JOIN TWO..PM30200 PM ON GL.ORDOCNUM = PM.DOCNUMBR
where sourcdoc ='PMTRX'
This should get you started.