Showing Monthly Sales Analysis for Sales Employees (including credit notes)

Hi Experts,
I want to show a report for my director so we can accurately decide upon sales targets for each sales employee for 2012.
The Monthly Report > Invoices by posting date in the Sales Analysis module is not ideal because it does not appear to include credit notes so the totals are incorrect.
How could I create a query which gave me a total for each month of 2011 for every sales employee which includes invoice minus credit notes.
Unfortunately my SQL is not great but I started something which might help - this is only for first 2 months of the year.   I presume I would need a select statement for each month if I wanted to have the sales employee name followed by a total for each month.    Maybe this is too intensive a query to run anyway.  
SELECT T1.[SlpName],
(select(sum(t2.doctotal)-(t3.doctotal)) where (Month(t2.docdate)=1 and t3.docdate=1) FROM OCRD T0  INNER JOIN OSLP T1 ON T0.SlpCode = T1.SlpCode INNER JOIN OINV T2 ON T0.CardCode = T2.CardCode INNER JOIN ORIN T3 ON T0.CardCode = T3.CardCode)
(select(sum(t2.doctotal)-(t3.doctotal)) where (Month(t2.docdate)=2 and t3.docdate=1) FROM OCRD T0  INNER JOIN OSLP T1 ON T0.SlpCode = T1.SlpCode INNER JOIN OINV T2 ON T0.CardCode = T2.CardCode INNER JOIN ORIN T3 ON T0.CardCode = T3.CardCode)

Hi,
I have moved your posting here because it belongs here.
You may check this first: Re: Top Customers report
Thanks,
Gordon

