Skip to Content
0
Former Member
Jun 13, 2009 at 05:48 AM

Reg: AP Inv Report

24 Views

Hi All,

I had written a SQL code to generate a report for all A/P Invoices raised against GRPO. but i am not

sure whether this code is correct or not, since i am unable to verify the records.

Please suggest if any changes are required for the code.

select S.Docnum,S.DocDate,S.CardName,S0.Dscription as 'Item Description', S0.Quantity,--S0.baseref,
S1.Docnum as 'GRPO Doc No.',S1.U_GRNID,S2.Quantity
from OPCH S inner join PCH1 S0 on S.Docentry = S0.Docentry
inner join OPDN S1 on S0.baseref = S1.docnum inner join PDN1 S2 on S1.Docentry = S2.Docentry
where S.DocDate between [%0] and [%1]
group by S0.Quantity, S2.Quantity,S.Docnum,S.DocDate,S.CardName,S0.Dscription,S1.Docnum ,S1.U_GRNID,S2.OpenQty
order by S.Docnum

Please help us to resolve

Regards

Shanker. T