Query For Purchase A/P Cycle Details

Hi
All export pls. provide me Query for Purchase A/P Cycle Details i.e Vendor Code  Vendor Description doc. date posting date po date amount quantity unit price same as Grpo returns and invoice in singal screen
Thanks & Regards

Hi,
What do you mean by Query for Purchase A/P Cycle . All Query  for A/P Cycle , you can search  in SDN.Any specific unsolved query for you can be posted here.Ok.
Check the details:
1.PO creation
http://e-mory.blogspot.com/2008/01/sap-me21n-create-purchase-order_30.html
2.Goods Receipt
http://e-mory.blogspot.com/2008/02/sap-migo-goods-receipt.html
3.Invoice Verification
http://e-mory.blogspot.com/2007/11/sap-miro-enter-invoice-verification.html
Regards,
Biju K

Similar Messages

  • 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

  • FMS Query for Purchase Order

    Hi,
    I want to FMS Query for Purchase Order.
    I want to display the weight * price in one user define field.
    Please suggest me

    Hi Tushar.......
    Try this.......
    declare @var1_wt as varchar(255)
    declare @var2_Pr as varchar(255)
    declare @var3 as float
    declare @var4 as float
    set @var1_wt=$[$38.58.0]
    set @var2_Pr=$[$38.14.0]
    set @var3=cast( substring(replace(@var1_wt,',',''),0,len(replace(@var1_wt,',',''))-1) as float)
    set @var4=cast(substring(replace(@var2_Pr,',',''),0,len(replace(@var2_Pr,',',''))-3) as float)
    select @var3 * @var4
    Regards,
    Rahul

  • Could someone share with me a Query for Purchase report in BP Currency?

    Hi All,
    Does anyone have a Purchase Analysis query by Business Partner (Vendor/Supplier) that returns all invoices by the month or anything else (items etc purchased) by the month in BP Currency please?
    I would like to use it as standalone query and eventually import it as a Crystal Report query.
    Appreciate it. Thank you.

    I just managed to create the report using Crystal and db files coming from Purchase Invoice and currency details coming from BP vendor file.

  • Tables or FM's for Purchase order  ,Invoice, Taxes details

    Hi,
    I want to know from which tables or function modules we can get the condition type, amount and condition value.
    Purchase order Line Item > Invoice (tab)> Taxes (tab)-->  condition type, amount and condition value?
    Regards,
    Prem.

    Hi
    LOGIC :
    1 you will get po number fron EKPO
    2, for same po you will get invoice in table RSEG
    3.Pass the BELNR( Invoice number) in to BKPF into refernce field( where you will get invoice number+fiscal year) and same table you will get Fi doc in BELNR
    4Then pass the BELNR  in to BSET
    5.Where all tax details available
    Regards
    Kailas ugale

  • Query for purchasing accrual in 12i

    Hi
    We have migrated to 12i ,the references in gl_import_references are no more updated after 12 i upgrade.
    Please find the 11i query,we need to change it to 12i using xla tables.
    SELECT
    gl_ledgers.NAME AS book_name,
           gl_periods.period_year AS fiscal_year,
           DECODE (gl_periods.quarter_num,
                   1, '1st QTR',
                   2, '2nd QTR',
                   3, '3rd QTR',
                   4, '4th QTR'
                  ) AS quarter,
           gl_periods.period_num AS period_number,
           gl_je_headers.period_name AS period_name,
           gl_je_headers.je_source AS SOURCE,
           gl_je_headers.je_category AS CATEGORY,
           gl_code_combinations.segment1 AS company,
           gl_code_combinations.segment2 AS cost_center,
           gl_code_combinations.segment3 AS ACCOUNT,
           gl_code_combinations.segment4 AS program,
           gl_code_combinations.segment5 AS future,
           po_distributions_all.expenditure_type AS expenditure_type,
           po_distributions_all.expenditure_item_date AS expenditure_date,
           gl_je_lines.accounted_dr, gl_je_lines.accounted_cr,
           po_distributions_all.quantity_delivered AS pa_quantity, 'Accrual' TYPE,
           DECODE (gl_code_combinations.segment2,
                   '0000', 'BS',
                   'PL'
                  ) AS ledger_type,
           ap_suppliers.vendor_name,
           gl_je_lines.reference_4 AS po_number,
           gl_je_lines.description
      FROM gl.gl_je_headers,
           gl.gl_je_lines,
           gl.gl_ledgers,
           gl.gl_code_combinations,
           po.po_distributions_all,
           po.po_headers_all,
           gl.gl_periods,
           ap.ap_suppliers
    WHERE gl_je_headers.je_source = 'Cost Management' --Changed to Cost Management
       AND gl_je_headers.je_header_id = gl_je_lines.je_header_id
       AND gl_je_headers.ledger_id = gl_ledgers.ledger_id
       AND gl_code_combinations.code_combination_id =
                                                   gl_je_lines.code_combination_id
       AND gl_code_combinations.segment3 <> '23004'
       AND po_distributions_all.po_header_id(+) =
                       TO_NUMBER (RTRIM (SUBSTR (gl_je_lines.reference_2, 1, 10)))
       AND po_distributions_all.po_distribution_id =
                       TO_NUMBER (RTRIM (SUBSTR (gl_je_lines.reference_3, 1, 10)))
       AND po_distributions_all.po_header_id = po_headers_all.po_header_id
       AND po_headers_all.vendor_id = ap_suppliers.vendor_id
       AND gl_je_headers.period_name = gl_periods.period_name
    Can someone help us

    Hello Mr.Raman,
    Thanks for your response to my query.
    As per my company requirement i have to track duplicate payment made to the vendor against same PO.
    So for that after completing the cycle PR-PO-GR-IR-F-53 finally i found two records in BSAK table out of which :
    One record was  with my accounting document no from my invoice receipt of type RE.
    Another record was with the vendor payment clearance document with type KZ.
    Now again i have done payment to the vendor using F-53 tcode and now i found one more record with belnr = last payment document no and augbl = new payment document no. with type KZ.
    So if i use below mentioned logic to track for duplicate payments made to the vendor ,then it will be fine or if not can you suggests me the needful changes in the logic.
    1.) Check If record exists for my belnr no from invoice recipt in bsak.
    2.) Take AUGBL No for this BELNR No and check if record exists for this AUGBL with type KZ.
    Note:Means payment is done to the vendor upto this logic.
    3.) Now if with the found record with type KZ any other record found with type KZ it can be taken of as duplicate payment made to the vendor.
    Please suggest me if above mentioned logic is fine.
    Regards.
    Abhinav Goel.

  • Creating a Query for Purchase Order Approval

    I need to develop a query to check if any of the line totals in a new purchase order exceeds $500. I have to attach this query to the approval procedure (under 'Terms' in 'Define Approval templates'). When the 'Add' button on the purchase order is clicked, the values on the form are still not available in the database. This means, my query has to pick the data from the new purchase order form. Is there any way to build such a query? Thanks.

    Satish, Alerts just notify the appropriate parties. They do not stop a document from being posted. This means, it is not capable to recognize the situation unless it's already stored in the DB.
    Alexey. what about creating a Development Request about this topic?
    Regards,
    Felipe

  • Query for Purchase Document

    Hello
    I am doing a Query. I need to add this field with the complete name of the person who did a Purchase document order.
    I found this field with this information througt transacction SU01.
    Full Name of Person
    ADDR3_DATA
    NAME_TEXT
    That field contains the information that I need. But the problem is, this table in not allowed to be used as a join table.
    I have been looking with the tables conected to this field but they do not load the data that I need.
    If someone know something about it,

    Irma, como estás?
                                  Probá con la tabla USER_ADDR o la USR03.
    Saludos

  • Query for purchase

    Hi All,
    I am unable to use this query as the data is repeating.
    SELECT  T1.CARDCODE, T1.CARDNAME , T1.DOCNUM  as 'PURCHASE ORDER#',T1.DocStatus 'PO Status', T1.DOCDATE 'PO Date', T1.DocTotal 'PO Total', T0.[Dscription], T0.[Quantity],T0.[OpenQty],T1.[U_RevNo], T1.[U_RevDt],  T1.[U_RevRmrks],T1.[Comments], T3.DOCNUM DRN#,T3.DocStatus 'DRN Status', T3.DOCDATE 'DRN Date',T2.[Dscription], T2.[Quantity],T2.[U_ExcsqTY] as 'Short/Excess', T3.DocTotal 'DRN Total',T3.[Comments],T5.DOCNUM Invoice#,T5.DocStatus 'Invoice Status', T5.DOCDATE 'Invoice Date',T4.[Dscription], T4.[Quantity], (T5.DocTotal-T5.VatSum-T5.TotalExpns-T5.DiscSum) 'Total Before Discount', T5.VatSum 'Tax', T5.TotalExpns 'Freight', (T5.DocTotal - T5.PaidToDate) 'Total Payment Due',T5.[Comments], T7.DOCNUM  AS 'CREDIT MEMO#', T7.DOCDATE, T7.DOCTOTAL,T6.[Dscription], T6.[Quantity],T7.[Comments]
    FROM DBO.POR1 T0
    INNER JOIN DBO.OPOR T1 ON T1.DOCENTRY = T0.DOCENTRY
    LEFT JOIN DBO.PDN1 T2 ON T2.BASEENTRY = T1.DOCENTRY
    LEFT JOIN DBO.OPDN T3 ON T2.DOCENTRY = T3.DOCENTRY
    LEFT JOIN DBO.PCH1 T4 ON T4.BASEENTRY = T1.DOCENTRY
    LEFT JOIN DBO.OPCH T5 ON T5.DOCENTRY = T4.DOCENTRY
    LEFT JOIN DBO.RPC1 T6 ON T6.BASEENTRY = T5.DOCENTRY
    LEFT JOIN DBO.ORPC T7 ON T7.DOCENTRY = T6.DOCENTRY
    where T1.DOCDATE >='[%0]' and T1.DOCDATE <='[%1]'
    I tried to use distinct in the query but it shows error ,'The ntext type data cannot be selected as DISTINCT because it is not comparable.'
    Thanks,
    Joseph

    Hi Joseph,
    Try this:
    SELECT T1.CARDCODE, T1.CARDNAME , T1.DOCNUM as 'PURCHASE ORDER#',T1.DocStatus 'PO Status', T1.DOCDATE 'PO Date', T1.DocTotal 'PO Total', T0.Dscription, T0.Quantity,T0.OpenQty,T1.Comments, T3.DOCNUM DRN#,T3.DocStatus 'DRN Status', T3.DOCDATE 'DRN Date',T2.Dscription, T2.Quantity, T3.DocTotal 'DRN Total',T3.Comments,T5.DOCNUM Invoice#,T5.DocStatus 'Invoice Status', T5.DOCDATE 'Invoice Date',T4.Dscription, T4.Quantity, (T5.DocTotal-T5.VatSum-T5.TotalExpns-T5.DiscSum) 'Total Before Discount', T5.VatSum 'Tax', T5.TotalExpns 'Freight', (T5.DocTotal - T5.PaidToDate) 'Total Payment Due',T5.Comments, T7.DOCNUM AS 'CREDIT MEMO#', T7.DOCDATE, T7.DOCTOTAL,T6.Dscription, T6.Quantity,T7.Comments
    FROM DBO.POR1 T0
    INNER JOIN DBO.OPOR T1 ON T1.DOCENTRY = T0.DOCENTRY
    LEFT JOIN DBO.PDN1 T2 ON T2.BASEENTRY = T1.DOCENTRY AND T2.BaseLine=T0.LineNum
    LEFT JOIN DBO.OPDN T3 ON T2.DOCENTRY = T3.DOCENTRY
    LEFT JOIN DBO.PCH1 T4 ON T4.BASEENTRY = T1.DOCENTRY AND T4.BaseLine=T2.LineNum
    LEFT JOIN DBO.OPCH T5 ON T5.DOCENTRY = T4.DOCENTRY
    LEFT JOIN DBO.RPC1 T6 ON T6.BASEENTRY = T5.DOCENTRY AND T6.BaseLine=T4.LineNum
    LEFT JOIN DBO.ORPC T7 ON T7.DOCENTRY = T6.DOCENTRY
    where T1.DOCDATE >='[%0\]' and T1.DOCDATE <='[%1\]'
    Thanks,
    Gordon

  • SQL Query for Purchase Order

    Hi Experts,
                      The user has requested to prepare current datewise report of all purchase order. Please guide me regarding this.

    Hi Shailesh.....
    Try this.....
    Select T0.DocNum, T0.CardName, T0.DocStatus, T1.Dscription, T1.Quantity, T1.Price, T1.LineTotal
    from OPOR T0 Inner Join POR1 T1 On T0.DocEntry=T1.DocEntry
    Where DateDiff (dd, T0.DocDate, GetDate())=0
    Regards,
    Rahul

  • Query for invoice and distribution detail

    hi 2 all
    anybody have the query for getting invoice with distribution detail in oracle payable r12.
    thanks
    zulqarnain

    select ass.SEGMENT1 vendor_number,
    ass.VENDOR_NAME,
    assa.VENDOR_SITE_CODE VENDOR_SITE,
    aia.INVOICE_NUM,
    aia.INVOICE_DATE,
    aia.INVOICE_AMOUNT,
    aia.INVOICE_TYPE_LOOKUP_CODE,
    gcc.CONCATENATED_SEGMENTS distribution_account ,
    gcc1.CONCATENATED_SEGMENTS liability_account,
    to_char(aia.GL_DATE) GL_DATE,
    AP_INVOICES_PKG.GET_APPROVAL_STATUS( AIa.INVOICE_ID,
    AIa.INVOICE_AMOUNT, AIa.PAYMENT_STATUS_FLAG,
    AIa.INVOICE_TYPE_LOOKUP_CODE) APPROVAL_STATUS_LOOKUP_CODE
    from ap_invoices_all aia,
    ap_suppliers ass,
    ap_supplier_sites_all assa,
    ap_invoice_distributions_all aid,
    gl_code_combinations_kfv gcc,
    gl_code_combinations_kfv gcc1
    where aia.VENDOR_ID = ass.VENDOR_ID
    and assa.VENDOR_SITE_ID = aia.VENDOR_SITE_ID
    and ass.VENDOR_ID = assa.VENDOR_ID
    and aid.INVOICE_ID = aia.INVOICE_ID
    and aid.DIST_CODE_COMBINATION_ID = gcc.CODE_COMBINATION_ID
    and assa.ACCTS_PAY_CODE_COMBINATION_ID = gcc1.CODE_COMBINATION_ID
    --and aia.INVOICE_ID =  81000
    and aia.GL_DATE between '01-JAN-12' and '31-MAR-12'
    order by aia.GL_DATE
    Thanks,
    Atul

  • Purchase order excise invoice details

    hi experts,
    i am creating a simple report for purchase order excise invoice details.
    here are the tables what i am using for the report
    j_1iexchdr
    ekpo
    ekbe
    is tables are correct....
    can any one suggest weather it is better to use for all entries in or innerjoin ......
    was there is any standard report for po excise invoice datails.....
    any one was working on this report please give me the details about the key relations about the report.
    Thanks in advance.
    Regards,
    karunakar
    Edited by: bkarunakar on Jun 30, 2011 9:11 AM
    Moderator message: please search for available information/documentation, e.g. Please Read before Posting in the Performance and Tuning Forum.
    Edited by: Thomas Zloch on Jun 30, 2011 10:22 AM

    Hi Yoga,
    You can use Parner Schema in your Vendor Master for this issue.
    If you want a partner schema for your own document type then define your partner schema and assign to document type using the below mentioned path.
    IMG->MATERIAL MANAGEMENT->PURCHASING->PARTNER ->DETERMINATION - >PARTNER SETTINGS IN PURCHASING DOCUMENTS ->DEFINE PERMISSION  PARTNER SCHEMAS
    And then
    ASSIGN PARTNER SCHEMAS TO DOCUMENT TYPE
    Bye,
    Muralidhara

  • Query for getting address from RA_CUSTOMER_TRX_ALL.REMIT_TO_ADDRESS_ID

    Some one please provide query for getting REMIT TO ADDRESS details by using the column RA_CUSTOMER_TRX_ALL.REMIT_TO_ADDRESS_ID

    try
    select ct.remit_to_address_id,
           raa_remit_ps.party_site_number,
           raa_remit_loc.state,
           ft_remit.territory_short_name,
           ct.*
      from ra_customer_trx_all    ct,
           hz_cust_acct_sites_all raa_remit,
           hz_party_sites         raa_remit_ps,
           hz_locations           raa_remit_loc,
           fnd_territories_vl     ft_remit
    where 1 = 1
       and ct.remit_to_address_id = raa_remit.cust_acct_site_id(+)
       and raa_remit.party_site_id = raa_remit_ps.party_site_id(+)
       and raa_remit_loc.location_id(+) = raa_remit_ps.location_id
       and raa_remit_loc.country = ft_remit.territory_code(+)

  • Windows Intune Purchase Query for Microsoft Silver Competency Partner India

    Hi Support
    We are having a query regarding purchasing of Windows Intune. We are Microsoft Silver Competency Partner with
    Partner ID: #####.
    We just want to know that is there any discount available for Microsoft Silver Competency Partner on purchasing of Windows Intune?
    Please send us the discount information ASAP.

    Ashish. You shouldn't publish your partner details on a public forum like this - I'd advise you to remove it. This is a question for your Microsoft Licensing Reseller.
    Gerry Hampson | Blog:
    www.gerryhampsoncm.blogspot.ie | LinkedIn:
    Gerry Hampson | Twitter:
    @gerryhampson

  • Query for Opening Stock + Purchase Qty + Sales Qty

    Hi ,
    Can anyboday help me by how to develop a query for the following requirement. If any custom query is available please provide me .We are working on SBO 2007B PL 8. The required report structure is 
        ItemNo ***OpeningStock**** Purchase ********* Sales****
    (Batchwise)** Qty*** Value ****Qty** Value ***Qty***Value
    Thanks & Regards
    Srini

    Hi Srini,
    I found this on the forum, see if it helps you;
    select b.Itemcode,b.Item_Description,b.UOM, b.rate as Rate,b.Opening_Stock,b.Receipt,b.Issue, b.Material_Revalue,b.Closing_Stock,b.Closing_Value from (select *,(case closing_stock when 0 then 0 else(Closing_Value/Closing_Stock)end) as Rate from( SELECT T0.Itemcode as 'Itemcode' ,min(T0.Dscription) as 'Item_Description', max(T1.InvntryUom) as UOM, (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.docdate<'[%0]' and O1.transtype in (58,59,20,16,67,-2)),0) - isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.docdate<'[%0]' and O1.transtype in (58,21,19,60,15,67,-2,13)),0)+ (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.docdate>='[%0]' and O1.docdate<='[%1]' and O1.transtype in (-2)),0) - isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.docdate>='[%0]' and O1.docdate<='[%1]' and O1.transtype in (-2)),0)))as Opening_Stock, (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.docdate>='[%0]' and O1.docdate<='[%1]' and O1.inqty>0 and O1.transtype in (20,18)),0) + isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.docdate>='[%0]' and O1.docdate<='[%1]' and O1.inqty>0 and O1.transtype in (67)),0) + isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.docdate>='[%0]' and O1.docdate<='[%1]' and O1.inqty>0 and O1.transtype in (58,59,16,14)),0)) as Receipt, (isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.docdate>='[%0]' and O1.docdate<='[%1]' and O1.outqty>0 and O1.transtype in (13,15)),0) + isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.docdate>='[%0]' and O1.docdate<='[%1]' and O1.outqty>0 and O1.transtype in (67)),0)+ isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.docdate>='[%0]' and O1.docdate<='[%1]' and O1.outqty>0 and O1.transtype in (58,60,21,19)),0)) as Issue, isnull((select sum(Transvalue) from OINM O1 where O1.itemcode=T1.itemcode and O1.docdate<='[%1]' and O1.transtype in (162)),0) as Material_Revalue, (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.docdate<='[%1]' and O1.transtype in (58,59,20,16,14,19,67,-2)),0) - isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.docdate<='[%1]' and O1.transtype in (58,21,19,60,15,67,-2,13)),0))as Closing_Stock, isnull((select sum(Transvalue) from OINM O1 where O1.itemcode=T1.itemcode and O1.docdate<='[%1]' and O1.transtype in (58,18,-2,67,59,20,16,14,15,13,21,19,60,69,162)),0) as Closing_Value FROM OINM T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode INNER JOIN OITW T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OITB B1 ON T1.ItmsGrpCod=B1.ItmsGrpCod where ((B1.ItmsGrpNam>='[%2]' and B1.ItmsGrpNam<='[%3]') or ('[%2]'='' and '[%3]'='')) GROUP BY T1.itemcode,T0.Itemcode )a Where (a.Opening_Stock + a.Receipt + a.Issue + a.Material_Revalue + a.Closing_Stock + a.Closing_Value) <> 0 )b 
    Thanks,
    Joseph

Maybe you are looking for