Reg: Sales Report Problem
Hi Experts,
My client are already using the reports as Sales Report as follows
Customer Daily-Today Monthly-Current Yearly-Current
Customer_001 5000.00 250000 350000
Customer_002 25000.00 1250000 1250000
For the above report, I used this Query
SELECT DISTINCT T0.CardCode [Customer], T1.CARDNAME [NAME],
(SELECT ISNULL(SUM(I.DocTotal),0) FROM INV1 I1 INNER JOIN
OINV I ON I1.DocEntry = I.DocEntry
WHERE I.CardCode = T0.CardCode AND
Day(I.DocDate) = Day(GetDate()) AND
Month(I1.DocDate) = Month(GetDate()) AND
Year(I1.DocDate) = Year(GetDate())) [Daily - Today],
(SELECT ISNULL(SUM(I.DocTotal),0)
FROM INV1 I1 INNER JOIN OINV I ON I1.DocEntry = I.DocEntry
WHERE I.CardCode = T0.CardCode AND
Month(I.DocDate) = Month(GetDate()) AND
Year(I1.DocDate) = Year(GetDate())) [Monthly - Current Month],
(SELECT ISNULL(SUM(I.DocTotal),0) FROM INV1 I1 INNER JOIN
OINV I ON I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
AND Year(I.DocDate) = Year(GetDate())) [Yearly - Current Year]
FROM [dbo].[OINV] T0 LEFT OUTER JOIN OCRD T1 ON
T1.CARDCODE=T0.CARDCODE GROUP By T0.CardCode, T1.CARDNAME
But my problem is the above query resulting without reference to A/R Credit Memo
i.e I need to deduct the A/R Credit Memo amount, also another one problem
is the above query is related to Calender Year, but My client need the report
according to financial year.
Regards,
Balakumar
Try this one I added a Union to include the credits, you can modify the dates to do a range of dates.
SELECT DISTINCT T0.CardCode [Customer], T1.CARDNAME [NAME],
(SELECT ISNULL(SUM(I.DocTotal),0) FROM INV1 I1 INNER JOIN
OINV I ON I1.DocEntry = I.DocEntry
WHERE I.CardCode = T0.CardCode AND
Day(I.DocDate) = Day(GetDate()) AND
Month(I1.DocDate) = Month(GetDate()) AND
Year(I1.DocDate) = Year(GetDate())) [Daily - Today],
(SELECT ISNULL(SUM(I.DocTotal),0)
FROM INV1 I1 INNER JOIN OINV I ON I1.DocEntry = I.DocEntry
WHERE I.CardCode = T0.CardCode AND
Month(I.DocDate) = Month(GetDate()) AND
Year(I1.DocDate) = Year(GetDate())) [Monthly - Current Month],
(SELECT ISNULL(SUM(I.DocTotal),0) FROM INV1 I1 INNER JOIN
OINV I ON I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
AND Year(I.DocDate) = Year(GetDate())) [Yearly - Current Year]
FROM [dbo].[OINV] T0 LEFT OUTER JOIN OCRD T1 ON
T1.CARDCODE=T0.CARDCODE GROUP By T0.CardCode, T1.CARDNAME
union
SELECT DISTINCT T0.CardCode [Customer], T1.CARDNAME [NAME],
(SELECT ISNULL(SUM(I.DocTotal),0) FROM rin1 I1 INNER JOIN
orin I ON I1.DocEntry = I.DocEntry
WHERE I.CardCode = T0.CardCode AND
Day(I.DocDate) = Day(GetDate()) AND
Month(I1.DocDate) = Month(GetDate()) AND
Year(I1.DocDate) = Year(GetDate())) [Daily - Today],
(SELECT ISNULL(SUM(I.DocTotal *-1),0)
FROM rin1 I1 INNER JOIN OrIN I ON I1.DocEntry = I.DocEntry
WHERE I.CardCode = T0.CardCode AND
Month(I.DocDate) = Month(GetDate()) AND
Year(I1.DocDate) = Year(GetDate())) [Monthly - Current Month],
(SELECT ISNULL(SUM(I.DocTotal * -1),0) FROM rin1 I1 INNER JOIN
orin I ON I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
AND Year(I.DocDate) = Year(GetDate())) [Yearly - Current Year]
FROM [dbo].[Orin] T0 LEFT OUTER JOIN OCRD T1 ON
T1.CARDCODE=T0.CARDCODE GROUP By T0.CardCode, T1.CARDNAME
Edited by: M. Jenkins on Apr 9, 2009 2:53 PM
Similar Messages
-
Hi Experts,
I need your help in following topic. I have a requirement to build a big (overall) sales report in BI (NW2004s).
I would like to use BI Content because I'm running out of time and try to use all preconfigured stuff if possible.
In the requirement a bunch of fields of different SD DataSources are used (mostly 2LIS_11_VAHDR and 2LIS_11_VAITM but also some fields of other Datasources).
In SE16 I know how to locate all the field in the tables VBAK, VBAP, KNA1, VBKD,
LIKP, VBRK and of course some texts. Some fields could already be located by me, others couldn't even be found in BI.
The difficulty I have is to bring all the DataSources together so that the data is displayed correct - even if there are redundant parts.
For example:
For sales orders the doc no, sales org, distr. channel (and a lot of other header data) should be displayed in each line together with item data such as item no., material code, quantity (and a lot of other item data). If an order has multiple items each item should be diplayed in one row in the report.
In the Query the report should look like a common table (e.g. as in an ALV Grid if you model a query with SQ01) --> a lot of columns.
I'm not sure if I should use one big DSO with multiple InfoSources or if I should create a MultiCube and add the BI DSOs 0SD_O03 (Orders) and 0SD_O01(Order Items).
I know this is a very common requirement in SD. Do you know how to combine the most common SD datasources that no issues come up?
Thank you very much in advance,
Horst
Message was edited by:
Horst HenkelHi Horst,
Reporting on ODS / DSo is slow. I'm here at a cleint where we have lots of reports on SD_O01 and SD_O03. The best way to have good query performance is to build cubes on top of your ODS. Build a sales cube on top of SD_O03 with all fields and a billing cube on top of SD_O01. Load the data from your ODS to your new cubes. Then create a multipovider on top of both cubes, identify the keyfigures and characteristics required for your queries. Build the queries on top of the multiprovider.
You can display all items of a bill in one row if you choose drill-across for the irems in the query, instead of drill-down. So it looks for a standard SD report.
Regards,
Juergen -
Sales Report Generation less the Credit memo
Anybody can help me regarding Query for Sales Report. Im trying to create a sales report per Per Product and Customer with corresponding Quantity and Amount, I have already get the query the problem is I cant get the Credit Memo deduct from its A./P Invoice so that deduct the quantity and price. With this i can get the exact sales!
Anybody have an idea? Im having headache already for a week now trying to solve this problem, Thank you very much.
ClintHi Jeyakanthan,
Im not referring to Sales Analysis Report. All i want is to get all the sales and Less the the corresponding Credit Memo. Im trying to create a query that will show the sales, Ex.. row
From A/R invoice Table
DocNo CardCode Qty Price DocTotal
0111 CA-001 10 25 250
less from A/R Credit Memo
DocNo CarCode Qty Price DocTotal
0111 CA-001 5 25 125
I want the result to deduct the row Invoice from CM.
If the corrsponding Invoice doesnt find a CM record then the result will be 0. Ex from above data Invoice less the Credit Memo.
if the Invoice found a Credit Memo,
Qty1 Qty2 Qty3, DocTotal1 DocTotal2 = Result
10 less 5 = 5 ; 250 less 125 = 125
if the Invoice doesnt have Credit Memo,
Qty1 Qty2 Qty3, DocTotal1 DocTotal2 = Result
10 less 0 = 10 ; 250 less 0 = 250
hope the will clarify everything, thank yuo very much in advance.
Regards,
Clint -
XML Publisher Enterprise 5.6.2 - World Sales report (DEMO)
Hello All;
Does anybody have problem displaying "World Sales" report as HTML output under Sales Manager folder?
The demo is provided when downloading and installing XMLP server.
"World Sales" report uses an XML feed from a URL which I configure per the instruction in the document. I could get the report output in PDF with images but NOT in HTML or RTF as output.
Any solution or idea how to resolve it?
Thank you.
ShaunShaun,
How did get World Sales report work? What did you put on URL? I put:
http://Sever name:15101/xmlpserver/Sales Manager/World Sales/WorldSales.xml
It always showed error message to me.
Please help, Thanks.
- Jessie -
Error in Sales-A/R-Sales Report-Sales Analysis
Dear All,
After upgrading Sap 2007B ( PL:10 ) to sap 8.8 ( PL:05), we are facing some problems like when we generate Sales Analysis report Under....Sales-A/R------Sales Report.....Sales Analysis.....select Quaterly Report. In item Description it gives the numeric values instead of item names.
So plz help us on this matter......................Dear Dinesh,
There seems to be some data corruption/inconsitency in your database.
Please Log your call to the SAP Support team.
Thanks
Asif -
Sales report ship to party wise
I want to see the sales report for each ship to pary wise.
Sold to, bill to n payer remain same.
Reg,
MadhuFor that in VF05 report, you need to have ship to party as one of your selection option which you can achieve as follows:-
IMG --> Sales and Distribution --> Sales --> Lists --> Set Updating of Partner Index. Here, maintain the following values.
Transaction Group Partner Function
7 SH
Now go to VF05, click on "Partner function" tab, select SH and execute.
thanks
G. Lakshmipathi -
Region wise Sales Report / Sales Analysis
Hi,
I have a requirement of Region wise sales report. I have searched in the forum and found that I could acheive it through SE16-->VBRK-->REGIO field . I have tried executing the same, but the problem is when ever i am trying to pull up the sales for a particular region the system is giving an invoice number. But when I go to that particular invoice and see the PAYER , the PAYER is in the different region.
Please let me know which region the system considers at the table level. I mean to ask which region the system considers for a particular transaction.
Thankyou,
Rakesh Tummala.Hello Rakesh,
I am facing a similar issue that you are facing. Yes, there is a region populated on the billing document in table VBRK. However, depending on how your order entry is configured, the region listed in the billing document isn't necessarily the region the materials were shipped to. To fine tune your requirement, are you looking for a report where the ship-to address is in a specific region or where the payer or sold-to address is in a specific region?
If it's the ship-to address in a specific region, you'll need to develop a table join query in SQ01. Join the tables VBRK --> VBPA --> ADRC. VBRK is the billing document header table. VBPA is the partner table where SH (ship-to partner) can be determined and it gives you an address code. ADRC is the Business Address Services table that reads the address code and provides the address. In the next step, make sure ADRC-REGION is a selection field so that you can specify the region. Then, run the query, ensure VBRK-NETWR is an available field so that you can calculate the net value of billing documents for the specified region.
If it's the payer or sold-to address in a specific region, this is easier since it's master data and not transaction-specific data (remember, your customer service group could be manually changing the ship-to location when creating a sales order, which is why you would need to follow the aforementioned steps). You can do a quick search for accounts within a specified region then obtain the information in VBRK for the specified payers.
I hope this information helps you, please provide questions if you need further clarification. -
I am trying to create a Sales report from two tables: PRODUCT table and ORDER DETAILS table.
The Order Details table has the following fields: Order ID, Product ID, Unit Price and Quantity. The Order ID field is a primary key in another table called ORDERS.
The columns I want in my report are: Product code, Unit Price, Quantity Shipped and Sales. Product code and Unit Price are fields in the Product table and I can show them easily in my report. The problem I am having is displaying the Quantity Shipped and Sales columns. I have created two formulas to calculate this information.
Quantity Shipped formula: Sum ({Orders_Detail.Quantity},{Product.Product ID} )
Sales formula: {Product.Price (SRP)} * (Sum ({Orders_Detail.Quantity},{Product.Product ID} ))
These formulas seem to work well. The problem is that when I place them in my report, I get three rows for every product id. So I end up with three rows of the same information for every product in my report.
I am practicing with the xtreme.mdb that I downloaded from this website. Any help that you can provide would be much appreciated.HI,
Thanks for the info.
Placing the information in the group header solved the problem of having rows appear multiple times. Now each product item appears only once.
HOwever, I am still unable to figure out how to show the quantity shipped for each item. I guess I will have to use the Quantity field in the Order_Details table. Doing a running total on this field in the group header just does a running total on the quantity field without being tied to specific product.
Your help is much appreciated. -
Hello,
I have some troubles writting a sales report. The problem is that, in my case, sales are processed in another application, interfaced with SAP, so sales orders & stuff are automaticaly made, so I only see the sales in reports. I don't really know from what tables to get the data. I saw that I can find sales orders in VBAK and VBAP tables, but these sales orders doesn't produces goods issues, so I don't really care about them. I am interested for materials that were sold out from my warehouse, with 251 moovement type in my case. I also took into consideration the possibility to extract the data from the MSEG table, with 251 moovement type. What do you think about this? And another issue is where to get the profit margin for that sale.
Thank you!Hi George,
May be you can try writing a join on VBAK,VBAP and VBFA and in VBFA you can restrict the sub docs. cateory as 'R' for goods movement to get the sales data relevant to goods movement.
Thus this helps?
Cheers
VJ -
Sales report issue while saving the query
Hi,
I am working on Sales reports and that i came across a senario and facing a problem, can anyone help me over this
Senario:
I created a structure in Rows and added few keyfigures to the New structure which is in Rows.
After that i added 2 charcteristics.
Now the problem is that when i save the query i am getting the Keyfigure structure first and then characteristics
But, i need the 2 charcteristics first and then i need the Keyfigures
I changed the query as i want it like i placed 2 charcteristics first and then the keyfigure (structure) and the query saved sucessfully.
The problem is that when i open the query again i found that the Keyfigure (structure) first and then the 2 charcteristics
I did it all my possible ways still the problem perstists
Edited by: MAHESH MUMAR on Oct 6, 2008 2:22 PM
Edited by: MAHESH MUMAR on Oct 6, 2008 2:32 PMmahesh,,,
can u xplain more what xactly is ur need.
"After that i added 2 charcteristics."
so do u want chars & keyfig in Rows only.
this way i dont think u will have report output ..
Take simple e.g. below:
$----
Quantity
Material
Channel112--
1
Channel223--
34
Is this how u want ur report to display?
that means u will need material and channel in rows and keyfigures ($ & quantity ) in Columns.
if this is not what u seek what else is your rek.
sometimes such display helps to understand.
Yes u can add chars in Rows and then add structure of keyfigure.
Yes you can change the sequence of display in Rows among different structure.
But do u still have something in columns.
It is intersection of Rows & Columns that displays result data set...
let us know in more detailed e.g. -
Can I run a sales report by invoice number?
I am trying to run a sales report by invoice number rather than by customer - can this be done?
Hi Connie
s u can run sales report by invoice no fot that pls find the query below
i think this will solve ur problem
SELECT T0.[DocNum][SO NO], T0.[CardName], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T2.[DocNum][Delivery No], T2.[CardName], T3.[ItemCode], T3.[Dscription], T3.[Quantity], T4.[DocNum][Invoice No], T4.[CardName], T5.[ItemCode], T5.[Dscription], T5.[Quantity] FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry, ODLN T2 INNER JOIN DLN1 T3 ON T2.DocEntry = T3.DocEntry, OINV T4 INNER JOIN INV1 T5 ON T4.DocEntry = T5.DocEntry WHERE T5.[BaseRef] = T2.[DocNum] AND T3.[BaseRef] = T0.[DocNum] AND T5.[ItemCode] = T3.[ItemCode]
AND T5.[ItemCode] = T1.[ItemCode] AND T4.[DocNum] = [%0] GROUP BY T0.[DocNum], T0.[CardName], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T2.[DocNum], T2.[CardName], T3.[ItemCode], T3.[Dscription], T3.[Quantity], T4.[DocNum], T4.[CardName], T5.[ItemCode], T5.[Dscription], T5.[Quantity]
Regards
Jenny
Edited by: Jennifer Anderson on Jul 28, 2010 11:21 AM -
No Vendor ID on the top left of the Sales Report
How can I find my Vendor ID when I haven't publihed my first app yet so there are no sales reports avaialable. No Vendor ID shows up on the top left of the report.
Ditto. Having the same problem. Have uploaded an iBook and am trying to complete the electronic paperwork, but there is no Vendor ID in Sales and Trends or anywhere else I can find.
-
Hi,
when i am running T-code VC/2 -Sales Summary i AM getting this error
"No view can be determined for application RVKUSTA1 for user ADMIN"
This same error I am getting when I am taking any sales report like MCTA, MCCA etc.
How to solve this problem?
Regards,
AkshayAkshay,
This thread has ur solution
Re: SIS - No data exists
Thanks,
Raja -
Report problem directly in iTunes has been disabled?
I had understood that it was possible to report a problem on a purchase directly from within iTunes, by going to my account, history then selcting the ourchase that had the problem.
However the "Report a Problem"link now just boots me off to the Apple website, the previous button to describe the problem and submit no longer appears.
Does anyone know if this has been disabled?
I am having season pass problems on an iPad and it seems there is no solution - Apple - it just doesn't work anymore
Worminger2Interestingly clicking on Report a problem in iTunes sends me off to a web page with the URL:
"http://www.apple.com/uk/support/itunes/store/seasonpass/"
but this immediately redirects to:
"http://www.apple.com/uk/support/itunes/#video_purchases"
which is actually just the opening page of the iTunes support page in the apple webpages, ie totally useless.
I am guessing they are overwhelmed by reported problems and are just opting out of having to deal with them. Reminds me of the dear old days of Microsoft hiding from problems.
Worminger2 -
Report problem link opens up word (pc)
When I click on report problem link in purchase history for an app, all it brings up word. Don't have email receipt yet and itunes support is useless. it's like trying to find a needle in a haystack.
Click the "contact support" link toward the lower-left of that page and follow the instructions.
Regards.
Maybe you are looking for
-
My airport will not connect to the Internet
I am trying to set up my airport express. I have set the Internet connection to Ethernet to reflect my satellite modem and dhcp. The airport express connects to devices in my home but not to the modem. I have tried to adjust the settings but it refus
-
Delivery through CNS0 is not happen for differ -2 plant
Hi, i m doing Project FG delivery through CNS0 for 2 diff -2 plant (Plant = Shipping Point, i.e. A & B) to same customer (i.e. xyz) while i m using ship point A for customer xyz and doing del. through CNS0, system is picking all inormation which i ha
-
[SOLVED] After resume from suspend to RAM, system is slow / unstable
Hello, I have come across some strangeness when trying to suspend my system. The computer is a lenovo U350. I have read a lot of threads on these subjects, but I never found one that quite matched the experiences I'm having, so I felt compelled to
-
Adobe Flash Player Crash on every Browser
Hi, I'm french so excuse my english... I have a probleme to watch all kinds of Flash animations, I'm on Win7 64 bit, and the animations crash on every browser( IE, Chrome, Safari..)¨ It's the same on facebook and ESPN Player, the browser freeze and t
-
Hi there, I've recently bought CS3 and I'm still getting my head around a few of the widgets, firstly the one I wanna use is the suggest and that not in the menu toolbar in dreamwaever which is annoying me, ive also downloaded the source files and tr