View Single Post
Old 3rd February 2017, 02:51
shah_bs's Avatar
shah_bs shah_bs is offline
Join Date: Jan 2002
Location: Lewisville, Texas
Posts: 390
shah_bs is on a distinguished road
Baan: BAAN IVc3 with A&D2.2b - DB: ORACLE 9 - OS: HPUX
As Mark said, you would start with tfacp200 as your 'driving' table and using the Document Type and Number as key, fetch the tdpur046 records based on that table's secondary key.

But the issue is that these set of records sometime (very rarely) break in strange ways. SO, you can have a tfacp200 record which satisfies let us say three purchase order receipts, but only two purchase order invoice records (tdpur046) are created. So it is not merely a matter of whether the tdpur046 record exists or not, but whether the SUM of amounts of tdpur046 match the amount of the tfacp200 record. Of course, when selecting records from tfacp200, you have to pick the records where the second document type and number are blank and zero, as the records in which the second document number, etc. is filled in represent those tfacp200 records related to say payments or adjustments and such.

For us at least, this was quite an expensive report to run unless properly constrained - so we had additional constraints like say analyze only one vendor at a time (since usually, the issue would have been raised by a particular vendor.) Once a year, we would run the complete report to 'repair' anything remaining.

Last edited by shah_bs : 13th February 2017 at 03:02.
Reply With Quote