Partywise & Itemwise purchase register query

Dear Expert,
I am new in SAP.
I need Partywise & Itemwise purchase register query.
BR
Deep

Dear Deep,
Welcome To SAP Community Network Forum...
Check this link...
http://forums.sdn.sap.com/thread.jspa?messageID=6730337#6730337
Thanks,
Srujal Patel

Similar Messages

  • Purchase register query based on down payment invoice

    Hai All,
    I am creating an invoice based on purchase order.The vat  tax is being calculated in the downpayment. I want the vat to be displayed in the downpayment invoice as well as the a/p invoice but i m not getting it in the a/p invoice. Pls guide me with the linking of tables to get the query working. I have formatted the fields req but could not link the tables...Pls guide me with that...
    Thanks & Regards,
    Neela

    Hi Neela,
    Check the thread.
    Re: Purchase register query based on down payment invoice
    FROM PCH1 T0
    INNER JOIN OPCH T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OSLP T2 ON T0.SlpCode = T2.SlpCode
    LEFT OUTER JOIN PCH12 T3 ON T1.DocEntry = T3.DocEntry
    LEFT JOIN ODPI T4 ON T1.CardCode = T4.CardCode
    INNER JOIN DPO1 T5 ON T0.ItemCode = T5.ItemCode
    Close the thread, if issue solved.
    Regards,
    Madhan.

  • Purchase Register query

    Hi
    I wrote query for Purchase register
    SELECT M.DocNum AS 'AP Inv. #', M.DocDate as 'Date', M.CardName as 'Vendor Name',M.NumAtCard as 'Bill No. & Dt.',L.ItemCode, L.Dscription,
    (Select Sum(LineTotal) FROM PCH1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-90 and DocEntry=M.DocEntry) as 'ED (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=7 and DocEntry=M.DocEntry) as 'ACD (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-60 and DocEntry=M.DocEntry) as 'EDCS (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-55 and DocEntry=M.DocEntry) as 'HECS (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=1 and DocEntry=M.DocEntry) as ' VAT (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=4 and DocEntry=M.DocEntry) as ' CST (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=10 and DocEntry=M.DocEntry) as ' CVD (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=5 and DocEntry=M.DocEntry) as ' Ser.Tax (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=6 and DocEntry=M.DocEntry) as 'CS on Ser.Tax (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=8 and DocEntry=M.DocEntry) as 'HECS_ST (Rs.)',
    (Select Sum(LineTotal) From PCH3 Q Where Q.DocEntry=M.DocEntry) AS 'Freight (Rs.)',
    M.WTSum AS 'TDS (Rs.)',
    M.DocTotal as 'Total (Rs.)'
    FROM OPCH M LEFT OUTER JOIN PCH1 L on L.DocEntry=M.DocEntry
    LEFT OUTER JOIN PCH4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
    LEFT OUTER JOIN PCH5 J ON M.DocEntry = J.AbsEntry
    LEFT OUTER JOIN PCH3 Q ON M.DocEntry = Q.DocEntry
    WHERE (M.DocDate >= '[%0]' AND M.DocDate <= '[%1]')
    GROUP BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,M.DocTotal,L.ItemCode,L.Dscription
    ORDER BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,M.DocTotal
    I want the row level amount for Base amount field But it is giving me the total amount including every line item. excluding of tax.
    Same with the tax amount. I tried removing sum but it is not helped
    Regards
    Shashi
    Edited by: shashi mantripragada on Dec 29, 2008 10:11 AM
    Edited by: shashi mantripragada on Dec 29, 2008 12:05 PM
    Edited by: shashi mantripragada on Dec 29, 2008 2:14 PM

    Hi Shashi,
    You could use this query for tax amount and row level base amount
    SELECT M.DocNum AS 'AP Inv. #', M.DocDate as 'Date', M.CardName as 'Vendor Name',M.NumAtCard as 'Bill No. & Dt.',L.ItemCode, L.Dscription,L.LineTotal,L.vatsum,
    (Select Sum(LineTotal) FROM PCH1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-90 and DocEntry=M.DocEntry) as 'ED (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=7 and DocEntry=M.DocEntry) as 'ACD (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-60 and DocEntry=M.DocEntry) as 'EDCS (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-55 and DocEntry=M.DocEntry) as 'HECS (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=1 and DocEntry=M.DocEntry) as ' VAT (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=4 and DocEntry=M.DocEntry) as ' CST (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=10 and DocEntry=M.DocEntry) as ' CVD (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=5 and DocEntry=M.DocEntry) as ' Ser.Tax (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=6 and DocEntry=M.DocEntry) as 'CS on Ser.Tax (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=8 and DocEntry=M.DocEntry) as 'HECS_ST (Rs.)',
    (Select Sum(LineTotal) From PCH3 Q Where Q.DocEntry=M.DocEntry) AS 'Freight (Rs.)',
    M.WTSum AS 'TDS (Rs.)',
    M.DocTotal as 'Total (Rs.)'
    FROM OPCH M LEFT OUTER JOIN PCH1 L on L.DocEntry=M.DocEntry
    LEFT OUTER JOIN PCH4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
    LEFT OUTER JOIN PCH5 J ON M.DocEntry = J.AbsEntry
    LEFT OUTER JOIN PCH3 Q ON M.DocEntry = Q.DocEntry
    WHERE (M.DocDate >= %0 AND M.DocDate <= %1)
    GROUP BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,M.DocTotal,L.ItemCode,L.Dscription,L.LineTotal,L.vatsum
    ORDER BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,M.DocTotal,L.LineTotal,L.vatsum
    Regards,
    Vijay Kumar
    SAP Business One Forums Team

  • Error in Purchase Register Query

    Hello All..
    I made a Query of Purchase Register and its working fine when my Invoice is of One item But when i am taking two or three items then its showing wrong result of all the taxes..
    Please Sort it out as soon as possible
    ELECT M.DocNum AS 'AP Inv. #', M.DocDate as 'Date', M.CardName as 'Vendor Name',M.NumAtCard as 'Bill No. & Dt.',L.ItemCode, L.Dscription,
    (Select Sum(LineTotal) FROM PCH1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-90 and DocEntry=M.DocEntry) as 'ED (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=7 and DocEntry=M.DocEntry) as 'ACD (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-60 and DocEntry=M.DocEntry) as 'EDCS (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-55 and DocEntry=M.DocEntry) as 'HECS (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=1 and DocEntry=M.DocEntry) as ' VAT (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=4 and DocEntry=M.DocEntry) as ' CST (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=10 and DocEntry=M.DocEntry) as ' CVD (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=5 and DocEntry=M.DocEntry) as ' Ser.Tax (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=6 and DocEntry=M.DocEntry) as 'CS on Ser.Tax (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=8 and DocEntry=M.DocEntry) as 'HECS_ST (Rs.)',
    (Select Sum(LineTotal) From PCH3 Q Where Q.DocEntry=M.DocEntry) AS 'Freight (Rs.)',
    M.WTSum AS 'TDS (Rs.)',
    M.DocTotal as 'Total (Rs.)'
    FROM OPCH M LEFT OUTER JOIN PCH1 L on L.DocEntry=M.DocEntry
    LEFT OUTER JOIN PCH4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
    LEFT OUTER JOIN PCH5 J ON M.DocEntry = J.AbsEntry
    LEFT OUTER JOIN PCH3 Q ON M.DocEntry = Q.DocEntry
    WHERE (M.DocDate >= '[%0]' AND M.DocDate <= '[%1]')
    GROUP BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,M.DocTotal,L.ItemCode,L.Dscription
    ORDER BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,M.DocTotal

    Hi  Gordon..
    Can you explain with any example..
    Thanks

  • Update purchase register query

    Hi All,
    I want Updation in Following query, My client want item name and Quantity also in this.
    SELECT  M.DocNum AS 'AP Inv. #', M.DocDate as 'Date', M.CardName as 'Vendor Name',M.NumAtCard as 'Vendor Ref',
    (Select Sum(LineTotal) FROM PCH1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=-90 and DocEntry=M.DocEntry) as 'ED (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-90 and DocEntry=M.DocEntry) as 'ED (Rs.)',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=-60 and DocEntry=M.DocEntry) as 'ECess (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-60 and DocEntry=M.DocEntry) as 'EDCS (Rs.)',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=-55 and DocEntry=M.DocEntry) as 'Hcess (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-55 and DocEntry=M.DocEntry) as 'HECS (Rs.)',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=1 and DocEntry=M.DocEntry) as 'VAT (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=1 and DocEntry=M.DocEntry) as ' VAT (Rs.) ',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=4 and DocEntry=M.DocEntry) as 'CST (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=4 and DocEntry=M.DocEntry) as ' CST (Rs.) ',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=-40 and DocEntry=M.DocEntry) as 'CVD (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-40 and DocEntry=M.DocEntry) as ' CVD (Rs.) ',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=5 and DocEntry=M.DocEntry) as 'SERVICE (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=5 and DocEntry=M.DocEntry) as ' Ser.Tax (Rs.) ',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=6 and DocEntry=M.DocEntry) as 'Cess_sertax (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=6 and DocEntry=M.DocEntry) as 'CS on Ser.Tax (Rs.)',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=-10 and DocEntry=M.DocEntry) as 'Hcess_st (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-10 and DocEntry=M.DocEntry) as 'HECS_ST (Rs.)',
    (Select Sum(LineTotal) From PCH3 Q Where Q.DocEntry=M.DocEntry) AS 'Freight (Rs.)',
    M.WTSum AS 'TDS (Rs.)',
    M.DocTotal as 'Total (Rs.)'
    FROM OPCH M LEFT OUTER JOIN PCH1 L on L.DocEntry=M.DocEntry
    LEFT OUTER JOIN PCH4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
    LEFT OUTER JOIN PCH5 J ON M.DocEntry = J.AbsEntry
    LEFT OUTER JOIN PCH3 Q ON M.DocEntry = Q.DocEntry
    WHERE (M.DocDate >= '[%0]' AND M.DocDate <= '[%1]')
    GROUP BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.[DiscSum],M.WTSum,M.DocTotal
    ORDER BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.[DiscSum],M.WTSum,M.DocTotal
    Thanks
    Deepak Tyagi

    Dear Thanga ,
    I am posting Again my Query and modify this with item name and quantity. This query is working well at my system..
    SELECT  M.DocNum AS 'AP Inv. #', M.DocDate as 'Date', M.CardName as 'Vendor Name',M.NumAtCard as 'Vendor Ref',
    (Select Sum(Quantity) FROM PCH1 L Where L.DocEntry=M.DocEntry) as 'TotQty',
    (Select Sum(LineTotal) FROM PCH1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=-90 and DocEntry=M.DocEntry) as 'ED (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-90 and DocEntry=M.DocEntry) as 'ED (Rs.)',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=-60 and DocEntry=M.DocEntry) as 'ECess (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-60 and DocEntry=M.DocEntry) as 'EDCS (Rs.)',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=-55 and DocEntry=M.DocEntry) as 'Hcess (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-55 and DocEntry=M.DocEntry) as 'HECS (Rs.)',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=1 and DocEntry=M.DocEntry) as 'VAT (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=1 and DocEntry=M.DocEntry) as ' VAT (Rs.) ',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=4 and DocEntry=M.DocEntry) as 'CST (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=4 and DocEntry=M.DocEntry) as ' CST (Rs.) ',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=-40 and DocEntry=M.DocEntry) as 'CVD (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-40 and DocEntry=M.DocEntry) as ' CVD (Rs.) ',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=5 and DocEntry=M.DocEntry) as 'SERVICE (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=5 and DocEntry=M.DocEntry) as ' Ser.Tax (Rs.) ',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=6 and DocEntry=M.DocEntry) as 'Cess_sertax (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=6 and DocEntry=M.DocEntry) as 'CS on Ser.Tax (Rs.)',
    (SELECT distinct (TaxRate) FROM PCH4 where statype=-10 and DocEntry=M.DocEntry) as 'Hcess_st (Rate)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-10 and DocEntry=M.DocEntry) as 'HECS_ST (Rs.)',
    (Select Sum(LineTotal) From PCH3 Q Where Q.DocEntry=M.DocEntry) AS 'Freight (Rs.)',
    M.WTSum AS 'TDS (Rs.)',
    M.DocTotal as 'Total (Rs.)'
    FROM OPCH M LEFT OUTER JOIN PCH1 L on L.DocEntry=M.DocEntry
    LEFT OUTER JOIN PCH4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
    LEFT OUTER JOIN PCH5 J ON M.DocEntry = J.AbsEntry
    LEFT OUTER JOIN PCH3 Q ON M.DocEntry = Q.DocEntry
    WHERE (M.DocDate >= '[%0]' AND M.DocDate <= '[%1]')
    GROUP BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.[DiscSum],M.WTSum,M.DocTotal
    ORDER BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.[DiscSum],M.WTSum,M.DocTotal
    Thanks & Regards
    Deepak Tyagi

  • Customized Query for purchase register

    Hi All,
    I need a query for purchase register which gives excise information with biferication.
    OPCH, PCH1, ORPC, RPC1 and IEI4
    In excel reporter we get the purchase register report But excise amount does not come in that report.
    So, I need Customised report for that.
    Regards
    Shashi

    hi shashi,
    SELECT M.DocNum AS 'AP Inv. #', M.DocDate as 'Date', M.CardName as 'Vendor Name',M.NumAtCard as 'Bill No. & Dt.',
    (Select Sum(LineTotal) FROM PCH1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-90 and DocEntry=M.DocEntry) as 'ED (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-60 and DocEntry=M.DocEntry) as 'EDCS (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=7 and DocEntry=M.DocEntry) as 'HECS (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=1 and DocEntry=M.DocEntry) as ' VAT (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=4 and DocEntry=M.DocEntry) as ' CST (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=10 and DocEntry=M.DocEntry) as ' CVD (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=5 and DocEntry=M.DocEntry) as ' Ser.Tax (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=6 and DocEntry=M.DocEntry) as 'CS on Ser.Tax (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=8 and DocEntry=M.DocEntry) as 'HECS_ST (Rs.)',
    (Select Sum(LineTotal) From PCH3 Q Where Q.DocEntry=M.DocEntry) AS 'Freight (Rs.)',
    M.WTSum AS 'TDS (Rs.)',
    M.DocTotal as 'Total (Rs.)'
    FROM OPCH M LEFT OUTER JOIN PCH1 L on L.DocEntry=M.DocEntry
    LEFT OUTER JOIN PCH4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
    LEFT OUTER JOIN PCH5 J ON M.DocEntry = J.AbsEntry
    LEFT OUTER JOIN PCH3 Q ON M.DocEntry = Q.DocEntry
    WHERE (M.DocDate >= '[%0]' AND M.DocDate <= '[%1]') AND (T.TrgetEntry = ' ')
    GROUP BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.[DiscSum],M.WTSum,M.DocTotal
    ORDER BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.[DiscSum],M.WTSum,M.DocTotal
    Jeyakanthan

  • Purchase Register - Header level query issue

    Hi Guru's,
    I tried the following query for Purchase Register (Header Level) but I am not able to get the following details -                              1) AP Invoices which are without PO
    2) Freight amount not getting reflected
    SELECT T0.DocNum as 'PO. No.',
    T0.DocDate as 'PO. Date',
    M.DocNum as 'A/P Invoice No.',
    M.DocDate as 'Inv. Date',
    M.CardName as 'Vendor Name',
    M.NumAtCard as 'Bill No. & Date',
    (Select Sum(LineTotal) FROM PCH1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-90 and DocEntry=M.DocEntry) as 'ED (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-60 and DocEntry=M.DocEntry) as 'EDCS (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=8 and DocEntry=M.DocEntry) as 'HECS (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=1 and DocEntry=M.DocEntry) as ' VAT (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=4 and DocEntry=M.DocEntry) as ' CST (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-80 and DocEntry=M.DocEntry) as ' CVD (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=5 and DocEntry=M.DocEntry) as ' Ser.Tax (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=6 and DocEntry=M.DocEntry) as 'CS on Ser.Tax (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=7 and DocEntry=M.DocEntry) as 'HECS_ST (Rs.)',
    (Select Sum(LineTotal) From PCH3 Q Where Q.DocEntry=M.DocEntry) AS 'Freight (Rs.)',
    M.WTSum AS 'TDS (Rs.)',
    M.DocTotal as 'Total (Rs.)'
    FROM OPOR T0 INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OPDN T2 ON T2.DocEntry = T1.TrgetEntry
    INNER JOIN PDN1 T3 on T3.DocEntry = T2.Docentry
    INNER JOIN OPCH M ON M.DocEntry = T3.TrgetEntry
    LEFT OUTER JOIN PCH1 L on L.DocEntry=M.DocEntry
    LEFT OUTER JOIN PCH4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
    LEFT OUTER JOIN PCH5 J ON M.DocEntry = J.AbsEntry
    LEFT OUTER JOIN PCH3 Q ON M.DocEntry = Q.DocEntry
    WHERE M.DocDate >= '[%0]' AND M.DocDate <= '[%1]'
    GROUP BY
    T0.DocNum,T0.DocDate,M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.[DiscSum],M.WTSum,M.DocTotal
    ORDER BY
    T0.DocNum,T0.DocDate,M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.[DiscSum],M.WTSum,M.DocTotal
    Regards,
    Abhishek

    Hi Abhishek,
    Try this Query Report, you will be get the exact result in  this Query.
    your requirement.
    1. A/P Invoice with Purchase Order.
    2. The Freight amount will display the Freight Column in the query.
    Try this below Query,
    SELECT T0.DocNum as 'PO. No.',
    T0.DocDate as 'PO. Date',
    M.DocNum as 'A/P Invoice No.',
    M.DocDate as 'Inv. Date',
    M.CardName as 'Vendor Name',
    M.NumAtCard as 'Bill No. & Date',
    (Select Sum(LineTotal) FROM PCH1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-90 and DocEntry=M.DocEntry) as 'ED (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=-60 and DocEntry=M.DocEntry) as 'EDCS (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=7 and DocEntry=M.DocEntry) as 'HECS (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=1 and DocEntry=M.DocEntry) as ' VAT (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=4 and DocEntry=M.DocEntry) as ' CST (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=10 and DocEntry=M.DocEntry) as ' CVD (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=5 and DocEntry=M.DocEntry) as ' Ser.Tax (Rs.) ',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=6 and DocEntry=M.DocEntry) as 'CS on Ser.Tax (Rs.)',
    (SELECT Sum(TaxSum) FROM PCH4 where statype=8 and DocEntry=M.DocEntry) as 'HECS_ST (Rs.)',
    (Select Sum(LineTotal) From PCH3 Q Where Q.DocEntry=M.DocEntry) AS 'Freight (Rs.)',
    M.WTSum AS 'TDS (Rs.)',
    M.DocTotal as 'Total (Rs.)'
    FROM OPOR T0 INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OPDN T2 ON T2.DocEntry = T1.TrgetEntry
    INNER JOIN PDN1 T3 on T3.DocEntry = T2.Docentry
    INNER JOIN OPCH M ON M.DocEntry = T3.TrgetEntry
    LEFT OUTER JOIN PCH1 L on L.DocEntry=M.DocEntry
    LEFT OUTER JOIN PCH4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
    LEFT OUTER JOIN PCH5 J ON M.DocEntry = J.AbsEntry
    LEFT OUTER JOIN PCH3 Q ON M.DocEntry = Q.DocEntry
    WHERE M.DocDate >= '[%0]' AND M.DocDate <= '[%1]'
    GROUP BY
    T0.DocNum,T0.DocDate,M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.[DiscSum],M.WTSum,M.DocTotal
    ORDER BY
    T0.DocNum,T0.DocDate,M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.[DiscSum],M.WTSum,M.DocTotal
    Regards,
    Madhan.

  • Purchase Register, sale register, & Cenvat Tax Register

    How to Create Purchase register, Sales Register, Cenvat Tax Register with total Balance
    Regds
    Edited by: Philip Eller on Jun 4, 2008 8:36 AM

    Hi Sashi,
    Create a user query from Query Wizard for
    Sales Register from Tables -OINV,INV4.
    Purchase Register from Tables - OPCH,PCH4.
    Hope above answer will helpful to you.
    Jeyakanthan.

  • Purchase Register with Item

    Hi Friends,
                    I want purchase register report in which i can see all row on each docentry, I have a query like
    SELECT
    M.DocNum as 'A/P Invoice No.',
    M.DocDate as 'Inv. Date',
    M.CardName as 'Vendor Name',
    M.NumAtCard as 'Vendor Ref. No.',
    (Select Sum (isnull (LineTotal,0)) FROM pch1 L Where L.DocEntry=M.DocEntry) - isnull (((Select Sum (isnull(LineTotal,0)) FROM rpc1 r Where R.baseEntry=L.DocEntry)),0) as 'Base Amt(Rs.)',
    (SELECT AVG (TaxRATE) FROM pch4 where statype=1 and DocEntry=M.DocEntry) - isnull (((SELECT Sum(TaxRATE) FROM Rpc4 R4 where statype=1 and R4.DocEntry=R.DocEntry)),0) as ' VAT_RATE ',
    (SELECT Sum(TaxSum) FROM pch4 where statype=1 and DocEntry=M.DocEntry) - isnull(((SELECT Sum(TaxSum) FROM Rpc4 R4 where statype=1 and R4.DocEntry=R.DocEntry)),0) as ' VAT(Rs.)',
    (SELECT avg(TAXRATE) FROM pch4 where statype=4 and DocEntry=M.DocEntry) - isnull(((SELECT Sum(Taxrate) FROM Rpc4 R4 where statype=4 and R4.DocEntry=R.DocEntry)),0) as ' CST_RATE ',
    (SELECT Sum(TaxSum) FROM pch4 where statype=4 and DocEntry=M.DocEntry) - isnull(((SELECT Sum(TaxSum) FROM Rpc4 R4 where statype=4 and R4.DocEntry=R.DocEntry)),0) as ' CST(Rs.) ',
    (Select Sum(LineTotal) From pch3 Q Where Q.DocEntry=M.DocEntry) - isnull(((SELECT Sum(Linetotal) FROM Rpc3 R3 where R3.DocEntry=R.DocEntry)),0) AS 'Freight(Rs.)' ,
    (M.DocTotal - isnull(M.PaidToDate,0)) as 'Total (Rs.)'
    from opch M
    LEFT OUTER JOIN pch1 L on L.DocEntry=M.DocEntry
    LEFT OUTER JOIN pch4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
    LEFT OUTER JOIN pch5 J ON M.DocEntry = J.AbsEntry
    LEFT OUTER JOIN pch3 Q ON M.DocEntry = Q.DocEntry
    left outer join RPC1 R On R.Baseentry = L.Docentry
    left outer join RPC4 R4 On R.docentry = R4.Docentry
    left outer join RPC3 R3 On R.docentry = R3.docentry
    left outer join ORPC RP On R.docentry = RP.docentry
    WHERE M.DocDate >= [%0] AND M.DocDate <= [%1] and m.doctype = 'I'
    GROUP BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,
    M.DocEntry,M.DiscSum,M.WTSum,M.DocTotal,L.docentry,R.docentry,RP.Doctotal, M.Paidtodate
    ORDER BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,
    M.DocEntry,M.DiscSum,M.WTSum,M.DocTotal
        My requirement is to show all row items corresponding to docnumber.
    Thanks
    Andy

    Hi Andy,
    Try:
    SELECT
    M.DocNum as 'A/P Invoice No.',
    M.DocDate as 'Inv. Date',
    M.CardName as 'Vendor Name',
    M.NumAtCard as 'Vendor Ref. No.',
    (Select Sum (isnull (LineTotal,0)) FROM pch1 L Where L.DocEntry=M.DocEntry) - isnull (((Select Sum (isnull(LineTotal,0)) FROM rpc1 r Where R.baseEntry=L.DocEntry)),0) as 'Base Amt(Rs.)',
    (SELECT AVG (TaxRATE) FROM pch4 where statype=1 and DocEntry=M.DocEntry) - isnull (((SELECT Sum(TaxRATE) FROM Rpc4 R4 where statype=1 and R4.DocEntry=R.DocEntry)),0) as ' VAT_RATE ',
    (SELECT Sum(TaxSum) FROM pch4 where statype=1 and DocEntry=M.DocEntry) - isnull(((SELECT Sum(TaxSum) FROM Rpc4 R4 where statype=1 and R4.DocEntry=R.DocEntry)),0) as ' VAT(Rs.)',
    (SELECT avg(TAXRATE) FROM pch4 where statype=4 and DocEntry=M.DocEntry) - isnull(((SELECT Sum(Taxrate) FROM Rpc4 R4 where statype=4 and R4.DocEntry=R.DocEntry)),0) as ' CST_RATE ',
    (SELECT Sum(TaxSum) FROM pch4 where statype=4 and DocEntry=M.DocEntry) - isnull(((SELECT Sum(TaxSum) FROM Rpc4 R4 where statype=4 and R4.DocEntry=R.DocEntry)),0) as ' CST(Rs.) ',
    (Select Sum(LineTotal) From pch3 Q Where Q.DocEntry=M.DocEntry) - isnull(((SELECT Sum(Linetotal) FROM Rpc3 R3 where R3.DocEntry=R.DocEntry)),0) AS 'Freight(Rs.)' ,
    (M.DocTotal - isnull(M.PaidToDate,0)) as 'Total (Rs.)',
    L.ItemCode,L.Quantity,L.LineTotal
    from opch M
    LEFT OUTER JOIN pch1 L on L.DocEntry=M.DocEntry
    LEFT OUTER JOIN pch4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
    LEFT OUTER JOIN pch5 J ON M.DocEntry = J.AbsEntry
    LEFT OUTER JOIN pch3 Q ON M.DocEntry = Q.DocEntry
    left outer join RPC1 R On R.Baseentry = L.Docentry
    left outer join RPC4 R4 On R.docentry = R4.Docentry
    left outer join RPC3 R3 On R.docentry = R3.docentry
    left outer join ORPC RP On R.docentry = RP.docentry
    WHERE M.DocDate >= [%0\] AND M.DocDate <= [%1\] and m.doctype = 'I'
    GROUP BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,
    M.DocEntry,M.DiscSum,M.WTSum,M.DocTotal,L.docentry,R.docentry,RP.Doctotal, M.Paidtodate,
    L.ItemCode,L.Quantity,L.LineTotal
    ORDER BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,
    M.DocEntry,M.DiscSum,M.WTSum,M.DocTotal
    Thanks,
    Gordon

  • Purchase Register In XL Reporter

    Hi Experts
    I am using SBO 2007 B PL 08. There is problem in Purchase Register in XL Reporter. It does not showing Tax Rate and Tax amount. Is there any way to check why it is not showing and How I change in XL Report . How can I create A Report in XL Reporter give some tips.
    Thanks
    Regards
    Gorge

    Gorge Ance 
    It seems you are new to XLR, i would advice its better to use Crystal Reports
    Because it is simple and flexible you can use dbo.tables or use your own query as command
    thanks
    Krish

  • Purchase Register report in SAP BI

    Dear All,
    Please suggest me any standard Purchase Register report  is available in BI or how to achieve this requirement in BI.
    Please let me know process.
    Thank
    Regards,
    Sai.k

    Hi,
    while there is always a new requirement, one needs to discuss  with the functional consultants and find out which tables are being used which may fulfill the scenario. We also need to identify the list of characteristic and Keyfigues the client wants to analyze.
    Also SAP Help is a good source to find more of a standard stream lined objects. Need to analyze if standard objects satisfy the requirement or customization is required.
    Please perform the steps as Rama has suggested...
    thank you

  • Purchase Register Report

    Hi Friends,
             I need to develop the Purchase Register Report with Vendor details, TIN number, Invoice details, E1 purchases with purchase base value and VAT and CST percentages. But Iam new to the Purchase module. I know the basic tables for purchasing. but can anybody guide me the tables for TIN number with VAT and CST percentages and how to proceed?
    Thanking you in advance
    Regards,
    Murali

    I don't know the fields but a few pointers that might be helpful:
    1) Ask your functional analyst - it's part of their job to provide you with the field location or any guidance on that
    2) At least someone should be able to point you where the fields are on the screen. Then you should be able to go the usual route - F1 -> Technical info, etc.
    3) Respective functional forum might be a better place for such questions if for some reason p. 1 and 2 above are not feasible.
    4) You can always use SQL Trace (ST05) to find where the information is being read from or written to. Start the trace, run the transaction, stop the trace and analyze the list. Voila - no need to ask anyone ever again.

  • Purchase Register Report issue

    Hi,
    I am working Purchase Register report.
    In this, we have a PO with 10 Quantity.  But at the time of MIGO we receive 5 qty out of 10.
    Now how can we pick the amount according to 5 qty received from MIGO because we want show MIGO condition in our report not from PO.
    What should be the table link for this...
    Plz guide..

    As per ur reference: -
    In PO, Condition are like--- PO Qty is 10
    Basic Amount..........1000
    taxes.........................100
    Freight.........................50
    Other...........................20
    and we have receive only 5 qty out of them, means all the condition amount will be 50%. like...
    Basic Amount..........500
    taxes.........................50
    Freight.......................25
    Other.........................10
    all condition will be calculate according to qty 5 not for 10 as showing in PO..
    I want to pick these condition. (according to 5 qty.)..
    Now suggest...

  • Purchase register from XL reporter Proplem

    HI
    In purchase register  form as per indian excise dept. in purchase register the fields where need correction are Purchase value(Document),Purchase value(row).
    I need Prchase Value(row)=PurchaseValue(Document) - VAT Paid
    But right now Prchase Value(row)=PurchaseValue(Document)
    How should I do  for the same.
    Thanks & regards
    _Dinesh
    Edited by: Rui Pereira on Jan 27, 2009 3:30 PM

    Hey Dinesh
    That doesn't look like XLR.    You can combine fields if they are in the Metadata or use Get Other Data and bring them in with vLookup.
    Jim

  • Purchase Register India Localization

    Hi Experts,
    We are facing a issue in Purchase Register, i have confusion on generating report, there are two dates are available in input parameters, posting date and invoice date, whichever date i am selecting for generating report, the data and figures which i am getting which is not matching with my vat returns for that same period.
    even the purchase returns are not reflecting in purchase register, it should reflect in negative figure in purchase register, now i am confused that this purchase register report is relible or not. can we use it for audit.
    Pls. guide me for the same, i am facing this issue will my all clients.
    Regards
    Kamlesh Vagal
    [email protected]
    Tel : +91 9920691906

    Hi Neetu,
    Do you wish that at all customer site all concern involved in implemtation do the same work ?
    I believe ERP is meant for single entry system, and it should be true for implementation also, why to invest man hours for the same task ?
    I expect it standard reports should be released by SAP, so that speed of implementation improve, we have more nos. of satisfied customers.
    customised reports is all together different and it is understood that it is needed to be developed after study the exact requirement.
    Best Regards,
    Samir Gandhi

Maybe you are looking for