Similar Messages

  • Customer Recievables Ageing by Sales Employee showing No Sales Employee

    Dear Sir(s),
    We are on SAP Business One 8.81 PL04.
    The customer recievables Ageing by Sales Employee report shows "No Sales Employee". when we group by sales employee on the selection criteria.
    We have setup all our Customers with sales employees in the Business Partner Master Data.
    Please advise on what could be the cause of this.
    Kind Regards,
    Asif M.

    Hi Rahul,
    Yes, the sales employee details are captured on the invoice.
    Infact, on the "No sales employee" Group, only the Incoming Payments (Type : RC) show for the diferent customers and yet these incoming payments were paid based on the invoices which have the sales employees captured.
    The customers appear both on the "No Sales Employee" Group as negative balances as well as its correct "Sales Employee' group as positve balance. The report shows correctly when we select the group by as  "customer" in the selection criteria.
    Regards,
    Asif

  • Can I build a query to show monthly sales by item by business partner?

    Hi all
    Is it possible to build a query to show monthly sales (quantity not value) by item by business partner?
    So the table would look something like this.
                   Jan     Feb     Mar     Apr
    Item 1      10       4         8         7
    Item 2      4         3         5         6
    Item 3      4        12        9         3
    Item 4      1         0         1         2
    Etc...
    As you can see, the monthly figure needs to be quantity of the item and not sales value.
    Would be grateful for any help.
    Many thanks.
    Wendy

    Hi,
    Try this:
    declare @code as varchar(15)
    set @code = ( select max(ta.cardcode) from OINV ta where ta.cardcode = [%0])
    Select [a] as Cardcode, [B] as Cardname, [c] as Item#, [D] as Descr,[1] as Jan,[2] as Feb,[3]as Mar,[4] as April,[5] as May,[6] as June,[7] as July ,[8] as Aug,[9] as Sept,[10] as Oct ,[11]as Nov,[12] as Dec
    from(
    SELECT T0.[CardCode] as  A , T0.[CardName] as  B, T1.[ItemCode] as C, T1.[Dscription] as D, sum(T1.[Quantity]) as t,month(T0.[DocDate]) as month FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry WHERE year( T0.[DocDate]) = 2014 and t0.cardcode = @code GROUP BY T0.[CardCode], T0.[CardName], T1.[ItemCode], T1.[Dscription],T0.[DocDate] ) S
    pivot
    (sum(t) for month IN ([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12])) P
    Thanks & Regards,
    Nagarajan

  • Sales Employee Description is not following into COPA

    Dear Experts
    I have set sales employee as a characteristic in my operating concern that was triggered from PAPARTNER. From there I developed then run COPA report painter (KE30) for sales employee with ALV display options. In fact the report can only display sales employee code, without the description. I desperately need sales employee description in my report, based on user requirement.
    Here we didn't activate HR module. In the same time SD has defined Sales Employee as Partner Function (SE) in customer master data. The Partner Function is looked up the sales employee name from HR table, PA0001 so that they can display sales employee code and name in the customer master data.
    From the story above I've tried to do some ways, such as:
    Changed display options from ALV to Drilldown -> with this way, sales employee description can appear from the report, but actually I just need the ALV report because of my client didn't accept the report layout except ALV. This is my big problem.
       2.  I found other threads with similar problem with me, then I tried to follow that instructions that will be described below:
    I tried to create new char WW100 with PARVW table for sales employee then follow these steps:
    Create 2 derivation rules in KEDR  using table look up (table VBPA) for the same partner function
    1. In one Der Rule, make the sale order item KDPOS as constant value 0000
    2. In the other one, dont make it a constant....Leave it as it is
    DERIVATION RULE 1
    SOURCE FIELDS
    VBPA-VBELN = COPA-KAUFN
    VBPA-POSNR = COPA-KDPOS
    VBPA-PARVW = GLOBAL-USERTEMP1 (Click on Magnifying lens.. Specify Constant = Your SD Part Function)
    TARGET FIELDS
    VBPA-KUNNR = COPA-WW100
    DERIVATION RULE 2
    SOURCE FIELDS
    VBPA-VBELN = COPA-KAUFN
    VBPA-POSNR = COPA-KDPOS  (Click on Magnifying lens.. Specify Constant = 0000)
    VBPA-PARVW = GLOBAL-USERTEMP1 (Click on Magnifying lens.. Specify Constant = Your SD Part Function)
    TARGET FIELDS
    VBPA-KUNNR = COPA-WW100
    Unfortunately the ways above still can't solve my problem, the report still only show the sales employee code without description. At the last whether possible if i want sales employee characteristic with origin table coming from PA0001, so that data will derive from HR table? or perhaps any other solution to solve my case?
    Please suggest me in detail..
    Thanks a lot
    Regards,
    Maradona

    Hi Maradona,
    I want a clarification - Does the value flow properly to the value field and only the description is not coming?
    1. If the value flow is proper and only description is a problem, then check whether compunding has been used in KEA5 for the characteristc WW100? If yes, check the text table for WW100 and compare it with the origin table in terms of the fields in both the tables.
    (My guess is that not all the compunding characteristics are available in text table)
    2. If value flow is a problem, then compare SE16 and SE16N for any sales order for the denotion of partner function field PARVW. Sometimes the denotion of partner function (two character code) may vary in SE16 and SE16n.
    Get back for any more query
    BR
    Abhi

  • Block return sales orders or credit notes?

    Hi,
    Could someone please explain how I block return sales orders or credit notes?
    Also is there a way of searching which sales order documet types have been used for credit notes?
    Thanks

    Hi Friend,
    The billing block is comming from the tx. VOV8 -> choose the Order type  -> billing
    block -> you could set billing block here.
    In Shipping column, there is also a field Delivery block where you could set delivery
    block for the order type.
    Or you could also set delivery block and billing block manually when you create the order.
    You could check order type which is used as return or credit memo request by following way:
    SE16 -> TVAK -> use selection criteria VBTYP = H and K
    H  Returns
    K  Credit memo request
    Then excecute, you could get the order type you want.
    Best regards,
    Alex

  • My appstore app shows an update available for CodeBox, which I did not buy, does anyone know what the problem could be? I don't think I have been hacked (no money subtracted, etc.)

    Hi all,
    For some time now, my appstore app shows an update available for CodeBox, which I did not buy. When I try to update it it asks for my ID and password (all normal), but then it gives an Unknown Error.
    I am 100% sure I didn't buy the app, I do not see any transaction on my card or in the appstore apart of this one, so does not seem to be a hack.
    Does anyone know what is happening, this is a tricky thing which is making me lose trust in the payment/account system that Apple is using.
    Thanks!
    Isidro

    well... actually you are right dahveed, i had a dodgy copy of galaxy on fire 2 (boring game), that's what was giving me the issue. i followed your posts about the MAS etc., and discovered this was the problem. Corrected. You're a knowledgable man, thank you

  • Sales employee related data not flowing in standard report MCTI and VF05

    Dear All
    I have created a partner function sales employee by coping VE.All assignments in partner determination done.After maintaining sales employee in customer master it is flowing to sales order.After processing invoice when i check the standard report MCTI and in VF05 under partner function tab,.the data is not flowing.I checked in the OVRP setting are there.
    Please guide.
    Regards,
    Deepti

    Hi,
    Are you updated it as daily in OMO1
    double click on infostructure S006 and select daily and see
    Kapil

  • Bapi for VF01 of internal credit note IG

    Hi,
    i'm looking for a bapi/function module that does the same thing as transaction VF01 with :
    billing type : IG (internal credit note)
    document from : an invoice.
    I know the the bapi's for creating an billing doc from a sales order, but can ik use this one also for the creation of a credit note from an invoice.
    regards,
    Hans

    Check this sample code of creating the billing document using the bapi BAPI_BILLINGDOC_CREATEMULTIPLE.
    DATA: t_success TYPE STANDARD TABLE OF bapivbrksuccess WITH HEADER LINE.
    DATA: t_billing TYPE STANDARD TABLE OF bapivbrk WITH HEADER LINE.
    DATA: t_return TYPE STANDARD TABLE OF bapireturn1 WITH HEADER LINE.
    t_billing-salesorg = vbak-vkorg.
    t_billing-DISTR_CHAN = vbak-vtweg.
    t_billing-DIVISION = vbak-spart.
    t_billing-DOC_TYPE = vbak-auart.
    t_billing-ref_doc = vbak-vbeln.
    t_billing-ref_item = vbap-posnr.
    t_billing-doc_number = vbak-vbeln.
    t_billing-ITM_NUMBER = vbap-posnr.
    t_billing-ordbilltyp = 'BILLING TYPE'.
    t_billing-price_date = sy-datum.
    t_billing-ref_doc_ca = vbak-vbtyp.
    t_billing-sold_to = vbak-kunnr.
    t_billing-material = vbap-matnr.
    t_billing-plant = vbap-werks.
    APPEND t_billing.
    CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
    TABLES
    billingdatain = t_billing
    return = t_return
    success = t_success.
    commit work.

  • Crystal Reports layout for AP/AR Invoice, Credit Note

    Hi
    I am currently designing layouts for AP and AR procedures.
    The Quotations, Orders and Goods Receipt PPO's all work fine using the Dockey@ parameter but neither the purchasing invoice and credit notes or the sales credit notes seem to connect at all during the design stage.
    Do i need to set a new/different parameter for these particular layouts or am I doing anything else wrong?
    Regards
    Peter

    I am using version 8.8 SP.00 PL.10
    It is very strange that I cannot get the layout connected to the database as I have followed the same steps for all layouts. It all works fine until I get to the invoice stage and then I cannot make the connection.
    (I dont need to worry about the sales invoice as this was provided at installation point by our vendor)

  • Report for monthly pay components for the employees

    Hai Group
    I want a report for all the employees monthly  total wage and each individual components like basic, hra, medical, special allow etc, and also for deductions like pf, esi, pt, tax, etc.
    Is standard report available or we need to go for a development for this?
    Plz let me know incase the standard report available, where and is it possible to download to an excel file?
    thank you

    Hi Friend
    In Wage type reporter screen, you can find a place called OTHER SECTIONS, next to that you can see the wage type column and down below you can find a place for object selection.  Click on object section, you have find the personnel number in u2018Available objectsu201D move that to u2018Objects Selectedu2019  and try executing the report.  Save this as a variant so that every time you donu2019t need to select the personnel number.
    Hope this will solve your problem.
    Regards
    Santhosh.S

  • HT1725 My credit card is attached to my permanent US address but I am connected to the French Apple store.  My IPad shows the Us flag for the location but will not update my app bought in the US Store how do I change stores

    My iTunes IPad app bought in the Us Apple Store online will not download the update for HayDay.  It gives me a message that the app was not bought in the French store.  How do I change to the US Apple store to resume updates to my application HayDay.?

    Click here and follow the instructions to change the iTunes Store country.
    (85459)

  • I added a stock quote to my Chrome and now all the tabs show a live quote for Google rather than Calendar, Notes etc..How do I remove it?

    How do I remove the live stock quote from the tabs on my iCloud features. I had downloaded a stock feature but now all my tabs show Google's stock price rather than Note, Calendar etc.

    Hey -
    I need to do the EXACT same thing, but have no idea how. Has anyone out there done this?
    My situation is a tad different..this is a new Mac (and I'm a brand new Mac user). Tons of querks occur under my original account (videos won't run, Safari won't support certain plug-ins). I spent 6 hours on the phone w/ 4 different Apple Reps and nobody could fix it. A rep finally looked at my MacBook Pro in person today. He created a new account just to see if that would work and under that new account, everything works perfectly fine (no querks, can view video). He tried switching a million settings in my original account to no avail.
    He said to create a new account (as he did) and move my files over to the new account and then go back to the original and delete it. How do you do this?! I can't figure it out! I've got a new account created, but of course it just has the default folders in it w/ the little red icons next to them! Thanks in advance!

  • Monthly Sales By Sales Employee

    Hello All!
    Is there any report that shows Monthly sales by Sales Rep.  So basically, consolidating all invoices for a rep by month. The headers would look like this:
    Sales Rep...Jan...Feb...March...April...etc. Total
    Thanks!
    Mike

    Hello Mike,
    Please check the Sales Module > Sales reports > Sales Analysis > by Sales Employee tab.
    You can select the Annual, Monthly, Qterly Report from the various options in the Selection creteria window.
    Hope it solves the issue you are looking for.
    Regards,
    Jitin Chawla

  • More than one Sales employee

    Dear All,
    i am sales employee functionality. i created partner function P1 by copying the standard function PE. i created two sales emplyees and assigned in customer master dat with partner function PE&P1.
    i rasied the sales order& invoice , there i am getting the these partner functions.
    but when i am going to MCTI (Sales analysis of sales employees ), i am getting only PE partner function revenues. i am not getting the P1 partner function report.
    pealse help me out on above functionality.
    Thanks in advance.
    Regrds,
    Shekar

    Why use 2 different partner functions to identify two different sales employees? Why not just add both as partner type PE?
    You may need to check that PE is not setr to "Unique" (limited to only 1) in IMG: Sales and Distribution > Basic Functions > Partner Determination > Set Up Partner Determination >>Set Up Partner Determination for Customer Master >>>Partner Functions
    By identifying them both as PE, they will both show up in the Sales Analysis report.

  • Hi friends do the need ful regarding sales employee incustomer master

    while creating customer master am getting partner has not been created.
    please please give me the solution.
    because.  I want to include sales employee in customer master.  How can i do that i used account group standard for the 0007 to create  sales employee.  With using xd01 i created  sales employee  like 9 number.  When am going to assign in customer master xd01, it showing that sales employee has not been created.
    so please do the need ful

    Hi Friend,
    Let me throw some light on this.
    First and foremost thing is How does you create sales employee? If you wants to create sales employee, you must used tcode VPE1 but not XD01.
    Ple follow the steps as given...........
    First create a account group for sold to party having all partner function assign i.e. SP, SH, BP,PY & SE (sales employee)
    Then create customer master data using same account group.
    Create sales representative using t code VPE1. Assign this sales representative number to customer master data under partner functions as SE & save it.
    Hope you would get solution.
    <b><REMOVED BY MODERATOR></b>
    Thanks
    Shiv

Maybe you are looking for

  • Best solution for Windows gaming in OS X environment

    Hello! What would be the best solution to play Windows games in OX X environment - Parallels or VMWare?  (iMac 2012) I do know that is would be best for performace just to make a separate installation of Windows via BootCamp, but I need to run Window

  • System Refresh of GRC 5.3 system

    Hi Gurus, Our client has putforth a requirement of refreshing the GRC 5.3 development system in our landscape with the data of GRC 5.3 production system. I could find document for Homogeneous System Copy for standalone Java engines in Service Marketp

  • My screen is flashing and the phone wont work

    at first there was just vertical colored stipes, we were able to force the phone to turn off and  now the screen just strobes

  • No Audio in AE CS5

    I am inporting a AVCHD 1080p 30fps file into AE CS5 and I can not get the sound tracks to play/import, what am I doing wrong?

  • TMS help needed!

    Hi all, I need a good installation guide for configuring the transport management system for Solution manager 4.0 I appreciate the help. Thanks, Karim