Sales analysis report differences when run by Sales Empl as opposed to Item

My client is running Sales analysis report and notices differences when run by Sales Employee as opposed to by Item.
I explained that:
When run by item, the report does not include service type invoices or non-inventory items.
When run by sales employee it DOES include service type invoices and non-inventory items.
Are there any other differences I should be aware of?
Does someone have a query I can run to prove this difference i.e...invoices for non-inventory items for a period? To prove where the difference comes from between the two reports?
Thanks

You may try this first:
SELECT S.ItemCode,
MAX(S.Description) as 'Item Description',
SUM(S.LineTotal) as 'Amount(LC)'
FROM
(SELECT T1.ItemCode AS 'ItemCode',
T1.Dscription AS 'Description',
T1.LineTotal AS 'LineTotal'
FROM dbo.OINV T0
INNER JOIN dbo.INV1 T1 ON T1.DocENtry = T0.DocENtry
WHERE T0.docdate >= [%0] and T0.docdate <= [%1]
AND T0.doctype = 'I'
UNION
SELECT T1.ItemCode AS 'ItemCode',
T1.Dscription AS 'Description',
-T1.LineTotal AS 'LineTotal'
FROM dbo.ORIN T0
INNER JOIN dbo.RIN1 T1 ON T1.DocENtry = T0.DocENtry
WHERE T0.docdate >= [%0] and T0.docdate <= [%1]
AND T0.doctype = 'I') S
GROUP BY S.ItemCode
This is by item type transaction only.
Thanks,
Gordon

