Where does Lawson store or create the link between the AP line and the PO line?
We have multiple downstream systems that need input from Lawson in the form of an extract file. This started out as an account analysis that would basically map back to the ultimate source of a transaction – back to PO if need be. Critical elements include the item quantity, item cost, freight (or other AOC in general), sales tax and of course the GL distributions.
Based on various parameters (company, accounting unit, account, sub account, period – all available in ranges) we read GL first. If it’s a GL type entry, we stop there and pull in totals. If it is AP we check to see if it is a matched invoice (PO) or nonmatched (non PO) based on the match flag and pull from APDISTRIB. If non PO we stop there and pull in the totals. If matched, we go back to the PO via the MAINVDTL table. In MAINVDTL to pick up the freight, unit cost, quantity, etc. but I’m not so sure this is the right/best place. It has been in the requirements for a very long time, but not sure where it started. This is an over simplification but the basic gist. We actually get AOC from another table, but again….our main issue right now is the distribution.
If the match type is D it works fine because we can do a line for line match up but if the type is S then we don’t have a clear path to identify what AP line goes with what PO line so we are essentially “tagging” all AP lines and thus missing the link to the accounting distribution. The result is that when you have a multi-line PO that has different distributions across the lines, we are only “attaching” it to only one distribution. I don’t mean multiple distributions on a single line, but if line one and two have different distributions, we are lumping them all into one instead of being able to properly split them out.
We are going to be looking now at POMATCHOBJ or MMDIS to find some better information, but really stabbing in the dark. Any input you can give would be greatly appreciated.
I’m attaching a copy of the output as an example – just for purposes of seeing the data we are capturing. Keep in mind, the distribution information is not correct and this is test data. J The “ZG251 after AOC” tab is what the program generates the other two tabs are where I have been doing some balancing analysis.