cancel
Showing results for 
Search instead for 
Did you mean: 

Reg: Query Problem for New Posting Period

kvbalakumar
Active Contributor
0 Kudos

Hi Xperts,

While I try to Map the A/P Invoices with their respective Outgoing Payment,

I used the following Query and it's Query Printlayout

SELECT T0.DocNum [Payment#], T0.DocDate [Payment Date], 
T0.CardCode, T0.CardName, T1.InvoiceId, T2.DocNum [AP Inv#], 
T2.NumatCard [Bill No.], T2.DocDate [Bill Date], T1.selfInv, 
T1.SumApplied, T1.WtAppld, T0.NoDocsum  
FROM  [dbo].[OVPM] T0  INNER  JOIN 
[dbo].[VPM2] T1  ON  T1.[DocNum] = T0.DocNum 
INNER  JOIN [dbo].[OPCH] T2  ON  T2.[DocEntry] = T1.DocEntry
 WHERE T0.Cardname='[%0]' and T0.DocDate='[%1]' and 
T0.DocNum='[%2]'

I got the above query from our Expert Mr.Sambath only.

Now what is the problem is the query is retrieving the payment details of old Posting Period only and not the current posting period.

In detail, I used 'Primary' Series for FY08-09, Period indicator 'Default'

Now I'm using 'Primary1' Series for FY09-10, Period indicator '0910'

Thanx in adv.

Regards,

Bala

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You need to find out what value is stored in your [Series\] field for OVPM and OPCH. Check your recent data to see.

You could then add [Series\] = ThisValue to the Where clauses.

Thanks,

Gordon

kvbalakumar
Active Contributor
0 Kudos

I already tried that also,

I inserted T0.Series = '[%3]' in Where clause also, but it is retrieving the old posting period results only.

Thanx

Bala

Former Member
0 Kudos

Hi Bala,

Looking at your query, it is not query issue ,it is your data issue.

Please check if you have data in VPM2 table which is bank transfer payment method

Thank you

Bishal

Edited by: Bishal Adhikari on Apr 9, 2009 8:48 AM

kvbalakumar
Active Contributor
0 Kudos

I think, VPM2 is not especially for Bank Transfer. It's for Payment-Invoices table only.

Am I Correct?

Rgrds,

Bala