Similar Messages

  • Query vs Sales Analysis Report

    I wrote a query that does virtually the same thing as a sales analysis report -- add up all invoice totals and calculate a gross sales number.
    In the sales analysis report ItemXXX has a total sales of $1456.94
    My query ItemXXX has a total sales of $1457.73
    A $.79 discrepancy which I assumed was a result of the fact that my query doesn't include A/R Credit Memos. Only some items have this discrepancy.
    The problem is that if I do an inventory posting list on the item there are no A/R Credit Memos listed. Only A/R Invoices, A/P Invoices, and A/P Goods Receipts.
    What other documents could be affecting this number? Any other things that could be causing this?
    Thanks,
    -Steve

    Hi Nagarajan,
    Im user of Sap Business One, i need the completly query for obtain the Sales Analysis Report
    i have this but in some items dont match
    SELECT  ItemCode,   
            Sum(TotFac) - SUM(TotNC) as  'FacturadoNeto',   
            Sum(GBrutaFac)-SUM(GbrutaNC) as  'GBruta',   
            Round((Sum(GBrutaFac)-SUM(GbrutaNC))/case when  (Sum(TotFac) - SUM(TotNC))= 0 then 1 else (Sum(TotFac) - SUM(TotNC)) end  *100,2) as '% Margen'   
    FROM (   
    SELECT    
    ItemCode = T1.ItemCode, 
    Marca = (Select T2.FirmName from OMRC T2 JOIN OITM T3 on T2.FirmCode = T3.FirmCode where T3.ItemCode=T1.Itemcode), 
    TotFac = Sum(T1.Linetotal),    
    GBrutaFac = SUM(T1.GrssProfit),   
    TotNc= 0,   
    GbrutaNC = 0   
    FROM OINV T0 (NOLOCK) INNER JOIN INV1 T1 (NOLOCK) ON T0.DocEntry = T1.DocEntry                                    
    WHERE (T0.[DocDate] >='20140101' AND  T0.[DocDate] <='20141231') 
      and T0.DocType  = 'I' -- solo facturas por articulos   
    Group by  T1.ItemCode  
    Union   
    SELECT    
    ItemCode = T1.ItemCode,   
    Marca = (Select T2.FirmName from OMRC T2 JOIN OITM T3 on T2.FirmCode = T3.FirmCode where T3.ItemCode=T1.Itemcode), 
    TotFac = 0,   
    GBrutaFac = 0,   
    TotNc= Sum(T1.LineTotal),    
    GbrutaNC = SUM(T1.GrssProfit)   
    FROM ORIN T0 (NOLOCK) INNER JOIN RIN1 T1 (NOLOCK) ON T0.DocEntry = T1.DocEntry                                    
    WHERE (T0.[DocDate] >='20140101' AND  T0.[DocDate] <='20141231')
      and T0.DocType  = 'I' -- solo NC por articulos   
    Group by T1.ItemCode 
    Union
    SELECT    
    ItemCode = T1.ItemCode,   
    Marca = (Select T2.FirmName from OMRC T2 JOIN OITM T3 on T2.FirmCode = T3.FirmCode where T3.ItemCode=T1.Itemcode), 
    TotFac = 0,   
    GBrutaFac = 0,   
    TotNc= Sum(T1.LineTotal),    
    GbrutaNC = SUM(T1.GrssProfit)   
    FROM ODPI T0 (NOLOCK) INNER JOIN DPI1 T1 (NOLOCK) ON T0.DocEntry = T1.DocEntry                                    
    WHERE (T0.[DocDate] >='20140101' AND  T0.[DocDate] <='20141231')     
      and T0.DocType  = 'I' -- solo Fact Anticipos por articulos   
    Group by T1.ItemCode
    ) T   
    Group by  ItemCode, Marca

  • Sales analysis report - in query form?

    Good afternoon. Looking for a bit if help/advice.
    I'm not a complete novice to SAP but what I need is confusing me slightly. I understand the sales analysis report uses many different table as part of its calculations. A company I've recently began working for, who has had SAP for a while, has used sales analysis reports alongside some bespoke reports that are reporting different data.
    Here is their report:
    SELECT T0.[DocNum] AS 'Invoice No.',  CONVERT(VARCHAR(10),T0.[DocDate], 103) AS 'Invoice Date', T0.[NumAtCard] AS 'Cust Order No.', T4.[ItemCode], T5.[U_MSKU] AS 'Manuf SKU', T4.[Dscription] AS 'Description', T6.[ItmsGrpNam] AS 'Item Group', T4.[Quantity], T4.[Price] AS 'Net Unit Price', T4.[LineTotal] AS 'Net/Line Total', T0.[U_ClientNam] AS 'Client Name', T2.[Name] AS 'Division', T1.[Name] AS 'Business Unit', T3.[StreetS] AS 'Ship-to Street', T3.[CityS] AS 'Ship-to City', T3.[ZipCodeS] AS 'Ship-to Postcode'
    FROM OINV T0
    LEFT JOIN [dbo].[@BUSINESSUNITS]  T1 ON T0.U_Bizunits = T1.Code
    LEFT JOIN [dbo].[@DIVISIONS]  T2 ON T0.U_Division = T2.Code
    INNER JOIN INV12 T3 ON T0.DocEntry = T3.DocEntry
    INNER JOIN INV1 T4 ON T0.DocEntry = T4.DocEntry
    INNER JOIN OITM T5 ON T4.ItemCode = T5.ItemCode
    INNER JOIN OITB T6 ON T5.ItmsGrpCod = T6.ItmsGrpCod
    WHERE T0.[DocDate] BETWEEN [%0] AND [%1]  AND T0.[CardCode] = [%2]
    It just doesn't give the same totals as the sales analysis report but I can't reproduce the sales analysis report. How would I go about getting the right figures? Because what we ideally need is to filter the sales analysis results by some of our custom fields:
    [U_ClientNam], [Name] etc.
    How would I go about this? Can I extract parts of the sales analysis report somehow and run it as a query I can manipulate?
    Thanks.

    Hi, not sure if you meant to link to a thread? Based on the query you have given on this thread no totals appear to match however it is much closer than the simple query.
    SELECT Div, BusUnit, isnull([1],0) as Jan, isnull([2],0) as Feb, [3] as Mar, isnull([4],0) as Apr, isnull([5],0) as May, isnull([6],0) as june, isnull([7],0) as July, isnull([8],0) as Aug, isnull([9],0) as Sept, isnull([10],0) as Oct, isnull([11],0) as Nov, isnull([12],0) as Dec
    from
    (SELECT T1.[LineTotal] as Total, month(T0.[DocDate])as month, T8.[Name] AS BusUnit, T9.[Name] AS Div FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN [dbo].[@BUSINESSUNITS]  T8 ON T0.U_Bizunits = T8.Code INNER JOIN [dbo].[@DIVISIONS]  T9 ON T0.U_Division = T9.Code
    WHERE year(T0.[DocDate]) = 2013 and T0.[CardCode] = 'NOR0001'
    union all
    (SELECT -T1.[LineTotal] as Total, month(T0.[DocDate])as month, T8.[Name] AS BusUnit, T9.[Name] AS Div FROM ORIN T0 INNER JOIN RIN1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN [dbo].[@BUSINESSUNITS]  T8 ON T0.U_Bizunits = T8.Code INNER JOIN [dbo].[@DIVISIONS]  T9 ON T0.U_Division = T9.Code
    WHERE year(T0.[DocDate]) = 2013 and T0.[CardCode] = 'NOR0001')) S
    Pivot
    (sum(S.Total) For Month IN ([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12])) P
    Is what I've just used. Still well off the mark though.

  • Creating Sales Analysis Report in B1

    Can someone please help me with writing a query to pull Sales Analysis Report sorted and grouped by Sales Employee and Business Partner.
    The report contains the following columns:
    Sales Employee Name and Number, Business Partner Name & Number, Current Month Sales (or the month specified in the report parameter), Same Month's sale last year, YTD-Current Year, YTD-Previous Year
    Also, if you are interested in working on small Business One projects, please contact me with your resume, rate and location. You can work remotely.
    Thanks

    Hi Sam,
    Please check below links and modify according to your requirement.
    Sales Analysis query
    Re:Query for Statewise Sales Analysis Report involving two years..!!
    by below link you can take reference of Queries.
    My Top SQL Queries for SAP Business One
    Hope this helps
    Regards::::
    Atul Chakraborty

  • Quantity appears in Sales Analysis Report when the Drop Ship Warehouse is used

    Dear Experts,
    We would like your help in the following case. We are using SAP Business One 9.0 (PL10)
    When a Sales Invoice document is added to the system using the Drop Ship warehouse, then in the report 'Stock Posting List' it does not display the document, which is correct since a Drop Ship warehouse is used.
    However, the report 'Sales Analysis Report' displays the Invoice, but it also shows the quantity that is used in the document, which is not correct.
    Why is this happening? Is there any setting that excludes the display of the quantity of the document from the 'Sales Analysis Report', when the Drop Ship Warehouse is used?
    Thank you in advance
    Kind Regards,
    Vassilis Korolis

    Hi Vassilis,
    Sorry, but in my opinion it's correct.
    We also use Drop Ship and like you said in the Stock Posting List we don't have any document and it's perfect. In other way when we sell an item we want and it's true the quantity that B1 is showing.
    We want to see the for a itemcode we sold 100qty qith the value of 1000.
    There's no way to avoid this SAP B1 behaviour.
    Kind regards,
    Augusto

  • Sales Analysis report in XLR

    SAP XLR Sales per Customer by Item report that published in the portal doesn't include document discount. This is a reason for the differences between XLR and B1 sales analysis report.
    How can I calculate discount from the document in XLR when the report is run by invoice/credit memo lines.
    Edited by: Philip Eller on May 16, 2008 8:56 AM

    Hello,
    In XLR Composer> Sales tab, if you want to design a report group by document number, then choose the Document Number light dimension first,then "discount% per document",  choose item/quantity/row total and so on for row level information. This will give you the result instead of 0.
    If you want to run the report group by items. The same way you can do but the only difference is choose the item Dimension first, then you can also drag document level ,Document number for example.
    Header and row levels table can be connected and use together if there is the relationship between them.
    Choose discount % per document and then use calculation to calculate the discount amount of a document.
    Hope this helps.
    Regards,
    Maggie An
    SAP Business One Forum Team

  • Sales Analysis Report - Items -- blank result

    Hi,
    I'm testing a setup and running the sales analysis report. It works for the Customer version but I get no results when running on Items.
    I'm on SBO 2007A SP01 PL07. There are open and closed invoices for inventory items; no credit memos have been posted. All Item type invoices.
    When I run by Customer, I get the correct data - open and closed invoices for that customer.
    When I run by Items, I get no results. The date range is the same for both reports.
    When I run the purchase analysis on Items, I get data for the same items I am trying to see in the sales analysis.
    Any ideas what could be causing this?
    Thank you,
    Heather

    HI Gordon,
    I left the default settings: 
    - Annual Report, Invoices, Individual Display, No Totals
    - Posting Date:  whole fiscal year
    - Main selection:  left blank/default (group = all, no properties)
    I have double/triple/quadruple-check even the Secondary SElection to make sure there's nothing there.
    I have also run it on Due Date instead of Posting Date, still no results (if run on Items).
    As I mentioned, the selection criteria is what I want but for some reason that one version, Items, does not work. The other 2 tabs work with the same selection.
    Heather

  • Hide Particular Item Group from Selection Criteria of Sales Analysis Report

    Hello Experts,
    Is this possible to Hide Particular Item Group from Selection Criteria of Sales Analysis Report?
    I have one Item Group as 'Special Items'.
    Now, when I open  Item wise sales analysis report, I want to hide above mentioned group from selection criteria.
    Thanks in advance.
    Best Regards,
    Pankit Sheth

    Hi,
    1. Not possible to put validation for selection criteria windows.
    2. In standard, I don't think it is possible to hide only one item group.
    3. Alternatively don't give authorization to user for running sales reports. If still need create customized query and ask user run every month.
    Thanks & Regards,
    Nagarajan

  • Data Ownership in Sales Analysis Report

    The company has sales employees around the world and the company is not interested that each of them
    can see the others sales, so when an employee runs a sales analysis report they should only see
    their own documents but it not happened despite the data ownership funtion was activated and all the
    options related with the sales analysis excluded forms was filtered by header only.
    According to SAP Support team their comments were:
    "We have reproduced the issue in our testing database. After verification, we noted that this is the current system definition as described in the attached Data_Ownership2004_A.pdf file. In page 11, it mentions that Data Ownership Authorizations apply to sales and purchasing documents, the Open Items List, Sales Opportunities and Sales Opportunities Reports. This is why the header filtration does n ot work in Sales Analysis Report.
    As the requirement is currently not available in the standard software version of SAP Business One, we would like to ask you post your requirement in our SAP Business One Product Development Collabora tion forum."
    Due to the current situation and the disconfort that this can produce, I will appreciate a lot your help.
    Thanks in adavance,
    Manuel Barrero

    Hi Vassilis,
    Sorry, but in my opinion it's correct.
    We also use Drop Ship and like you said in the Stock Posting List we don't have any document and it's perfect. In other way when we sell an item we want and it's true the quantity that B1 is showing.
    We want to see the for a itemcode we sold 100qty qith the value of 1000.
    There's no way to avoid this SAP B1 behaviour.
    Kind regards,
    Augusto

  • Sales Analysis Report Problem

    Hi all.
    I would be glad if I could get a response for this question from someone at SAP. Though all responses are very welcome.
    There seems to be an error on the Sales Analysis report. The report runs fine with selection criteria for Customers and Sales Employees but when you run it with the Items Selection Criteria it returns the correct rows but wrong amounts in the Gross Profit and Gross Profit % columns which also means that the totals are also wrong.
    I have tried to follow the issue but everything seems to be OK.
    My last resolution is that there may be something wrong with the stored proc that B1 runs to produce this report.
    Please help! Urgent.

    Wilfred,
    You should create a message with SAP Support on this issue.
    Eddy

  • Sales Analysis report does not match Cost of Sales Account

    My client is running SAP B1 8.81 PL 6.  He has set all items to standard costing method.  He has discovered that the difference between the Sales Amount and the Gross Profit amount on the Sales Analysis report, which should equal the Cost of Sales for the Items, does not match the Cost of Sales G/L account on the P&L report.  If you look at a sample of rows, the above difference divided by the quantity equals the standard cost of the item.  There are no manual journal entries that affect the COS account for the posting period that is being analyzed.  I cannot see any mathmatical difference or problem with the above analysis, nor can I find the problem.  There is about an $85K difference between the reports.  The Sales Amount on the Sales Analysis report matches the revenue account on the P&L to the penny.  Has anyone ever compared these 2 reports?  Thank you for your help.
    Bill Turek

    If you right click on an Invoice and choose "Gross Profit" it will give you a setting on how you want to calculate the Gross Profit for that invoice.
    In the accounting point of view the "Base Price" should be "Item Cost" so that the Gross Profit will be (Net Selling Price - Item Cost = Gross Profit). This will give you the same Gross Profit amount between P and L and Sales Analysis Report.
    However, SAP B1 gives the user the ability to select a different base price other than the Item Cost.
    This gives the user the flexibility for the Sales Report. Example (Net Sales Price - Vendor Sales Price = Gross Profit). People do this sometimes because  the item's cost fluctuates if you use FIFO or average cost and they want a uniform cost to calculate their Gross Profit.
    In summary if the Base Price is not set to "Item Cost" then there will be difference in the Gross Profit between the P and L and Sales Analysis Report.
    See screenshot:
    -Eric Alo-
    B1 Financial Consultant

  • Sales Analysis report results are being affected (or eliminated) by SQL

    When running Sales Analysis by Item (Item Tab), the client keys in item 15454*
    in the From and To Field and selects the first and last Item Codes listed
    in the result set. The first item code is The results of the Sales Analysis report includes items from 15454-048E-1-41.3 through 15454E-XC-10G.
    The result set stops at itemcode 15454-EIA-SMB-B84 despite that fact that there
    are many items with sales with Item Codes higher than the 15454-EIA-SMB-B84.
    The SAP support rep highlighted that the application is ignoring the dash in it's filtering priority even thought the item lookup is accounting for the dash.  The response is that this is the behavior of SQL server.
    It is true that SQL does ignore dashes and possibly other special characters in sorting nvarchar fields.  However, it is important that the lookup (to select a range of items) and the result set remain consistant in the application regardless of the database/datatype. 
    With no ability to customize (or fix) the report from the field, we are requesting this a a design change.  We recommend testing with all other special characters as to ensure that the report is actually producing accurate results.

    Hi Peter.......
    Welcome to SAP Forum....
    You can try this report which gives you result of Sales Order regardless of Current Status...
    Select * From ORDR T0 Inner Join RDR1 T1 on T0.DocEntry=T1.DocEntry
    Put the desired field in place of * which ever you want in report......
    Regards,
    Rahul

  • Sales Analysis Report - Monthly report shows blank output

    Hi,
    When i run the Sales Analysis Report - Customer (Annual) report for a data set it shows the correct data - large number of invoices
    However, there is no output available (blank output) when i use the the Monthly version of the same report using the same parameters. Even when i am taking the widest possible range of data sets ( large date range; no properties; All customers) i am not getting any output.  I am using Individual display.
    Please help out.
    Regards.
    Edited by: Manish Chaturvedi on Jul 14, 2009 11:56 AM

    hello
    In sales analysis report have u given posting date for a particular month if not give and select client /customer in group and run the report u will get exactly if not then u do have any postings for a particular month and definr due date that means posting period also
    regards
    jenny

  • How is the Sales Amount in the Sales Analysis Report calculated.

    Hi,
    I'm trying to develop a report similar to the sales analysis report of SAP.
    I want to know how does SAP calculate the the Sales Amount column. I was using LineTotal column of Invoices + A/R credit memos, but it's not correct. I know i'm getting all the records because my total quantity and Gross Profit is correct.

    Hi Vj Chris,
    Try This
    SELECT T0.[DocNum] as 'INV NO', T0.[DocDate] as 'INV DT', T0.[CardCode], T0.[CardName], T0.[DocTotal], T0.[GrosProfit], T1.[DocNum] as 'AR CR MEMO', T1.[DocDate] as' AR CR DT' , T1.[CardCode], T1.[CardName], T1.[DocTotal], T1.[GrosProfit], (T0.[DocTotal]-T1.[DocTotal]) as 'Final Amount', (T0.[GrosProfit]-T1.[GrosProfit]) as' Final GR Profit' FROM OINV T0 , ORIN T1 WHERE T0.[DocDate] >=[%0] and  T0.[DocDate] <=[%1]
    But this query better run when you are using in Crystal Report.
    Thanks,
    Srujal Patel

  • Wrong Qty Showing in Sales Analysis Report

    Dear All
    When we run Sales Analysis Report Item Wise by selecting Delivery Note in the selection, then it shows '0' or '-1' in Quantity field. It should show totat quantity delivered of each item.
    Can anyone elaborate this why it happens?
    Thanks and Best Regards
    Nabeel

    Dear Rahul
    I haven't unblocked negative inventory check. But that will not create any affect in Sales Analysis Report.
    Regards
    Nabeel

Maybe you are looking for