Sales Report

Hi guys, I have the following SQL code
--/* SELECT FROM [dbo].[@EPARAMTABLE]  T0 */
--declare @FromDate          as DATETIME
--declare @ToDate             as DATETIME
--/* WHERE */
--set @fromDate                 = /* T0.U_fromdate */ '[%0]'
--set @toDate       = /* T0.U_todate */ '[%1]'
select
                    t0.U_eTier as 'Tier'
,                    t0.itemcode as 'Item Code'
,                    t0.itemname as 'Item Name'
,                    t0.sww as 'Item SUN Ref.'
,                    t3.onhand as 'Stock in 0MAIN01'
,                    t4.onhand as 'Stock in 1POSBKR'
,                    t5.onhand as 'Stock in 1POSBUS'
,                    t6.onhand as 'Stock in 1POSGOZ'
,                    t7.onhand as 'Stock in 1POSMOB'
,                    t8.onhand as 'Stock in 1POSPLA'
,                    t9.onhand as 'Stock in 1POSREP'
,                    t10.onhand as 'Stock in 1POSTRN'
,                    t11.onhand as 'Stock in 1POSVLT'
,                    t12.onhand as 'Stock in 9CONWST'
,                    t0.onhand as 'Total Stock'
,                    t0.onorder
,                    sum(t1.quantity) as 'Quantity Sold'
from
                    oitm t0 left outer join inv1 t1 on t0.itemcode = t1.itemcode/* and T1.DocDate between @FromDate and @ToDate*/
                              join               oitb t2 on t2.itmsgrpcod = t0.itmsgrpcod
                              join               oitw t3 on t3.itemcode = t0.itemcode and t3.whscode = '0MAIN01'
                              join               oitw t4 on t4.itemcode = t0.itemcode and t4.whscode = '1POSBKR'
                              join               oitw t5 on t5.itemcode = t0.itemcode and t5.whscode = '1POSBUS'
                              join               oitw t6 on t6.itemcode = t0.itemcode and t6.whscode = '1POSGOZ'
                              join               oitw t7 on t7.itemcode = t0.itemcode and t7.whscode = '1POSMOB'
                              join               oitw t8 on t8.itemcode = t0.itemcode and t8.whscode = '1POSPLA'
                              join               oitw t9 on t9.itemcode = t0.itemcode and t9.whscode = '1POSREP'
                              join               oitw t10 on t10.itemcode = t0.itemcode and t10.whscode = '1POSTRN'
                              join               oitw t11 on t11.itemcode = t0.itemcode and t11.whscode = '1POSVLT'
                              join               oitw t12 on t12.itemcode = t0.itemcode and t12.whscode = '9CONWST'
where
                    t0.QryGroup5 = 'Y' AND t3.whscode in ('0MAIN01','1POSBKR','1POSBUS','1POSGOZ','1POSMOB','1POSPLA','1POSREP','1POSTRN','1POSVLT','9CONWST')     
group by
                    t0.itemcode
,                    t0.itemname
,                    t0.sww
,                    t0.onhand
,                    t3.onhand
,                    t4.onhand
,                    t5.onhand
,                    t6.onhand
,                    t7.onhand
,                    t8.onhand
,                    t9.onhand
,                    t10.onhand
,                    t11.onhand
,                    t12.onhand
,                    t0.onorder
,                    t0.u_etier
Order By
                                                        t0.itemcode
This retrieves the Stock per warehouse of a number of items.  It also returns the total sales.  What I need to add to the report now is a column for sales of each Business Partner (going to choose specific business partners).  How do I do this?
I know the probability is that I have to add a function, but I am not able to create the needed function.
Thank you for all your help!!

Hi Venkri,
For this make a stored procedure and make two temp tablesin SP . in first temp table insert the result of ur query and add a new column of bpname in this table , In other table insert bpname and total sales ,And now make joins between these two temp tables and select the data u want .
Hope u got the idea.
Rgds,
Premraj

