Sales report on last 6motns and 3 months
Hi,
Can any one guide me on this issue . user wants current year sales, last year sales,last6monts,last3months data required .Can any one guide me on this .
Regards
Rk
Hi.
Create 2 variables of type customer exit:
Z_CURR_YEAR based on 0CALYEAR
Z_CURR_MONTH base on 0CALMONTH
At I_STEP = 1 in EXIT_SAPLRRS0_001 add this code:
DATA : l_s_range LIKE rrrangesid .
CASE i_vnam .
WHEN 'Z_CURR_YEAR'.
l_s_range-low = sy-datum+0(4).
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
WHEN 'Z_CURR_MONTH'.
l_s_range-low = sy-datum+0(6).
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
Then create 4 restricted KF:
1. sales current year: with variable Z_CURR_YEAR
2. sales last year: with variable Z_CURR_YEAR and offset (-1)
3. sales last 3 month: with variable Z_CURR_MONTH and offset (-1) and (-2) and (-3)
4. sales last 6 month: with variable Z_CURR_MONTH and offset (-1) and (-2) and (-3) till offset (-6)
Regards.
Similar Messages
-
Please help to get onhand stock report with last purchase and billed date warehouse and item wise
please help to get onhand stock report with last purchase and billed date warehouse and item wise
Hi Rajeesh Ambadi...
Try This
SELECT distinct T0.ITEMCODE , t1.ItemName, T0.ONHAND as 'Total Qty',
T1.LASTPURDAT ,t1.LastPurPrc
FROM OITW T0 INNER JOIN OITM T1 ON T0.ITEMCODE = T1.ITEMCODE
INNER JOIN OITB T2 ON T1.ITMSGRPCOD=T2.ITMSGRPCOD left join ibt1 t3 on t3.itemcode = t0.itemcode and t3.whscode = t0.whscode
WHERE
T0.ONHAND>0
AND T0.WhsCode ='[%0]'
Hope Helpful
Regards
Kennedy -
Daily sales report with last selling price
Dear All,
how to query daily sales record with last selling price as following:
cust. code , item , unit price, last selling price to this cust. within 3 month , highest selling price of this item with 3months
I'm new to both SAP and SQL, Please help! Many Thanks!!
WingHi,
Try this........
SELECT P.CardCode,P.CardName,P.ItemCode,
[1] as [Jan],
[2] as [Feb],
[3] as [Mar],
[4] as [Apr],
[5] as [May],
[6] as [Jun],
[7] as [Jul],
[8] as [Aug],
[9] as [Sep],
[10] as [Oct],
[11] as [Nov],
[12] as [Dec]
FROM (SELECT (T0.CardCode),T0.CardName,t1.ItemCode,T1.price,MONTH(T1.Docdate)as month
FROM dbo.OINV T0
inner join INV1 T1 ON T0.DocEntry=T1.DocEntry
inner join OITM t2 on T1.ItemCode=t2.ItemCode
WHERE T1.DocDate>='[%0]' and T1.DocDate<='[%1]' and T1.ITEMCODE='[%2]'
and T0.CardCode='[%3]'
) S
PIVOT (max(price) FOR [month] IN
([4],[5],[6],[7],[8],[9],[10],[11],[12],[1],[2],[3])) P
ORDER BY P.[CardCode]
Check this link for SQL tutorials.........
http://beginner-sql-tutorial.com/sql-subquery.htm
http://w3schools.com/sql/default.asp -
Daily report of unsuccessful logons and monthly report of activity
Hi All,
we can get the user logon history from "Sign-in Audit" link. But how can we design a report which would be able to fetch the logon history? As per requirement the report should fetch unsuccessful logon history on daily basis.
Again we would like to design a report to get the user(with role, creation date) who have created any account, lead, opportunity e.t.c on monthly basis.
Thanks and Regards,
AnimeshHi,
Created By and Created Time Stamp are recorded in objects like Accounts, Leads etc. So you can build a report using the right subject area to get the number of records created by each of the user. Additional information about the user can typically obtained from fields in Analytics under "Owned By User" section.
On sign-in history only WS access is available and not through reports
-- Venky CRMIT -
Every night Firefox crashes without any crash report.
All I get is the Windows dialog that says "Firefox has stopped working" "A problem caused the program to stop working correctly. Please close the program." "Close the program". (If I can upload the screenshot I will).
The websites I was on are intranet only sites, require NO Flash or Java. Two tabs only. The same sites were not crashing in much older versions, appx 6+ months ago.
The only criteria for crashes seems to be the uptime of Firefox. The longer I leave it, the greater the chances of this crash. I have never seen it crash in front of my eyes, always (90%) would have crashed when I unlock the PC in the morning. I leave it running and locked the whole night.
Just a couple of days ago I decided to do a complete clean install of Firefox, i.e.:
Uninstall, Delete Program Files, Delete Profile folder. Reinstall, import bookmarks. That's it.
Hardware Acceleration has been disabled.
Provide Telemetry has been enabled.
Crash Reporter is enabled, but doesn't kick in. about:crashes is empty. (Even before re-install there were no recent crashes recorded there).HP Compaq 6005 Pro Small Form Factor PC
AMD Athlon II X2 Processor B24
Chipset AMD 785G
Integrated ATI Radeon HD 4200
Integrated Broadcom NetXtreme Gigabit Ethernet BCM 5761
Integrated High Definition audio with Realtek ALC261 codec, internal PC speaker
For further info : http://h10010.www1.hp.com/wwpc/ca/en/sm/WF06a/12454-12454-64287-3328896-3328896-4024556.html?dnr=1
Thanks for looking into this. -
Can i get month, quarterly, half yearly, yearly wise sales report basing on
hi,
sap gurus,
good evening to all,
how can i get month, quarterly, half yearly, yearly wise sales report basing on division and material.
is there any std transaction code for that.
customization is requried for that.
regards,
balaji.t
09990019711Standard SAP SD Reports:=
Statistic Group:
Purpose u2013 To capture data for Standard Reports, we require to activate Statistic Group as under:
--> Item category (Configuration)
--> Sales document type (Configuration)
--> Customer (Maintain in Master data)
--> Material (Maintain in Master data)
When you generate statistics in the logistics information system, the system uses the combination of specified statistics groups to determine the appropriate update sequence. The update sequence in turn determines for exactly which fields the statistics are generated.
Configuration:
IMG --> Logistics Information System (LIS) --> Logistics Data Warehouse --> Updating --> Updating Control --> Settings: Sales --> Statistics Groups -->
1. Maintain Statistics Groups for Customers
2. Maintain Statistics Groups for Material
3. Maintain Statistics Groups for Sales Documents
4. Assign Statistics Groups for Each Sales Document Type
5. Assign Statistics Groups for each Sales Document Item Type .....
All Standard Reports which are available are as under:
SAP Easy Access: Information Systems -> Logistics -> Sales and distribution ->
1. Customer -> Incoming orders / Returns / Sales / Credit memos / Sales activities / Customer master / Conditions / Credit Master Sheet
2. Material -> Incoming orders / Returns / Sales / Credit memos / Material master / ...
3. Sales organization -> Sales organization / Sales office / Sales employee
4. Shipping point -> Deliveries / Returns
5. SD documents -> Orders / Deliveries / Billing documents ...
& so on.
Regards,
Rajesh banka -
SCSM2012 R2 Custom Reports with Weekly and monthly schedule to email
Hi
I am able to pull standard ListofIncidents Reports, want a similar kind of report with a Weekly and monthly scheduled reports to email, I have tried using pull reports from Cubes to Excel and do a custom reports but is not showing like standard ListofIncidents
Reports. Could you please guide me on this.
Thanks and Regards,
Pradeep Kumar
Pradeep KuimarHi,
Would you please check the articles below regarding to publishing and Subscribing to Service Manager Reports:
http://blogs.technet.com/b/servicemanager/archive/2010/06/30/publishing-and-subscribing-to-service-manager-reports.aspx
How to Schedule a Standard Service Manager Report
https://technet.microsoft.com/en-us/library/hh519682.aspx
Hope this can be helpful for you!
Regards,
Yan Li
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] -
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 -
How to retrieve Sales report on Web page
hi,
I want to fetch sales report on web page and accessable only admin,so how to do this ?import java.net.*;
import java.io.*;
public class httptest
public static void main(String[] args) throws Exception
URL url =
new URL("http://www.bonjour.fr/bonjour_fichiers/affichepa2.cfm");
HttpURLConnection c = (HttpURLConnection)url.openConnection();
c.setDoInput(true);
BufferedReader br = new BufferedReader(new InputStreamReader(c.getInputStream()));
String line;
while( (line=br.readLine()) != null ) {
System.out.println(line); -
Sales report for current month and year a go month
i could you please guide me builting report for current monthwise for current month and year a ago month
report parameter month_year='06-2010'
tables = sales and below are the table fields
customer_id
invoice_dt
invoice_am
thanks
nhmOkay, Still you did not mention how you will pass value in report while generating.
Anyway the query with UNION ALL will work. For Example.
I am assuming that the parameter for date/month you will pass in range like 01-JUN-2010 to 30-JUN-2010
SELECT customer_id, SUM(curr_value) curr_value, SUM(past_value) past_value
FROM
SELECT customer_id, NVL(SUM(invoice_amount),0) curr_value, 0 past_value
FROM sales
WHERE invoice_dt BETWEEN :P_FROM_DATE AND :P_TO_DATE -- here P_FROM_DATE and P_TO_DATE will be the date range for current year as i showed above.
AND -- Any Condition goes here...
GROUP BY customer_id
UNION ALL
SELECT customer_id, 0, NVL(SUM(invoice_amount),0)
FROM sales
WHERE invoice_dt BETWEEN ADD_MONTHS(:P_FROM_DATE,-12) AND ADD_MONTHS(:P_TO_DATE,-12) -- This add_months function for the previous year same month.
AND -- Any condition goes here...
GROUP BY customer_id
GROUP BY customer_idNow using the above query you can design the tabular report as you showed the format.
-Ammad
Edited by: Ammad Ahmed on Jul 3, 2010 7:55 PM
added GROUP BY -
Sales report for the month.
Hi all,
I am looking for some help with a query that I am trying to write for a customer. They have asked me for a report that shows them a date range of sales not including: Discount, Tax, and Shipping/Freight. They are wanting to be able to populate this using a date range and by business partner. The last thing they are wanting is to have this only include items that are in 2 specific item groups. If anyone has any suggestions it would be greatly appreciated. Thanks!
Kind Regards,
Jeff Haldeman
Support OneHi Jeff ,
lets make this simpler
1. How do you identify as sales -- Is it Ar invoice or Sales order
2. How is your user entering data for discount at row level or footer (header) level
3. Since they need Item * sales Cost ,looks like you have to calculate your own total so you cannot use system total unless you reverse (doctotal -tax -discount )
4. Date range means (you have to use parameter )
5. Business partner range (parameter )
6. Item with two group ( put a condition )
Did you take a look at Sales Analysis report by Item with secondary selection customer and use filter function to take out some unnecessry field .May be that satisfied their need .
Please update us more .then we can help you more
Thank you
Bishal -
How to club the following COGS / Sale report, and add sale order value also to this report
------------------------------COGS-----------------------------------------------------
SELECT X.Cardname, SUM(X.Jan) JAN, SUM(X.FEB) FRB, SUM(X.MAR) MAR, SUM(X.APR) APR, SUM(X.MAY) MAY
, SUM(X.JUN) JUN, SUM(X.JUL) JUL, SUM(X.AUG) AUG, SUM(X.SEP) SEP, SUM(X.OCT) OCT
, SUM(X.NOV) NOV, SUM(X.DEC) DEC, SUM(X.GT) GT
FROM (
SELECT T0.Cardname
, CASE DATEPART(m,T0.DocDate) WHEN 1 THEN T0.CogsVal ELSE 0 END JAN
, CASE DATEPART(m,T0.DocDate) WHEN 2 THEN T0.CogsVal ELSE 0 END FEB
, CASE DATEPART(m,T0.DocDate) WHEN 3 THEN T0.CogsVal ELSE 0 END MAR
, CASE DATEPART(m,T0.DocDate) WHEN 4 THEN T0.CogsVal ELSE 0 END APR
, CASE DATEPART(m,T0.DocDate) WHEN 5 THEN T0.CogsVal ELSE 0 END MAY
, CASE DATEPART(m,T0.DocDate) WHEN 6 THEN T0.CogsVal ELSE 0 END JUN
, CASE DATEPART(m,T0.DocDate) WHEN 7 THEN T0.CogsVal ELSE 0 END JUL
, CASE DATEPART(m,T0.DocDate) WHEN 8 THEN T0.CogsVal ELSE 0 END AUG
, CASE DATEPART(m,T0.DocDate) WHEN 9 THEN T0.CogsVal ELSE 0 END SEP
, CASE DATEPART(m,T0.DocDate) WHEN 10 THEN T0.CogsVal ELSE 0 END OCT
, CASE DATEPART(m,T0.DocDate) WHEN 11 THEN T0.CogsVal ELSE 0 END NOV
, CASE DATEPART(m,T0.DocDate) WHEN 12 THEN T0.CogsVal ELSE 0 END DEC
, T0.CogsVal GT
FROM dbo.OINM T0
WHERE T0.DocDate BETWEEN [%0] AND [%1]) X
Group By X.Cardname
---------------------------------------Sale ----------------------------------------
SELECT X.CardName, SUM(X.Jan) JAN, SUM(X.FEB) FRB, SUM(X.MAR) MAR, SUM(X.APR) APR, SUM(X.MAY) MAY
, SUM(X.JUN) JUN, SUM(X.JUL) JUL, SUM(X.AUG) AUG, SUM(X.SEP) SEP, SUM(X.OCT) OCT
, SUM(X.NOV) NOV, SUM(X.DEC) DEC, SUM(X.GT) GT
FROM (
SELECT T0.CardName
, CASE DATEPART(m,T0.DocDate) WHEN 1 THEN T0.DocTotal ELSE 0 END JAN
, CASE DATEPART(m,T0.DocDate) WHEN 2 THEN T0.DocTotal ELSE 0 END FEB
, CASE DATEPART(m,T0.DocDate) WHEN 3 THEN T0.DocTotal ELSE 0 END MAR
, CASE DATEPART(m,T0.DocDate) WHEN 4 THEN T0.DocTotal ELSE 0 END APR
, CASE DATEPART(m,T0.DocDate) WHEN 5 THEN T0.DocTotal ELSE 0 END MAY
, CASE DATEPART(m,T0.DocDate) WHEN 6 THEN T0.DocTotal ELSE 0 END JUN
, CASE DATEPART(m,T0.DocDate) WHEN 7 THEN T0.DocTotal ELSE 0 END JUL
, CASE DATEPART(m,T0.DocDate) WHEN 8 THEN T0.DocTotal ELSE 0 END AUG
, CASE DATEPART(m,T0.DocDate) WHEN 9 THEN T0.DocTotal ELSE 0 END SEP
, CASE DATEPART(m,T0.DocDate) WHEN 10 THEN T0.DocTotal ELSE 0 END OCT
, CASE DATEPART(m,T0.DocDate) WHEN 11 THEN T0.DocTotal ELSE 0 END NOV
, CASE DATEPART(m,T0.DocDate) WHEN 12 THEN T0.DocTotal ELSE 0 END DEC
, T0.DocTotal GT
FROM dbo.OINV T0
WHERE T0.DocDate BETWEEN [%0] AND [%1]) X
Group By X.CardNameHi,
Use Mr. Gordon's query and concept to create above report for only for Jan month.
If you need for particular year and for all months, use below query:
SELECT X.CardName, SUM(X.JanCOG) 'Jan-Cogs', SUM(X.JanINV) 'Jan-Inv',SUM(X.FebCOG) 'Feb-Cogs', SUM(X.FebINV) 'Feb-Inv',SUM(X.MarCOG) 'Mar-Cogs', SUM(X.MarINV) 'Mar-Inv', SUM(X.AprCOG) 'Apr-Cogs', SUM(X.AprINV) 'Apr-Inv', SUM(X.MayCOG) 'May-Cogs', SUM(X.MayINV) 'May-Inv',SUM(X.JunCOG) 'June-Cogs', SUM(X.JunINV) 'June-Inv',SUM(X.JulCOG) 'July-Cogs', SUM(X.JulINV) 'July-Inv',SUM(X.AugCOG) 'Aug-Cogs', SUM(X.AugINV) 'Aug-Inv',SUM(X.SepCOG) 'Set-Cogs', SUM(X.SepINV) 'Sep-Inv',SUM(X.OctCOG) 'Oct-Cogs', SUM(X.OctINV) 'Oct-Inv',SUM(X.NovCOG) 'Nov-Cogs', SUM(X.NovINV) 'VNov-Inv',SUM(X.DecCOG) 'Dec-Cogs', SUM(X.DecINV) 'Dec-Inv'
FROM
(SELECT CardName, [1] JanCOG, 0 JanINV,[2] FebCOG, 0 FEBINV,[3] MarCOG, 0 MARINV,[4] AprCOG, 0 AprINV,[5] MayCOG, 0 MayINV,[6] JunCOG, 0 JunINV,[7] JulCOG, 0 JulINV,[8] AugCOG, 0 AugINV,[9] SepCOG, 0 SepINV,[10] OctCOG, 0 OctINV,[11] NovCOG, 0 NovINV,[12] DecCOG,0 DecINV
FROM (SELECT T0.[CardName], T0.CogsVal,
MONTH(T0.DocDate) Month FROM OINM T0 where year(t0.docdate) = 2014
) S
PIVOT(SUM(CogsVal) for Month in ([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12])) P
UNION ALL
SELECT CardName, 0,[1] JanINV, 0,[2] FebINV, 0,[3] MarINV, 0,[4] AprINV, 0,[5] MayINV, 0,[6] JunINV, 0,[7] JulINV, 0,[8] AugINV, 0,[9] SepINV, 0,[10] OctINV, 0,[11] NovINV, 0,[12] DecINV
FROM (SELECT T0.[CardName], T0.DocTotal,
MONTH(T0.DocDate) Month FROM OINV T0 where year(t0.docdate) = 2014
) S
PIVOT(SUM(DocTotal) FOR Month in ([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12])) P) X
GROUP BY X.CardName
Thanks & Regards,
Nagarajan -
hai,
i m working on sales report where in i need to get month wise sales of the products and the related cost incured to company by the sales in the matrix form as shown below can u help me in which way can i get this monthly report
march april may june july......feb
mtrl 25 30 0 19 23 ........(mtrl quantity)
cost 30000 15000 0 45000 ..........(amt in rs)
where in the above i m able to get yearly sales in one column (i.e i m able to show for one particular customer total sales in one column) but i m unable to split sales monthly and unable to show in a report so how can i able to sow in this matrix formDear Raj,
Please find the code for monthly wise report in PA0001 Table for calculation of Administrator time Recording.
http://scn.sap.com/message/14216250#14216250 -
I have a requirement where say user selects year and months by prompts eg. 2008 jan and 2008 feb. It should also give me sales for last year and should be arranged as rows.
2008 Jan Sales
2008 Feb Sales
2007 Jan Sales
2007 Feb Sales
How to go about it?
ThanksYou would need to expose another column (you can hide it, of course) that contains the month number (monthnum) equivalent (1 - 12) of the month name (Jan - Dec). Set primary sorting (1) to the year in descending order and secondary sorting (2) to the monthnum column in ascending order.
As for getting "last year's" data from the prompt, say you have a prompt called "Year." Then you would create two "year" filters, on the Year column, as follows:
"column name".year = @{Year}
OR
"column name".year = @{Year}-1
This will pull both the "prompt year" and the year before. -
SIS: Sales Report as per sales office and material
Hi All,
Is there any standard report with selection fields as sales office, Material and Month for invoice sales.
ThanksHi,
Check with MCTG
Regards!
Sadanand
Maybe you are looking for
-
Powerpivot add-in installation issue "Could not find a part of the path"
Hello, I got a Windows Server 2008R2 terminal server with Office 2010 and Powerpivot installed. I have an issue for some users, not every user get this error. When trying to add the Powerpivot add-in in Excel the following error message is displayed
-
The big 7200rpm vs 5400 rpm debate
I'm planning to buy a 2.2ghz Macbook Pro. I would get one with 2Gb of RAM and the 160Gb 7200 rpm HD, but now someone I know had already bought the standard config (2.2 Ghz, 2Gb, 120 5400 rpm) through his company but he's selling it because he'd rathe
-
Powermac G3: max 4x256Mbyte. Can you confirm?
Hi to everybody. I believe the title of the subject is clear but can somebody confirm that the size limit of RAM in each slot is 256Mbyte (machine is produced in july 1999). Does also anybody know if PC-133 256Mbyte DIMM are OK? Thank you very much.
-
Retreive External data from SQL making connection to SQL server take a long time
I have an Excel pivottable based on a view from SQL server. The view gets data from 2 databases on the sames server. I have the sames login for both databases and also the same rights (datareader, datawriter and owner). When running the view from wit
-
Help!!! network error on the web form
When I run forms on the web , the following errors occurred occasionally, and I don't know when and where this errors will occurr. Can anyone help me to solve this problem , Thanks a lot !!! ---<errors details>----------------------------------------