Sales and Collection Report

Dear Experts
Am using below query for Sales and collection report but i came across that if i have  cancel any incoming payment is also showing in this report.
Am requesting to modify this query in which if i or user do any cancellation of transction should not reflect in this report.In short Excluding of Cancelled entry
Thanks in Advance
Parikshit
SELECT  M.SlpName, M.Sales,  M.Collection
FROM (SELECT T1.SlpName AS 'SlpName',SUM(T0.DocTotal) as 'Sales', 0 as 'Collection'
FROM OINV T0 INNER JOIN OSLP T1 ON T0.SlpCode = T1.SlpCode
WHERE T0.DocDate >=[%0] AND T0.DocDate <=[%1]
GROUP BY T1.SlpName
UNION ALL
SELECT H2.SlpName AS 'SlpName', 0, SUM(H0.DocTotal) as 'Collection'
FROM ORCT H0 INNER JOIN OCRD H1 ON H0.CardCode = H1.CardCode
INNER JOIN OSLP H2 ON H1.SlpCode = H2.SlpCode
WHERE H0.DocDate >= [%0] AND
H0.DocDate <=[%1] GROUP BY H2.SlpName
)M

SOLVED

Similar Messages

  • Sales and stock report

    how to finding a site wise sales and stock report?
    please reply ASAP

    Stock Ledger Analytics should provide what you need. Some information can be found here: help.sap.com > SAP NetWeaver > BI Content > SAP NetWeaver 7.0 BI Content Add-On 4 SP 06 > Industry Solutions > Trading Industries > Retail Trade > Supply Chain Analytics > Stock Ledger Analytics (Link: http://help.sap.com/saphelp_nw70/helpdata/en/1c/8451a1005f4371b9c630a285ea7a7d/frameset.htm)

  • Sale and trend report is too late?

    Hello every body!
    I often get Apple's sale and trend report is often on the middle of the month (around 10th to 15th). My friend got sale and trend report for January of 2012 a week ago, it's on 9th. But now I still got nothing.
    This make me a little bit worry, is this normal and often happening to you?
    Sorry about my bad English

    The Monthly Financial Reports always show up around the same time....don't panic yet.
    It is best to be patient...always

  • Accounts Receivable and collections report project-wise

    Dear all,
    My client wants accounts receivable and collections reports project wise. are there any reports in PS which satify this requirements. If no, pls suggest me how to cater to this requirement.
    Pls help me on this issue.
    Thank you very much in advance.
    Regards,
    Vishnu.

    Hi,
    If your cash flow scenario is very complex with partial payments, deferred debt, down payments etc., none of the standard reports including FBL5N / FBL1N will be helpful. If the scenario is fairly simple , FBL5N / FBL1N  should work for you.
    In a complex scenario, you may have develop your own reports based on the basic logic of FBL5N.
    Regards
    Murali

  • Script to auto download daily sales and trend reports

    Does anyone have any sort of script to automate the downloading of daily (or weekly) sales and trend reports that they would be willing to share?
    Thanks.

    I got tired of downloading and formatting in excel, so I wrote a quick and dirty PHP file that takes a directory with daily reports (.txt files) and converts them into a summary report broken into products, units sold, downloaded, royalty totals, etc. You can also set a date range. I haven't split out the sales by country yet, as I mainly just wanted to see overall sales trends. You can grab it from:
    http://www.ezone.com/download/iphonereports.zip
    All you need is a server running php (or php on a local machine). The script also allows you to upload a report into your directory using a web form. Alternatively, you could run RickMaddy's sh script as a cron job and have it download and save the reports on your server.
    If you do use this script the only thing I ask is that you don't leave crap reviews or links to your app on other developer's app description pages. Come guys, let's work together.

  • How do find Oustanding Sales Report and Collection Report for A/R Invoice

    Dear All,
                     I need to find the Sales Outstanding amount and Collection details like Check or Cash Or RTGS this is including A/R Invoice Amount and JE Pending Amount. Is it possible?
    Kindly any body let me know some idea or if any sql query, plz send me.
    Advance Thanks to all.
    Regards,
    A. Anvar

    Hi!
    Check this, with little modification you can get the report i think
    Declare @FromDate as Datetime
    Declare @ToDate as Datetime
    SET @FromDate = (Select Min(S0.TaxDate) from ORCT S0 where S0.TaxDate >='20110201')
    SET @ToDate = (Select Max(S1.TaxDate) from ORCT S1 Where S1.TaxDate < ='20110228')
    Select R0.TaxDate,R0.Docnum,R0.CardCode,
    'Cash' [Payment Mode],R0.CashSum [Amount]  from ORCT R0
    Where
    R0.TaxDate >=@FromDate and R0.TaxDate <=@ToDate   and R0.Canceled = 'N'
    Union All
    Select R0.TaxDate,R0.Docnum,R0.CardCode,
    'Cheque' [Payment Mode],R0.CheckSum  [Amount]  from ORCT R0
    Where
    R0.TaxDate >=@FromDate and R0.TaxDate <=@ToDate  and R0.Canceled = 'N'
    Union All
    Select R0.TaxDate,R0.Docnum,R0.CardCode,
    'Discount' [Payment Mode],R0.TrsfrSum  [Amount] from ORCT R0
    Where
    R0.TaxDate >=@FromDate and R0.TaxDate <=@ToDate and R0.Canceled = 'N'

  • Sales and Tax reports separated by currency

    I searched the forum and had a live chat with Adobe support with no result
    BC supports multiple currencies and has the option to set taxes per country or region.
    One would expect that BC therefore should supply reporting for sales per currency and tax reports for each defined tax setting.
    But it doesn't - sales numbers are all collected as it was in one currency. I have 7 currencies in my webshop.
    The sales numbers are totally wrong in the system. All currencies are summarized together without any separation.
    Imagine me trying to do a tax report, US only has so many taxes and even sub taxes for some states.
    It is practically impossible.
    I am reaching out to the readers of this development forum.
    Please, please, please is there anyone who can build something to fix this problem in BC.
    I am willing to pay for it.

    Hi,
    You may double click the column header to change the sort.
    Thanks,
    Gordon

  • Sales and Costs Report

    Hi All,
    I have a requirement for a report in which I have to display the "sales" of the last working day and the "costs of sales" for it and also the sales and costs of sales for the total month(i.e from 1st day of the month till last working day).
    I thought to use CO-PA for the costs. Is this the right option or do we have any other data sources which picks up the costs(Will any of the 0CO_OM_* extractors work?)? If the CO-PA is the correct option then which one do I need to use i.e either Cost based or Accounting based? What is the difference between them?
    As the report is at day level does the CO-PA contains Day level data?
    If I have to create this report I think I have to create a multiprovider with the sales and CO-PA cubes? Can we do this?
    By the way, the report is at distribution channel level.
    Awaiting your reply...
    Thanks & Best Rgds,
    Ram.

    Hello Ram,
    As you are telling COPA is not Installed in R/3 there is no need to think on it to implement COPA on BW side.
    Anyway for information on Cost based and Account based COPA, check the following link.
    Re: Costing based Vs Accounting based COPA
    Costing based COPA will follow the method of COST-OF-SALES to analyse.
    Next coming to your requirement of Sales & Costs of Sales..
    Billing Information is sufficient.
    Check with Datasource 2LIS_13_VDITM & BC Infocube for billing.
    this Billing Infocube can give information on Costs of sales, Revenues..
    But if you want to see <b>Costs of Open orders</b> also means you need to fetch data from Sales Order Item Level  also (2LIS_11_VAITM).
    In Nutshell..
    2LIS_13_VDITM - You can use for Costs of Sales & Revenues etc.
    2LIS_11_VAITM - Use it for Cost of Open Orders.
    If you need both Sales & Open Orders Costs means go for Multiprovider (Built based on Billing InfoCube & Sales Order Infocube)
    I hope this infomation helps you.
    Thanks & Regards,
    NK.A
    Dont forget to assign points if useful.

  • Sales and MM Reports

    Hi Experts,
    A client has asked me to explore Order-TO Cash Reports (SD) and Plan to Distribute (MM) Reports. Can somebody put light into it like fields, business process.

    Take a look at the following in the SAP Help Portal:
    [Enterprise Sales and Distribution|http://help.sap.com/saphelp_nw70/helpdata/en/17/cd5e407aa4c44ce10000000a1550b0/frameset.htm]
    [Accounts Receivable and Accounts Payable|http://help.sap.com/saphelp_nw70/helpdata/en/ee/cd143c5db89b00e10000000a114084/frameset.htm]
    Depending on how Plan-to-Distribute is defined (it could span across more than just Materials Managemenr - e.g. it could include Project Systems, Production Planning or even the DRM or Distribution Relationship Management Industry Solution):
    [Supply Chain Management|http://help.sap.com/saphelp_nw70/helpdata/en/29/79eb3cad744026e10000000a11405a/frameset.htm]
    [Product Lifecycle Management|http://help.sap.com/saphelp_nw70/helpdata/en/18/7beb3cad744026e10000000a11405a/frameset.htm]

  • Sales and Purshasen reporting

    Hi everyone,
    I would like to have a reporting including the followings:
    sales/purchase docs number, price, date of purchase/sales, date of receipt/delivery, date of invoice, amount of invoice, date of paiement, amount of paiement.
    Does somebody have a transaction for that or know how to do this?
    regards.

    hi
    what u need will not available in a single report
    go to t code SAP1 here  u will get all std SAP reports from here u can choose the relevent reports
    now what u tailking is the sales and purchase register
    Purchase register means Total Purchases happen during the period , invoice amt , vendor details, etc.
    purchase register should contain below detail.
    order detail
    grn detail
    invoice detail
    for order detail use : ekko , ekpo
    grn detail : mkpf , mseg
    invoice detail : rbkp , rseg
    root is purchase order no. in ekko.
    sale registers and purchase registers
    similarly u can do for sales
    take help from ABAPer
    what u want as from purchase side u can get it in  ME80FN here select the po histry mode
    got o me80fn execute
    then at right u will get the button of change view from here select PO HISTRY
    regards
    KI

  • Sales and trends reporting problem

    Itunes connect stopped reporting sales for my book 3 days ago and gave a message to contact them, which I have done, but no reply and still no reports. Anyone know of a next step?
    Thanks

    hi
    what u need will not available in a single report
    go to t code SAP1 here  u will get all std SAP reports from here u can choose the relevent reports
    now what u tailking is the sales and purchase register
    Purchase register means Total Purchases happen during the period , invoice amt , vendor details, etc.
    purchase register should contain below detail.
    order detail
    grn detail
    invoice detail
    for order detail use : ekko , ekpo
    grn detail : mkpf , mseg
    invoice detail : rbkp , rseg
    root is purchase order no. in ekko.
    sale registers and purchase registers
    similarly u can do for sales
    take help from ABAPer
    what u want as from purchase side u can get it in  ME80FN here select the po histry mode
    got o me80fn execute
    then at right u will get the button of change view from here select PO HISTRY
    regards
    KI

  • Actual sales and collection of salesmen.

    %%There is a 2500 character limit.  Please re-post with less code %%
    Dear Experts,
    This report is working correct but the problem is i need to set a date range selection-screen optin  to get
    given range sales of a salesmen, so plz  help me in this regard which field can i use how to provide code for that.
    Thanks.
    Mohammed.
    *& Report  Z_A_SAL_COM
    REPORT Z_A_SAL_COM  NO STANDARD PAGE HEADING
    LINE-SIZE 80
    line-count 60.
    TABLES : KNC1,KNA1,KNVP.
    TYPES : BEGIN OF TY_KNVP,
            KUNNR TYPE KNVP-KUNNR,
            PERNR TYPE KNVP-PERNR,
            END OF TY_KNVP,
            BEGIN OF TY_KNA1,
            KUNNR TYPE KNA1-KUNNR,
            NAME1 TYPE KNA1-NAME1,
            LAND1 TYPE KNA1-LAND1,
            END OF TY_KNA1,
            BEGIN OF TY_KNC1,
            KUNNR TYPE KNC1-KUNNR,
            ERDAT type knc1-erdat,
            UM01U TYPE KNC1-UM01U,
            UM02U TYPE KNC1-UM02U,
            UM03U TYPE KNC1-UM03U,
            UM04U TYPE KNC1-UM04U,
            UM05U TYPE KNC1-UM05U,
            UM06U TYPE KNC1-UM06U,
            UM07U TYPE KNC1-UM07U,
            UM08U TYPE KNC1-UM08U,
            UM09U TYPE KNC1-UM09U,
            UM10U TYPE KNC1-UM10U,
            UM11U TYPE KNC1-UM11U,
            UM12U TYPE KNC1-UM12U,
            UM13U TYPE KNC1-UM13U,
            UM14U TYPE KNC1-UM14U,
            UM15U TYPE KNC1-UM15U,
            UM16U TYPE KNC1-UM16U,
            KUMAG TYPE KNC1-KUMAG,"COMM
            END OF TY_KNC1,
            BEGIN OF TY_FINAL,
            PERNR TYPE KNVP-PERNR,
            sname type pa0001-sname,
            KUNNR TYPE KNA1-KUNNR,
            NAME1 TYPE KNA1-NAME1,
            ERDAT type knc1-ERDAT,
            UM01U TYPE KNC1-UM01U,
            UM02U TYPE KNC1-UM02U,
            UM03U TYPE KNC1-UM03U,
            UM04U TYPE KNC1-UM04U,
            UM05U TYPE KNC1-UM05U,
            UM06U TYPE KNC1-UM06U,
            UM07U TYPE KNC1-UM07U,
            UM08U TYPE KNC1-UM08U,
            UM09U TYPE KNC1-UM09U,
            UM10U TYPE KNC1-UM10U,
            UM11U TYPE KNC1-UM11U,
            UM12U TYPE KNC1-UM12U,
            UM13U TYPE KNC1-UM13U,
            UM14U TYPE KNC1-UM14U,
            UM15U TYPE KNC1-UM15U,
            UM16U TYPE KNC1-UM16U,
            KUMAG TYPE KNC1-KUMAG,"COMM
            END OF TY_FINAL,
            begin of ty_pa0001,
            pernr type pa0001-pernr,
            sname type pa0001-sname,
            end of ty_pa0001.
    DATA :T_KNVP TYPE STANDARD TABLE OF TY_KNVP INITIAL SIZE 1,
          W_KNVP TYPE TY_KNVP,
          T_KNA1 TYPE STANDARD TABLE OF TY_KNA1 INITIAL SIZE 1,
          W_KNA1 TYPE TY_KNA1,
          T_KNC1 TYPE STANDARD TABLE OF TY_KNC1 INITIAL SIZE 1,
          W_KNC1 TYPE TY_KNC1,
          T_FINAL TYPE STANDARD TABLE OF TY_FINAL INITIAL SIZE 1,
          W_FINAL TYPE TY_FINAL,
          T_pa0001 TYPE STANDARD TABLE OF TY_pa0001 INITIAL SIZE 1,
          W_pa0001 TYPE TY_pa0001.
    DATA : TOTSAL TYPE P DECIMALS 2,
           TOTCOM TYPE P DECIMALS 2,
           MTOTAL TYPE P DECIMALS 2.
    TOTSAL = 0. TOTCOM = 0. MTOTAL = 0.
    data : gtabix type  i.
    *PARAMETERS : SID TYPE KNVP-PERNR.
    select-options : sid for knvp-pernr.
                     Date for knc1-ERDAT.
    SELECT KUNNR
           PERNR
           FROM KNVP
           INTO TABLE T_KNVP
           WHERE PERNR in SID.
    check t_knvp is not initial.
    SELECT PERNR
           SNAME
           FROM PA0001
           INTO TABLE T_PA0001
           FOR ALL ENTRIES IN T_KNVP
           WHERE PERNR = T_KNVP-PERNR.
    CHECK T_KNVP IS NOT INITIAL.
    SELECT  KUNNR
            ERDAT
            UM01U
            UM02U
            UM03U
            UM04U
            UM05U
            UM06U
            UM07U
            UM08U
            UM09U
            UM10U
            UM11U
            UM12U
            UM13U
            UM14U
            UM15U
            UM16U
            KUMAG
            FROM KNC1
            INTO TABLE T_KNC1
            FOR ALL ENTRIES IN T_KNVP
            WHERE KUNNR = T_KNVP-KUNNR
            AND BUKRS = '0002'
            AND GJAHR = '2009'.
           and erdat in date.
    CHECK T_KNC1 IS NOT INITIAL.
    SELECT KUNNR
           NAME1
           LAND1
           FROM KNA1
           INTO TABLE T_KNA1
           FOR ALL ENTRIES IN T_KNC1
           WHERE KUNNR = T_KNC1-KUNNR.
    *LOOP AT T_KNVP INTO W_KNVP.
    LOOP AT T_KNC1 INTO W_KNC1.
    READ TABLE T_KNVP INTO W_KNVP WITH KEY KUNNR = W_KNC1-KUNNR.
    READ TABLE T_KNA1 INTO W_KNA1 WITH KEY KUNNR = W_KNC1-KUNNR.
    Read table t_PA0001 into w_pa0001 with key PERNR = w_knvp-PERNR.
    *READ TABLE T_KNC1 INTO W_KNC1 WITH KEY KUNNR = W_KNVP-KUNNR.
    W_FINAL-PERNR   = W_KNVP-PERNR.
    W_FINAL-SNAME   = W_PA0001-SNAME.
    W_FINAL-KUNNR   = W_KNA1-KUNNR.
    W_FINAL-NAME1   = W_KNA1-NAME1.
    w_final-erdat   = w_knc1-erdat.
    W_FINAL-UM01U   = W_KNC1-UM01U.
    W_FINAL-UM02U   = W_KNC1-UM02U.
    W_FINAL-UM03U   = W_KNC1-UM03U.
    W_FINAL-UM04U   = W_KNC1-UM04U.
    W_FINAL-UM05U   = W_KNC1-UM05U.
    W_FINAL-UM06U   = W_KNC1-UM06U.
    W_FINAL-UM07U   = W_KNC1-UM07U.
    W_FINAL-UM08U   = W_KNC1-UM08U.
    W_FINAL-UM09U   = W_KNC1-UM09U.
    W_FINAL-UM10U   = W_KNC1-UM10U.
    W_FINAL-UM11U   = W_KNC1-UM11U.
    W_FINAL-UM12U   = W_KNC1-UM12U.
    W_FINAL-UM13U   = W_KNC1-UM13U.
    W_FINAL-UM14U   = W_KNC1-UM14U.
    W_FINAL-UM15U   = W_KNC1-UM15U.
    W_FINAL-UM16U   = W_KNC1-UM16U.
    W_FINAL-KUMAG   = W_KNC1-KUMAG / 1000.
    DELETE ADJACENT DUPLICATES FROM  T_FINAL COMPARING KUNNR.
    APPEND W_FINAL TO T_FINAL.
    CLEAR : W_KNVP,
            W_KNA1,
            W_KNC1,
            W_FINAL,
            w_pa0001.
    ENDLOOP.
    SORT T_FINAL  BY pernr KUNNR.
    LOOP AT T_FINAL INTO W_FINAL.
    *if w_final-erdat <= date-low  and w_final-erdat >= date-high.
    at new pernr.
    gtabix = sy-tabix.
    read table t_final into w_final index gtabix.
    format color 5.
    write :/01 sy-vline,
             03 w_final-pernr,14 sy-vline,
             15 W_FINAL-SNAME,47 sy-vline,64 sy-vline,80 sy-vline.
    format color off.
    endat.
    AT END OF KUNNR.
    SUM.
    TOTSAL = ( W_FINAL-UM01U + W_FINAL-UM02U + W_FINAL-UM03U  +  W_FINAL-UM04U  + W_FINAL-UM05U + W_FINAL-UM06U  +  W_FINAL-UM07U + W_FINAL-UM08U  + W_FINAL-UM09U + W_FINAL-UM10U  +  W_FINAL-UM11U  +  W_FINAL-UM12U   +   W_FINAL-UM13U   +  W_FINAL-UM14U  +
    W_FINAL-UM15U  +  W_FINAL-UM16U ) / 1000.
    gtabix = sy-tabix.
    read table t_final into w_final index gtabix.
    WRITE : /01 sy-vline,
             05 W_FINAL-KUNNR,14 sy-vline,
             15 W_FINAL-NAME1,47 sy-vline,
             48 TOTSAL,64 sy-vline,
             65 W_FINAL-KUMAG, 80 sy-vline.
    MTOTAL = MTOTAL + totsal.
    CLEAR TOTSAL.
    ENDAT.
    at end of pernr.
    sum.
    uline.
    WRITE :/35 'Total:' color col_total, 48 MTOTAL color col_total,65 W_FINAL-KUMAG color col_total.
    clear mtotal.
    endat.
    *AT LAST.
    *SUM.
    *ULINE.
    *WRITE :/35 'Grand Total:' color col_total, 48 MTOTAL color col_total,65 W_FINAL-KUMAG color col_total.
    *ENDAT.
    *endif.
    CLEAR W_FINAL.
    ENDLOOP.
    top-of-page.
    skip 3.
    WRITE :/35 'SALESMEN DETAILS' color col_heading.
    ULINE : /35(18).
    write :/03 'Salesmen Number:',sid-low,'To',sid-high,60 'Date    :',70 sy-datum.
    write :/60 'Page  No:', sy-pagno.
    uline.
    format color 1.
    WRITE :/01 sy-vline,
            02 'Customer No',14 sy-vline,
            15 'Name',47 sy-vline,
            53 'Tot Sales',64 sy-vline,
            66 'Tot Collection', 80 sy-vline.
    format color off.
    ULINE.
    Edited by: Mohammed on Apr 27, 2009 9:59 AM
    Edited by: Matt on Jun 1, 2009 7:49 AM

    SOLVED

  • Regarding Sale And Purchase Report

    Hello,
    At any point of time if we want to know what is the status of a particular purchase order or sales order, we cannot run the sale or sale analysis or purchase analysis.
    We have to depend on queries to get the output in the form as mention below;
    PO No., Item, QTY, Open Qty, GRPO, Item, GRPO Qty, Pending Qty, (Return,Item,  Return Qty (If any)), Invoice, Item, Qty, (Creditmemo, Item, Qty (If any)). Similar report is always required for sales too.
    I'm sure many of the customer's would also need the same. If any one can please tell me whether such reports would be included in SAP Business One any soon?
    Thanks,
    Joseph

    Dear Nitin,
    Price control V is used to evaluate the valuation of the MAP materials which are procured externally. This gets updates every time when do MIGO/MIRO for purchase order.
    Price control S is used for in house material, this gets updated when u run the ost estimate at the begining of every new period, at this time it considers all ur available Moving Avarage price of ur raw material and this estimate is constant till the end of the period. It can be changed through CKR1 and then MR21. But u cant evaluate using V, for details contact ur MM consultant, if it is also procured using split valuation it can be possible
    sree

  • Distribution channel-wise customer sales and outstanding report.

    Hi
    In our scenario, one customer is direct factory sales as well consignment sales customer also. We created two distribution channel. But customer master record is one.
    Now my client requires customer report:
    Total sales value and quantity - distribution channel wise
    Outstanding customer balance - distribution channel wise
    Please let me know if this report is possible.
    I tried with some reports: S_ALR_87012171 and S_ALR_87012186. But its showing total sales.
    I tried with VF05N. It shows billed amount and does not quantity.
    Please help.

    Distribution Channel-Wise Sales can be made avaialble thru Standard Reports or LIS / SIS.
    But, I believe you cannot get the Distribution Channel-wise Outstanding Report from SAP Standard. You will have to go for Z-Report Development.
    Speak to your ABAPer & get a new Report developed.
    Hope this helps,
    Thanks,
    Jignesh.

  • Sales & Collection Report

    Dear Experts
    Can anybody write query on Sales and Collection of the Salesman by datewise.
    As Example
    Salesman    Sales     Collection
    A                  1000        500
    B                  1500        2000
    C                 5000         2500
    thanks in advance
    Parikshit

    Hi,
    Try this,
    SELECT  M.SlpName, SUM(M.Sales) AS 'Sales', SUM(M.Collection) AS Collection
    FROM (SELECT  T0.DocDate AS 'DocDate', T1.SlpName AS 'SlpName', T0.DocTotal as 'Sales', 0 as 'Collection'
    FROM OINV T0 INNER JOIN OSLP T1 ON T0.SlpCode = T1.SlpCode
    UNION ALL
    SELECT H0.DocDate AS 'DocDate', H2.SlpName AS 'SlpName', 0, H0.DocTotal as 'Collection'
    FROM ORCT H0 INNER JOIN OCRD H1 ON H0.CardCode = H1.CardCode
    INNER JOIN OSLP H2 ON H1.SlpCode = H2.SlpCode
    )M
    GROUP BY M.SlpName
    OR
    SELECT  M.SlpName, M.Sales,  M.Collection
    FROM (SELECT T1.SlpName AS 'SlpName',SUM(T0.DocTotal) as 'Sales', 0 as 'Collection'
    FROM OINV T0 INNER JOIN OSLP T1 ON T0.SlpCode = T1.SlpCode
    WHERE T0.DocDate >=[%0] AND T0.DocDate <=[%1]
    GROUP BY T1.SlpName
    UNION ALL
    SELECT H2.SlpName AS 'SlpName', 0, SUM(H0.DocTotal) as 'Collection'
    FROM ORCT H0 INNER JOIN OCRD H1 ON H0.CardCode = H1.CardCode
    INNER JOIN OSLP H2 ON H1.SlpCode = H2.SlpCode
    WHERE H0.DocDate >= [%0] AND
    H0.DocDate <=[%1] GROUP BY H2.SlpName
    )M
    Regards,
    Madhan.

Maybe you are looking for

  • Static-nat and vpn tunnel bound traffic from same private address?

    Hi guys, I have site-to-site tunnel local host @192.168.0.250 and remote-host @172.16.3.3. For this local host @192.168.0.250, I also have a static one-to-one private to public. static (mgmt-192,outside-50) 216.9.50.250 192.168.0.250 netmask 255.255.

  • Connecter mac mini avec ecran 21:9

    Est-ce que quelqu'un a essaye de connecter son Mac Mini sur un ecran au format 16:9 ( 2560x1080 ). A priori le format va etre uniquement du 16:9 avec 2 bandes noires laterales.

  • Another question about query execution speed.

    I know I should normally start with posting the query but my question will take a little different direction, so here is the deal: We have an Apex application, there is a query on one of the pages that for certain users takes quite long, lets say 1mi

  • Airplay in your car

    I have set up an Airport Express in my car so I can Airplay from my Iphone to the car stereo.  My car has an aux jack I plug into from the airport express and it works great from Ipad, Iphone and Ipod Touch.  BUT, since I have no internet connected t

  • Cache entry created a long time after the report runs

    We have a report that results in more than 300,000 records. We get the results for the report in quick time but the cache entry gets created only after sometime, say around 30 mins later or so. Any idea why this delay? Is it that the report caches 25