GLTrans - PO Line/MAInvdtl

 2 Replies
 0 Subscribed to this topic
 22 Subscribed to this forum
Sort:
Author
Messages
JosieD77
New Member
Posts: 1
New Member
Hello, we have an existing tabular model for finance account distributions that I am editing. It is a query using Lawson Infor data that is currently showing the distribution amount rolled up to the PO level. We have been asked to add quantity from the PO Line/MAINVDTL level, and we are incorporating that as well as the MMDIST table . We have different invoice handling types such as SERV and MAT. For SERV type, the MMDIST table isn't necessarily used, but I have not been able to find a way to get from GL Trans to APDist to MINCDTL/PO LIne without duplicating the GL Trans Object ID. For other types where the MMDIST table is used, such as MAT, MMDIST gets me to the right grain. Does anyone have experience doing something like this?
John Henley
Posts: 3356
Hi JosieD77, I have also had this problem before. MAINVCDTL is related to APINVOICE not APDISTRIB, so you will have that as an issue. Can you create a subquery against MAINVCTL that joins to APINVOICE? Or have you tried to go from MMDIST to MAINVCDTL. One other option would be to do a separate query of service and then UNION with query of materials. That way you're not trying to cram everything into one query?
Thanks for using the LawsonGuru.com forums!
John
JosieD77
New Member
Posts: 1
New Member
Thanks John,

I am doing a large union which does have a separate query for service. I do also join to APINvoice from APDist , then from APInvoice to MAInvdtl but the issue is that I have not found a way to relate the po lines to the GL Object ID so once I get down to the PO line, it repeats the object id for each line if that makes sense. The requesters want the detail from the PO LIne but the amounts to roll up to match what is in APDIST/GL Trans.