Similar Messages

  • 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.
    Clint

    Hi 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

  • Values are not getting updated in sales report

    I have configured sales information system, and i have been trying to run sales report but values are not getting updated in sales report, System will through message that no data exists.
    regards,
    thooyavan

    Hi,
    Please check with the Customer and Material Statistics group in the Customer and material master respectively.
    Further check with the LIS settings (Sales Area combination with the Update group).
    Reward points if this helps you.
    Regards,
    Harsh

  • Sales Reports with Partial Shipments

    Hello,
    I need to write a sales report for open orders. If the order has been partially shipped, I just need to pull what remains to be shipped and display this total.
    If the order has not been partially shipped, I need to pull the doc total.
    How do I specify if an order has been partially shipped or not? Is there any way to say, "If a line in RDR1 has been shipped or partially shipped, sum the totals of OpenCreQty * Price, else pull DocTotal"?
    I need to display the report in 1 line per sales order.
    Thanks in advance,
    Chris

    Hi Christine, 
    Without knowing the exact fields you are using you should be doing something like: 
    If {TABLE.OpenCreQty} NOT EQUAL {TABLE.Quantity} Then
         0
    Else {TABLE.Quantity};
    NOTE: WHERE IT SAYS NOT EQUAL TO should be LESS THAN and GREATER THAN symbols. They don't show up in here.
    So the If is checking what was shipped with the order's quantity.  If they are not equal then show 0 otherwise show the order's quantity. 
    Now you can do a summary and sum this formula and you should get the proper numbers. 
    Good luck,
    Brian

  • Sales Report for US Sales and Use tax

    Hi,
    I'm looking for t-code to extract detailed sales report having Gross sales, Exempt sales , Ship to state, Ship to County\ City,  Sales Tax collected. If I'm getting this report i can verify what my sales tax software is updating.
    When i extract  tcode - ZINVLIS i don't get much detail.
    Please help me in extracting complete sales detail which can be used for sales and use tax verification process and audit purpose.
    Thanks,
    Karthik

    Hi Karthik,
    There is no standard report available as per my knowledge.You may develop Z report to achive your requirment. Check some LIS report can give data (MC01 is transaction where you can check all type of key figure reports)
    Regards
    Mani Kumar

  • How set authorizations for sales reports and other reports in SAPB1

    Hi, I'm currently working in SAP Business One Version 8.82
    The issue I'm facing is that I want to set it up so that certain users cannot see other users' sales information.  I know that I can turn on or off the Sales Analysis Report for various users for instance, but what I really want specifically is this.  Suppose we have 3 different teams: Team A consists of (Angie, Angela, and Anita the manager), Team B consists of (Bob, Barbara, and Ben the manager), Team C consists of (Cat, Charlie, and Courtney the manager).  I would like to make it so that everyone can view the individual sales order documents of everyone else (in case a customer calls and needs information, but the salesperson who created that document isn't there); however, Angie should only see her own orders when she does a Sales Analysis while Anita, the manager of Team A, should see the the orders of Angie, Angela, and herself of course.
    To summarize, I'd like to see the following
    1.  Each salesperson can lookup and view any sales order.
    2.  Each salesperson can run an sales report to view all his/her own open sales orders.
    3.  Each manager can run a sales report on his/her subordinates, but not on the other managers or their subordinates.
    4.  The boss or other people working in corporate are able to run a report on all open sales orders.
    What's the best way to approach this?  Is it best if I create my own report?  I haven't created any reports from scratch yet, so I'm not sure exactly how that works.  I'd like to be able to group the salespeople up by location if possible.  The sales analysis report doesn't really do that, but it is useful.  I just don't want everyone to be able to see the numbers on their peers.
    Thank you I appreciate any help or advice.

    Hi,
    1.  Each salesperson can lookup and view any sales order.
    Answer:
    Create own report by using query and save under query manager and the assign for all group. So that all sales person can run this query  and can get sales order detail.
    2.  Each salesperson can run an sales report to view all his/her own open sales orders.
    Answer:
    Create individual query ( add condition in where clause slpname = 'XXX') for each sales person and save it under query manager and assign to particular user group
    3.  Each manager can run a sales report on his/her subordinates, but not on the other managers or their subordinates.
    Answer:
    Create query for only particular team (  condition is slpname = XXX OR YYY OR ZZZ) and save under query manager. Make schedule report on this and send it to only particular manger
    Same way create for another manager and schedule report.
    4.  The boss or other people working in corporate are able to run a report on all open sales orders
    Answer.
    Create query for all sales person and schedule report to big boss.
    Hope you can get an idea.
    Let me know if you need sales report ( advice required field)
    Thanks & Regards,
    Nagarajan

  • SALES REPORT (Credit memos Subtracted)

    Hi all,
    I would like to come up with a detailed Sales Reports that shows the Quantity and Value of items sold per day (AR Invoices) excluding the credit memos. I later want to use the same query in crystal reports. I came up with the below query; the select statements are executing individually but using 'UNION ALL' I am getting a 'Conversion' error.
    SELECT T0.[CardCode]Code, T4.[SuppCatNum]cat, T4.[FrgnName]frn, T1.[Quantity]InvQ, T0.[DocTotal]InvT,0 MemoQ,0 MemoT FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry full outer JOIN OSLP T2 ON T0.SlpCode = T2.SlpCode full outer JOIN OUSR T3 ON T0.UserSign = T3.USERID full outer JOIN OITM T4 ON T1.ItemCode = T4.ItemCode WHERE (T1.WhsCode='MLO01' or T1.WhsCode='ARG01')  AND T0.DocDate=[%0]
    union all 
    SELECT  0 Code, 0 cat, 0 frn, 0 InvQ,0 InvT, T1.[Quantity] MemoQ, T0.[DocTotal] MemoT FROM ORIN T0  INNER JOIN RIN1 T1 ON T0.DocEntry = T1.DocEntry full outer JOIN OSLP T2 ON T0.SlpCode = T2.SlpCode full outer JOIN OUSR T3 ON T0.UserSign = T3.USERID full outer JOIN OITM T4 ON T1.ItemCode = T4.ItemCode WHERE (T1.WhsCode='MLO01' or T1.WhsCode='ARG01') AND T0.DocDate=[%0]
    kindly assist refine this query or come up with a better one altogether. Thank you.

    Hi,
    Try:
    SELECT T0.CardCode Code, T4.SuppCatNum cat, T4.FrgnName frn, T1.Quantity InvQ, T1.LineTotal InvT,0 MemoQ,0 MemoT
    FROM OINV T0
    INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
    LEFT JOIN OITM T4 ON T1.ItemCode = T4.ItemCode
    WHERE (T1.WhsCode='MLO01' or T1.WhsCode='ARG01') AND T0.DocDate=[%0\]
    union all 
    SELECT  '', '', '', 0,0, T1.Quantity, T1.lineTotal
    FROM ORIN T0
    INNER JOIN RIN1 T1 ON T0.DocEntry = T1.DocEntry
    LEFT JOIN OITM T4 ON T1.ItemCode = T4.ItemCode
    WHERE (T1.WhsCode='MLO01' or T1.WhsCode='ARG01') AND T0.DocDate=[%0\]
    Thanks,
    Gordon

  • 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.
    Shaun

    Shaun,
    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

  • Intrastat / EC sales reporting for Italy

    Hi all. We have implemented a new company code for italy. Business is now requiring several country specific reporting, namely the intrastat and EC sales reporting. I tried going through some documentation but there are several reports available for intrastat, so i am not getting the whole picture or which report(s) i should be using. Does anyone know the sap note which describes the full intrastat reports or have any similar documentation?
    thanks in advance for your help.

    Hello Simon,
    The below documents might be helpful to you,
    http://www.scmexpertonline.com/downloads/Kees%20Intrastat%20download%201-23-07.doc
    http://www.appliconsolutions.com/fileadmin/filer_solutions/pdf/White_paper/White_Paper_APM__v._2.9.pdf
    http://mbs.microsoft.com/downloads/public/GP10Docs/EnhancedIntrastat.pdf
    This is the last one for oracle,
    http://download.oracle.com/docs/cd/A60725_05/pdf/gemmsin.pdf
    br,
    Pushkar

  • Unable to generate Sales Report of Business Partner  by State-XL Reporter

    We are not able to generate Sales Report of Business Partner  by State using XL Reporter.
    The issue is that we can not access the Bill to State for BPs, or for that matter the Ship-to State.  We can access Bill T street, block, city, country u2013 everything except state.
    There is a CRD State, but for sales reports this is useless.  Can someone advise on this?
    Thanks in advance,
    Srini

    You can get around this by creating a UDF and formatted search to populate it.
    The XL Report can then be created, but, watch out on upgrade - XL Reports with UDF's are not easy on upgrade, especially where the UDF will be a run parameter. I often have to re-write after upgrade, so store a base one without the parameter setting

  • Calculation of Quaterly Figures for Sales Report.

    Hi,
    I would like to display the Sales report in the Quarterly format with respect to  sales employees.
    For Ex :-
    1)Q1-20 Lacs  (April,May June 07)
    2)Q2-30 Lacs   (July Aug ,Sept 07)
    3)Q3-25 Lacs   (Oct,Nov and Dec 07)
    4)Q4-20 Lacs   (Jan.Feb,Mar 08)-Also i would like to view the current month say Jan 08 i.e till date sales.
    It should display Monthly sales and Quartely sales with the Quartely totals.
    Please advise me as to how to proceed with the Formaulae,Restriction in BEX Query.
    Let me knw if u require any further info.
    Thank in Advance
    wth rgds
    SVU
    Edited by: svu123 on Jan 8, 2008 3:47 PM

    Hi Kenneth
    1) you can use statistical FC means with input data your histoy and you outputr your proportional factor if you want e.g. to have an average of the last 13 or 24 months, with use of moving average simply, if you want to have a constant value
    2) you can use a calculated KF that copies from history to proportional factor by shifting by one year, using PERIODID shift. THere are example in the SAP model for a year-1 lag calculation
    3) You can do as in 2, but in addition make use of any additional formula according to your needs
    4) you can NOT have a dynamic calculation, because prerequisite for disaggregation is that you keyfigure used in the fisaggregation
    - is stored and not calculated
    - has the same base planning level than the KF itself
    Yours
    Irmi

  • Sales Report problem with 2LIS_11_VAHDR, 2LIS_11_VAITM and other DS

    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 Henkel

    Hi 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

  • Monthly wise sales report

    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 form

    Dear 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

  • Tax Wise Sales Report

    HI Experts,
    We need a Sales report at the end of everymonth.
    Below is the query i run to get the sales register.
    SELECT M.DocNum AS ' Inv No. #', M.DocDate as 'Posting Date', M.CardName as 'Customer Name',
    (Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry) as 'BaseAmt.(Rs.)',
    M.VatSum as 'Tax (Rs.)',
    M.DocTotal as 'Total (Rs.)',
    (M.DocTotal-M.[PaidToDate]) as 'BalanceDue (Rs.)'
    FROM OINV M LEFT OUTER JOIN INV1 L on L.DocEntry=M.DocEntry
    LEFT OUTER JOIN INV4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
    LEFT OUTER JOIN INV5 J ON M.DocEntry = J.AbsEntry
    LEFT OUTER JOIN INV3 Q ON M.DocEntry = Q.DocEntry
    WHERE M.DocDate BETWEEN '[%0]' AND '[%1]'
    GROUP BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,
    M.WTSum,M.DocTotal,M.PaidToDate,M.VatSum
    ORDER BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,
    M.WTSum,M.DocTotal,M.PaidToDate,M.VatSum
    But i need the sales report  by TAX Wise As we are having different types of tax.i need a a report on tax wise..
    Pls provide me some solution.
    Thanx in advance.

    Hi
    U can try this:
    SELECT M.DocNum AS 'AR Inv. #', M.DocDate as 'Date', M.CardName as 'Customer Name',M.NumAtCard as 'Customer Ref',
    (Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)',
    (SELECT Avg(TaxRate) FROM INV4 where statype=-90 and DocEntry=M.DocEntry) as 'ED %',
           (SELECT Sum(TaxSum) FROM INV4 where statype=-90 and DocEntry=M.DocEntry) as 'ED (Rs.)',
    (SELECT Avg(TaxRate) FROM INV4 where statype=-60 and DocEntry=M.DocEntry) as 'EDCS %',
           (SELECT Sum(TaxSum) FROM INV4 where statype=-60 and DocEntry=M.DocEntry) as 'EDCS (Rs.)',
    (SELECT Avg(TaxRate) FROM INV4 where statype=-55 and DocEntry=M.DocEntry) as 'HECS %',
           (SELECT Sum(TaxSum) FROM INV4 where statype=-55 and DocEntry=M.DocEntry) as 'HECS (Rs.)',
    (SELECT Avg(TaxRate) FROM INV4 where statype=1 and DocEntry=M.DocEntry) as ' VAT % ',
           (SELECT Sum(TaxSum) FROM INV4 where statype=1 and DocEntry=M.DocEntry) as ' VAT (Rs.) ',
    (SELECT Avg(TaxRate) FROM INV4 where statype=4 and DocEntry=M.DocEntry) as ' CST % ',
           (SELECT Sum(TaxSum) FROM INV4 where statype=4 and DocEntry=M.DocEntry) as ' CST (Rs.) ',
           (SELECT Sum(TaxSum) FROM INV4 where statype=-40 and DocEntry=M.DocEntry) as ' CVD (Rs.) ',
    (SELECT Avg(TaxRate) FROM INV4 where statype=5 and DocEntry=M.DocEntry) as ' Ser.Tax % ',
           (SELECT Sum(TaxSum) FROM INV4 where statype=5 and DocEntry=M.DocEntry) as ' Ser.Tax (Rs.) ',
    (SELECT Avg(TaxRate) FROM INV4 where statype=6 and DocEntry=M.DocEntry) as 'CS on Ser.Tax %',
           (SELECT Sum(TaxSum) FROM INV4 where statype=6 and DocEntry=M.DocEntry) as 'CS on Ser.Tax (Rs.)',
    (SELECT Avg(TaxRate) FROM INV4 where statype=-10 and DocEntry=M.DocEntry) as 'HECS_ST %',
           (SELECT Sum(TaxSum) FROM INV4 where statype=-10 and DocEntry=M.DocEntry) as 'HECS_ST (Rs.)',
    (Select Sum(LineTotal) From INV3 Q Where Q.DocEntry=M.DocEntry) AS 'Freight (Rs.)',
    M.WTSum AS 'TDS (Rs.)',
    M.DocTotal as 'Total (Rs.)'
    FROM OINV M LEFT OUTER JOIN INV1 L on L.DocEntry=M.DocEntry
    LEFT OUTER JOIN INV4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
    LEFT OUTER JOIN INV5 J ON M.DocEntry = J.AbsEntry
    LEFT OUTER JOIN INV3 Q ON M.DocEntry = Q.DocEntry
    WHERE (M.DocDate >= '[%0]' AND M.DocDate <= '[%1]')
    GROUP BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,M.DocTotal
    ORDER BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,M.DocTotal
    Giri

  • Territory Wise Sales Report

    I want to generate territory wise sales report using sql server reporting services from sap b1.  How can I define the hierarchy where my state will be the top group, the territories will be the sub groups and the executive name and sales value will be the details.  How can I transform the parent, child relation into a group, sub group option in a report.  Kindly provide sample sql query for the same.
    Thanks in advance.

    Dear Gordon,
    As advised by you i have created territory hierarchy in the territory setup, where zone is the first level, state is the second level and territory (district) is the third level and in the BP master territory field this third level is picked. I am finding it difficult to develop hierarchy wise report where the report when run should show the zone wise net sales summary (net in the sense, minus all the sales returns and credit notes, etc) and when drilled should show the state wise total and in the last level the territory wise sales and if possible one more drill where the BP under that territory with sales amount will be shown.  Request you to kindly help me with a base query wherein i can modify the same to develop many variation of the same report.  Thanks in advance.

Maybe you are looking for

  • Regexp_replace to remove blank lines from multi lines in a single field

    Gents. 10g R2.    with test_tab as    (select 'x'||chr(10)||'y'||chr(10)||chr(10)||'z' tester from dual)    select tester from test_tabproduces x y zI require x y zThere's a lot of examples on how to end up with xzy, but I need to maintain the carria

  • How To Do I Install Numbers (Download) On a 2nd Mac?

    I bought the 19.99 version from the App store, which installed fine on my Mac Pro. It is my understanding that it is OK to install this on multiple computers now in your home. I dragged a copy of it using Dropbox, then went downstairs and pulled it o

  • Creation of a .exe file for a Java program

    hi, myself is venu. Can anyone help in creating a .exe file for a generated .class file. Thanking you in advance. bye

  • Using columns of user defined types

    Can anyone help me display data from a column within a table which is of a user defined type - a object with 4 elements . Discoverer wont currently display the data - it says a MAP or ORDER method is required. The type is declared as : create or repl

  • Unable to export slideshow in iPhoto

    Iphoto exporting slideshow freezes.  Slideshow plays in iphoto, but want to send to a few friends and unable to export.  Followed the support faq guide and takes me through the process but when goes to 'export' nothing happens.  Have waited 10-15 min