Sales analysis report- showing & totaling both Invoices & Credit memos on o
I have written a Several sales analysis reports based on INV1 tables and RIN1 tables, (Invoice lines and Credit memo lines) for SAP B1 using crystal. I would like the data from both the invoices & the credit memo to list & total on the same report. But have had no luck doing this.
Is it possible?
How would I go about doing it?
Solved my problem, I used the "Show SQL Query" window on my existing reports copied and pasted them to SQL Management Studio as a View, used keyword Union All to join the two queries (Invoices and Credit memos) and used the view as the data link to create a new report in Crystal Report writer.
This got me both of the data files into the report detail line and allow for summing.
Problem solved.
Thanks for the input.
Similar Messages
-
Help me in 'AR Details ' report shows total open invoices by customer
hi friends,
please help me in 'AR Details ' report shows total open invoices by customer and PO number over selected time range.
any thing related to open invoices please send me as early as possible.
Thanks,
Regards,
YogeshHi,
Find the T.code VF05. You will get the list of open billing docs. Its SIS report. Please find whether the SIS is active or not in your system
Regards, -
Report to view SO-Invoice-Credit Memo-Debit Memo-with/ without reference
Hello Gurus,
Can any one help me for viewing the report where i can see Sales Order Invoice ,Credit Memo & Debit Memo with/without reference .
We are creating Credit Memo & Debit Memo without reference but uses the same Purchase Order Nos .
Please guide me on this...
Thanks.
Sameer S Bardehi
u can use the standard t-code vf05n to see the list with reference to the document type...
do revert if question is not answered..
regards
Chander -
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 -
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 AMHello,
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 -
Dme payment File for invoice & Credit Memo
Dear Sapients,
I have created a DME Tree structure for PAYM. This structure contains header & line items. Header will contain the vendor bank master data inputs & Total payment payable by the bank per vendor for each payment run. The line items contain both invoices & credit memos details & their corresponding amounts.
Issue is getting the total value of all the invoice credit memo's in the header Field payment.
Currently, it sum-up the values without any sign in the payment file.
Below are the structure screen shots. Really appreciate quick response.
Structure
Header Field payment
Using Aggregation of Ref AMOUNT from line item
Line item reference field Amount
Structure field value of line item payment.
Kindly help to achieve this summation field value for the header.
regards
PBBDear Friends,
Can anyone shed some light on this topic ?
Many thanks
PBB -
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 AMhello
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 -
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
NabeelDear Rahul
I haven't unblocked negative inventory check. But that will not create any affect in Sales Analysis Report.
Regards
Nabeel -
Montly Sales Analysis Report ,Total by customer
Hi,
I need help on a query that a customer needs for a sales analysis report.
It should also contain:
Parameters from date X to Y and Warehouse Z
Columns should be as follows
Item No.
Item Description
Customer Code
Customer Name
City
Annual Total
April (2014) - Quantity
April (2014) - Sales Amount
April (2014) - Gross Profit
April (2014) - Gross Profit %
May (2014) - Quantity
May (2014) - Sales Amount
May (2014) - Gross Profit
May (2014) - Gross Profit %
June (2014) - Quantity
June (2014) - Sales Amount
June (2014) - Gross Profit
June (2014) - Gross Profit %
July (2014) - Quantity
July (2014) - Sales Amount
July (2014) - Gross Profit
July (2014) - Gross Profit %
August (2014) - Quantity
August (2014) - Sales Amount
August (2014) - Gross Profit
August (2014) - Gross Profit %
September (2014) - Quantity
September (2014) - Sales Amount
September (2014) - Gross Profit
September (2014) - Gross Profit %
This report we can take from sap business one sales analysis report but customer asking city column.that why
Please send me query ASAP.
Regards,
Rajeev.Dear Raviraj,
I need coloums like follows:
Item No.
Item Description
Customer Code
Customer Name
City
Annual Total
April (2014) - Quantity
April (2014) - Sales Amount
April (2014) - Gross Profit
April (2014) - Gross Profit %
May (2014) - Quantity
May (2014) - Sales Amount
May (2014) - Gross Profit
May (2014) - Gross Profit %
June (2014) - Quantity
June (2014) - Sales Amount
June (2014) - Gross Profit
June (2014) - Gross Profit %
July (2014) - Quantity
July (2014) - Sales Amount
July (2014) - Gross Profit
July (2014) - Gross Profit %
August (2014) - Quantity
August (2014) - Sales Amount
August (2014) - Gross Profit
August (2014) - Gross Profit %
September (2014) - Quantity
September (2014) - Sales Amount
September (2014) - Gross Profit
September (2014) - Gross Profit %
Please send me query ASAP.
Regards,
Rajeev -
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 per Sales Employee with BP Reference No
Hi All,
I need your assistance in creating a query that balances back to Sales Analysis Report but I require the BP Reference No to show per row. I have created 2 queries through Query Generator. The 1st contains the OINV and OSLP tables with Fields: DocNum, NumAtCard, SlpName, DocDate, CardCode, CardName, DocTotal
The 2nd contains the ORIN and OSLP tables withe the same Fields.
I need to combine these 2 queries and I need assistance with the DocTotal. I need the amount before tax.
This report needs to balance back to the SAP B1 Sales Analysis Report.
Your assistance would be appreciated.
Regards,
Desiré Janse van RensburgThank you for your assistance! After googling a few pages I came across this query. I adjusted it to comply to my needs.
Herewith query if you guys are interested:
SELECT
T0.DocNum AS 'Invoice Nr',
T0.NumAtCard AS 'Customer Ref Nr',
T1.SlpName AS 'Salesperson',
--T0.SlpCode AS 'SP Code',
T0.DocDate AS 'Posting Date',
T0.CardCode AS 'Customer Code',
T0.CardName AS 'CustomerName',
'Credit Memos' AS 'Doc Type',
((T0.DocTotal) * -1) AS 'Total Docs',
(((T0.DocTotal - T0.VatSum) - T0.TotalExpns) * -1) AS 'Product Sales',
((T0.GrosProfit) * -1) AS 'Gross Profit',
CASE
WHEN (((T0.DocTotal - T0.VatSum) - T0.TotalExpns) * -1) = 0.00 THEN 0.00
ELSE (((T0.GrosProfit) * -1)/(((T0.DocTotal - T0.VatSum) - T0.TotalExpns) * -1)) * 100
END AS 'Gross Profit %',
((T0.PaidToDate) * -1) AS 'Paid To Date',
((T0.DocTotal - T0.PaidToDate) *-1) AS 'Open on Docs'
FROM ORIN T0
INNER JOIN OSLP T1
ON T0.SlpCode = T1.SlpCode
WHERE
(T1.SlpName LIKE '%%[%0]%%' OR '[%0]' = ' ')
AND T0.TaxDate >= '[%1]'
AND T0.TaxDate <= '[%2]'
UNION
SELECT
T0.DocNum AS 'Invoice Nr',
T0.NumAtCard AS 'Customer Ref Nr',
T1.SlpName AS 'Salesperson',
--T0.SlpCode AS 'SP Code',
T0.DocDate AS 'Posting Date',
T0.CardCode AS 'Customer Code',
T0.CardName AS 'CustomerName',
'Invoices' AS 'Doc Type',
(T0.DocTotal) AS 'Total Docs',
((T0.DocTotal - T0.VatSum) - T0.TotalExpns) AS 'Product Sales',
(T0.GrosProfit) AS 'Gross Profit',
CASE
WHEN (((T0.DocTotal - T0.VatSum) - T0.TotalExpns)) = 0.00 THEN 0.00
ELSE ((T0.GrosProfit)/((T0.DocTotal - T0.VatSum) - T0.TotalExpns)) * 100
END AS 'Gross Profit %',
(T0.PaidToDate) AS 'Paid To Date',
(T0.DocTotal - T0.PaidToDate) AS 'Open on Docs'
FROM OINV T0
INNER JOIN OSLP T1
ON T0.SlpCode = T1.SlpCode
WHERE
(T1.SlpName LIKE '%%[%0]%%' OR '[%0]' = ' ')
AND T0.TaxDate >= '[%1]'
AND T0.TaxDate <= '[%2]'
Thanks again for the replies! -
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 -
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 -
Adding Data Field to Sales Analysis Report
Does anyone know how to add data fields to Sales Analysis Reports, either in PLD or CR? On Sales Analysis by Customer, I need to add the total quantities for all items sold for the sales included in the report, excluding negative quantities.
Thank you,
AvrahamHi Avraham.......
You can create your own Query Report for getting all the desired outputs and it will be easy to show in reports also.....
Regards,
Rahul -
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
Maybe you are looking for
-
please help me update my software so i can update itunes to back my phone up
-
Monitor looks negative? Help!
My wife was letting our 1 year old hit the keyboard on the iMac. Now the display has this "negative" colorless look to hit. Is there some sort of setting that causes this? Some kind of keystroke combination? The display settings are set to millions o
-
Dropbox photos in iPhoto photo stream?
Hi I have photstream working & all is fine but I cannot figure out how to add another location, such as the Dropbox 'photo' folder to iPhoto - can anyone advise if this is possible & how (the Dropbox photo folder is on my laptop). Thanks, T
-
I understand in R16 there is a Dynamic Lookup window, i.e we can customize the lookup window. can anyone shed some light about this feature.
-
Trouble connecting Reporting Services to local database
I am experiencing issues trying to configure/connect the Reporting Services in order to change the database to a local database.