Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
55%
Installation Wizard into new VRC
18%
Manual into existing VRC
9%
Manual into new VRC
18%
Total votes: 11

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 10th January 2017, 17:05
VishalMistry's Avatar
VishalMistry VishalMistry is offline
Guru
 
Join Date: Dec 2004
Location: India, Gujarat
Posts: 534
VishalMistry has a little shameless behaviour in the past
Baan: Baan IV, ERPLn - DB: SQL Server 2000 / 2008 - OS: Windows Server 2003 / 2008
Wink Relation between tfacp200 & tdpur046
Baan: Baan IVc4
C/S: Both

Hello everyone,

This is related to Baan IV.

we have a report requirement with following details:

Supplier Tran.type Doc.No Invoice amt Order Order amt
abc FIP 20090001 1000 100001 500
abc FIP 20090001 1000 100002 500

here, invoice FIP 2009000 is paid against two purchase orders (records from tdpur046). Is there any way to join these two tables (obviously based on ttyp and ninv) in such a way that if a matching record is not found in tdpur046, the fields from tdpur046 will be blank but the values from tfacp200 will be printed. I could not find any way to use "refers to" as there is no native relationship between these two tables. One way is I can use is as below:
tfacp200.ttyp = tdpur046.ttyp and tfacp200.ninv = tdpur046.invn

ON THE FORM FOLLOWING FIELDS WILL BE USED AS SELECTION CRITERIA:

SUPPLIER FROM - TO
PURCHASE ORDER FROM - TO
TFACP200.TTYP FROM - TO
TFACP200.NINV FROM- TO

Is there any way out to overcome this problem ?

Vishal
Reply With Quote
  #2  
Old 12th January 2017, 16:09
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,832
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
I would just use a sub query inside the query on tfacp200. So query tfacp200 on your ranges. Then inside the select do query tdpur046 - in select empty 0 out the fields or clean up the fields from the previous find. There might be better ways, but this is easy for me to follow.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
Sponsored Links
  #3  
Old 3rd February 2017, 01:51
shah_bs's Avatar
shah_bs shah_bs is offline
Guru
 
Join Date: Jan 2002
Location: Lewisville, Texas
Posts: 387
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 02:02.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
JV Transaction in tfacp200 johnmark Tools Development 4 20th March 2013 06:06
Pick up of default Bank relation while processing payments fionad Finance, Invoicing and Integration 2 29th August 2012 17:15
Pegging Relation quelle Manufacturing & Supply Chain 5 23rd December 2009 04:06
Restoring tdpur046 records manish_patel Finance, Invoicing and Integration 9 25th April 2007 03:50
Finace - Logistic co. relation concept in LN satinderg Finance, Invoicing and Integration 2 2nd January 2006 09:57


All times are GMT +2. The time now is 19:34.


©2001-2017 - Baanboard.com - Baanforums.com