I have the same problem too. multiple lines of PR cannot generate as one PO because different ledger in line.
I try to update the record based on SourceDocumentLine of PurchReqline in accountingDistribution, and it work for me.
Select the recID in accountingDistribution with the following query :
select a.recid, ACCOUNTINGDISTRIBUTIONTEMPLATE, a.SourceDocumentLine,b.SourceDocumentheader,
PurchReqId, DEFAULTDIMENSION , b.LEDGERDIMENSION, b.recid from purchreqline as a
left join accountingDistribution as b on a.SOURCEDOCUMENTLINE = b.SOURCEDOCUMENTLINE
where purchreqtable ='5637208768'