Sales statistics by sales area report
Hi all,
I am trying to understand logic used to develop sales statistics by sales area report developed by some abaper.here to calulate order margin i am using order value and order cost.the problem is with order cost calculation as it's value is coming negative.
order margin = order value - order cost.can anyone suggest how these three values are calculated in the developing the report.
Regards,
Harshada
Well margin is something which is used quite often.
So first i would ask my consultant if they maybe are already storing the margin in some KZWI1, KZWI2, ... , KZWI6 field of VBAP.
If thats not the case, your consultants hopefully should be able to tell you how to calculate the margin.
Similar Messages
-
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 -
Want report to display Sales Life Cycle for Particular Sales Area
Hi all,
What are the select-options,parameters and tables for the report sales life cycle for a particular sales area and if possible send me the code for the same.
Thanks in advance
Santosh RHi Sandy,
You would probably be better to post this in Crystal Reports Design forum category.
You could add a unjion into the data source so that it always returns a dummy row for each category.
Regards
Alan -
Can i view & analysis the customer report asper the sales area wise how?
can i view & analysis the customer report asper the sales area wise how?
Hi,
If you are talking about FBL3N or any other FI customer subledger report, then Yes and No. If you have customers extended to multiple sales area, then no, if there is a one to one relationship with the sales area then yes.
Cheers. -
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,
HeatherHI 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 -
Sales Analysis Report service warehouse wise
Dear Experts,
I've configured 4 service warehouses to an item in SAP B1 8.8 PL:16. And now I want to see sales analysis report of that particular item against each service warehouse. But from the Sales Analysis or purchase analysis report I can't able to see service warehouse wise sales quantity & amount.
N.B.-Those items are created as Sales & Expense item only, no inventory.
Plz help.
SubrataHi Subrata,
in this case you need a customized report trough Query or through Crystal Report.
regards,
Fidel -
S076 SOP table for SD report (Sales Forecast Report ).
Hi
We are using S076 SOP table for SD report (Sales Forecast Report ). This has only material number as key at present , where as we want to know if flexible planning will give material/shipto as key for forecast.
Thanks In advance .Hi
These are the key figures I am seeing in OMOJ , As I am new to this functionality I am not able to add new key figures , can I request you to explain it to me ......
Key figure F D
Sales
Production
Stock level
Target stock level
Days' supply
Target days' supply
Thanks -
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,
-SteveHi 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 -
Query to mimic the items tab of the Sales Analysis report.
Hi there,
I'm currently looking to create a query that mimics the behaviour of the Sales Analysis report in B1. The items tab of the Sales Analysis report provides all the data I require - the only issue is that I would like to merge this data with some other data regarding current on hand stock quantities etc. and therefore I would like to be able to pull out the query behind the Sales Analysis report.
I'm assuming this cannot be done and therefore I'm attempting to build a query to replicate the results. The query needs to show Item No, Item Description, Quantity Sold, Sales Amt (in system currency), Gross Profit and Gross Profit % for items within a given period.
If this can be done relatively easily, can the query then be modified to show all items (including items that haven't sold in the date range) merely with '0' for Quantity Sold, Sales Amt etc. if the item hasn't been sold in the period, and the appropriate figures if each of these columns if the item has sold. I assume some kind of CASE statement can be used to generate this.
So the query needs to show Item No, Item Description, Current quantity in stock, Quantity Sold, Sales Amt (in system currency), Gross Profit and Gross Profit % for all items within a given date range.
I hope you can assist me with this problem.
Thanks
Grant.Hi,
Thanks Gordon that was exactly what I needed.
I've been trying to add some additional columns to the query but I'm experiencing some errors and I can't quite tell why.
Basically, here's the code from another working query I have which I wish to merge into the query you've suggested above:
SELECT T0.[ItemCode],
T0.[ItemName],
T3.[ItmsGrpNam],
T4.[Name] AS [Sub-Category],
T5.[Name] AS [Sub-Sub-Category],
T0.[CardCode] AS [Pref Supplier],
T6.[FirmName] AS [Brand],
T0.[U_Range],
T0.[OnHand],
CASE WHEN T0.[StockValue] = 0 THEN 0 ELSE T0.[StockValue] END AS [StockValue],
T1.[Price] AS [PBK GBP Price],
CASE WHEN T0.[OnHand] = 0 THEN T0.[LastPurPrc] ELSE T0.[StockValue]/T0.[OnHand] END AS [Ave Cost],
CASE WHEN T0.[OnHand] = 0 THEN T1.[Price]-T0.[LastPurPrc] ELSE CASE WHEN T0.[OnHand] > 0 THEN T1.[Price]-T0.[StockValue]/T0.[OnHand] END END AS [Margin],
CASE WHEN T0.[OnHand] = 0 AND T0.[LastPurPrc] = 0 THEN 0 ELSE CASE WHEN T0.[OnHand] > 0 AND (T0.[StockValue]/T0.[OnHand]) = 0 THEN 0 ELSE CASE WHEN T0.[OnHand] = 0 THEN (T1.[Price]-T0.[LastPurPrc])/T1.[Price]*100 ELSE CASE WHEN T0.[OnHand] > 0 THEN (T1.[Price]-T0.[StockValue]/T0.[OnHand])/T1.[Price]*100 END END END END AS [Margin %],
T0.[LastPurPrc]
FROM [dbo].[OITM] T0 INNER JOIN [dbo].[ITM1] T1 ON T0.ItemCode = T1.ItemCode INNER JOIN [dbo].[OITB] T3 ON T0.ItmsGrpCod = T3.ItmsGrpCod LEFT OUTER JOIN [dbo].[@U_SUBCATEGORY] T4 ON T0.U_Subcategory = T4.Code LEFT OUTER JOIN [dbo].[@U_SUBSUBCATEGORY] T5 ON T0.U_SubSubCategory = T5.Code INNER JOIN OMRC T6 ON T0.FirmCode = T6.FirmCode
WHERE T0.[OnHand] >= 0 and T0.U_Range not in ('E','X')
ORDER BY T0.[ItemCode]
Essentially I just wish to add the fields which are specified in the query above, but not in the query you've already suggested:
SELECT T0.ItemCode,
Max(T0.ItemName),
Max(IsNull(T0.OnHand,0)) 'In Stock',
SUM(IsNull(T1.Quantity,0)) 'Quantity',
Sum(IsNull(T1.LineTotal,0)) 'Sales Amt',
SUM(IsNull(T1.GrssProfit,0)) 'Gross Profit',
Case WHEN Sum(Isnull(T1.LineTotal,0)) = 0 THEN 0 ELSE
SUM(IsNUll(T1.GrssProfit,0))/Sum(Isnull(T1.LineTotal,0)) * 100 END 'Gross Profit %'
FROM dbo.OITM T0
LEFT JOIN dbo.INV1 T1 ON T1.ItemCode=T0.ItemCode
LEFT JOIN dbo.OINV T2 ON T2.DocEntry=T1.DocEntry AND T2.DocDate Between [%0] AND [%1]
GROUP BY T0.ItemCode
I was hoping it would be fairly straight forward but so far I've had limited success.
What am I missing here?
Thanks in advance! -
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 based on Supplier-wise
Hi Experts,
My client requirement is ,We are into trading so , we want a Sales analysis report based on Supplier-wise. like,
Selection critieria is
1)Supllier name
2)From and To date.
Heading are
Item name Sales UoM Jan(quantity) Feb(quanitity) mar(quantity) April(quanitiy).........
here, i need only the sum of the quantity for the items for that particular month based on the date giving in selection criteria.
Regards,
Dwarak
Edited by: Dwarak@SMS on Aug 23, 2010 4:29 PMHi experts,
For my clients requirement,
I could able to alter my previous query(find below).
My object is
1)To get sales report based on Manufacturer.
2)To get the TOTAL SALES QUANTITY OF THE MONTHS in the report. I go that in the below query, and only thing is that is have to minus the total Credit note for items to get the ACTUAL TOTAL SALES OF THE MONTHS. so , can anyone help me to alter the query to get me the ACTUAL TOTAL SALES OF THE MONTHS.
the query is
SELECT T0.ITEMCODE,T0.ItemName,T0.OnHand,
(SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
(NOLOCK) WHERE MONTH(T1.DOCDATE) = 1 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0) AS 'JAN ',
(SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
(NOLOCK) WHERE MONTH(T1.DOCDATE) = 2 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0) AS 'FEB ',
(SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
(NOLOCK) WHERE MONTH(T1.DOCDATE) = 3 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0) AS 'MAR ',
(SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
(NOLOCK) WHERE MONTH(T1.DOCDATE) = 4 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0) AS 'APR ',
(SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
(NOLOCK) WHERE MONTH(T1.DOCDATE) = 5 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0) AS 'MAY ',
(SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
(NOLOCK) WHERE MONTH(T1.DOCDATE) = 6 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0) AS 'JUN ',
(SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
(NOLOCK) WHERE MONTH(T1.DOCDATE) = 7 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0) AS 'JUL ',
(SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
(NOLOCK) WHERE MONTH(T1.DOCDATE) = 8 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0) AS 'AUG ',
(SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
(NOLOCK) WHERE MONTH(T1.DOCDATE) = 9 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0) AS 'SEP ',
(SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
(NOLOCK) WHERE MONTH(T1.DOCDATE) = 10 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0) AS 'OCT ',
(SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
(NOLOCK) WHERE MONTH(T1.DOCDATE) = 11 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0) AS 'NOV ',
(SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
(NOLOCK) WHERE MONTH(T1.DOCDATE) = 12 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0) AS 'DEC '
FROM dbo.OITM T0
LEFT JOIN dbo.INV1 T1 ON T1.ItemCode = T0.ItemCode WHERE T0.SellItem = 'Y' and T0.[FirmCode] =[%0]
GROUP BY T0.ItemCode,T0.Itemname,T0.OnHand,YEAR(T1.DOCDATE) HAVING YEAR(T1.DOCDATE) =
YEAR(GETDATE())-0
ORDER BY T0. ITEMCODE -
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 TurekIf 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 and P&L match in SAP b1
Dear All,
I am running Sales Analysis report customerwise and item wise where the total of Sales Amount is matching with Revenue amount in profit and loss report for the month April 2011 only.
But after that these reports are not matchinhg. Please guide in this regard.
There are some items having valuation method standard, FIFo and moving average.
Regards
Aarati KollurDear Jitin,
Thanks for quick reply,
i run the report for item for the April 2011 where total matchs with revenue even there are some service type of A/R Invoices.
Does sales analysis report consider service type of document in both customer wise and item wise.
Regards
Aarati. Kollur -
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?
ThanksYou 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 -
Sales Order / Forecasted Sale Order Report
hi
How to create Sales Order / Forecasted Sale Order Report.Hi Raju,
Are you talking of normal sales order and in the Forecasted sale order report what are the inputs you are giving.
Maybe you are looking for
-
Yosemite and Bootcamp Windows 7 booting problem
Hello all, I upgraded to Yosemite from Mavericks from the App store on a MBP 2013 late which also had windows 7 installed on it using bootcamp. I can boot into Yosemite and Windows 7 by going to start up disk and selecting the OS and then restarting
-
HP Photosmart Plus B210a all-in-one won't display any networks in the list.
Hi, I recently purchased a HP Photosmart Plus all in one printer and I've been having trouble with it from day one. First off, it won't connect wirelessly. It won't display any networks in the list when searched for, it won't take my network details
-
Video error when connecting to appletest
Hi, I have ichat 3.1.8 on both of my computers, my eMac G4 and my iMac intel Core 2 Duo. My eMac has system 10.4.11 and my iMac has 10.4.10. Neither of my computers can use iChat appleu3test01 for video because I get an error -8 communication error.
-
I am using Oracle on Solaris 8. I want to create a raw file for oracle redo logs. How do I create a raw file on Solaris?
-
If I install Pages on one of my iPads, can I install it in the other 2 we have (via iTunes Synch) without paying extra?