Sales Person Commission Payout Report

Good Day Mentors,
I am currently working on a report that ought to compute for Sales Agent commission.
Sources for gross sales computation is A/R Invoice(OINV) and A/R Credit Memo (ORIN).
Client also wants to exclude the VAT from the computation of gross sales as well as all credit memos issued for a specific period in which the commission of the agent will be based on.
DocTotal in both OINV and ORIN already have the VAT(VatSumSy) included in them upon commit into the databse. So i subtracted it from the DocTotal. The formula I came up with
OINV.DocTotal - OINV.VatSumSy -  ORIN.DocTotal - ORIN.VatSumSy
Now, the main source of the problem is the part in which the report ought to have a date range facility. Since the commissions for the sales people will be computed every month.
Edited by: Sean Yu on Apr 4, 2009 9:46 AM

I am now trying to incorporate both queries into  a single one.
Current code
/*SELECT FROM [dbo].[OINV] T1*/
declare @fromdate as datetime
   /* WHERE */
set @fromdate=   /* T1.[DocDate] */
              '[%0]'
   /*SELECT FROM dbo.OINV T3*/
declare @tilldate as datetime
   /* WHERE */
set @tilldate=   /* T1.[DocDate] */
              '[%1]'
SELECT T0.[ChannlBP] 'Upline Code',
       (SELECT CardName
       FROM   OCRD
       WHERE  CardCode = T0.CHannlBP) 'Upline Name',
       T0.[CardCode] 'Downline Code',
       T0.[CardName] 'Downline Name',
       SUM (T1.[DocTotal]) - SUM (T1.VatSumSy) - SUM (T2.[DocTotal]) - SUM (T2.VatSumSy)  'GrossSales',
       Rate = CASE WHEN ( (SUM (T1.[DocTotal]) - SUM (T1.VatSumSy) - SUM (T2.[DocTotal]) - SUM (T2.VatSumSy) ) <= 10000) THEN .03 WHEN ((SUM (T1.[DocTotal]) - SUM (T1.VatSumSy) - SUM (T2.[DocTotal]) - SUM (T2.VatSumSy) ) > 10000
       AND (SUM (T1.[DocTotal]) - SUM (T1.VatSumSy) - SUM (T2.[DocTotal]) - SUM (T2.VatSumSy) ) <= 49999) THEN .025 WHEN ((SUM (T1.[DocTotal]) - SUM (T1.VatSumSy) - SUM (T2.[DocTotal]) - SUM (T2.VatSumSy) ) > 50000
       AND (SUM (T1.[DocTotal]) - SUM (T1.VatSumSy) - SUM (T2.[DocTotal]) - SUM (T2.VatSumSy) ) <= 149999) THEN .02 WHEN ( (SUM (T1.[DocTotal]) - SUM (T1.VatSumSy) - SUM (T2.[DocTotal]) - SUM (T2.VatSumSy) ) > 150000) THEN .015 ELSE 0 END,
       (SUM (T1.[DocTotal]) - SUM (T1.VatSumSy) - SUM (T2.[DocTotal]) - SUM (T2.VatSumSy) ) * (CASE WHEN ( (SUM (T1.[DocTotal]) - SUM (T1.VatSumSy) - SUM (T2.[DocTotal]) - SUM (T2.VatSumSy) ) <= 10000) THEN .03 WHEN ((SUM (T1.[DocTotal]) - SUM (T1.VatSumSy) - SUM (T2.[DocTotal]) - SUM (T2.VatSumSy) ) > 10000
       AND (SUM (T1.[DocTotal]) - SUM (T1.VatSumSy) - SUM (T2.[DocTotal]) - SUM (T2.VatSumSy) ) <= 49999) THEN .025 WHEN ((SUM (T1.[DocTotal]) - SUM (T1.VatSumSy) - SUM (T2.[DocTotal]) - SUM (T2.VatSumSy) ) > 50000
       AND (SUM (T1.[DocTotal]) - SUM (T1.VatSumSy) - SUM (T2.[DocTotal]) - SUM (T2.VatSumSy) ) <= 149999) THEN .02 WHEN ( (SUM (T1.[DocTotal]) - SUM (T1.VatSumSy) - SUM (T2.[DocTotal]) - SUM (T2.VatSumSy) ) > 150000) THEN .015 ELSE 0 END) 'Commission'
FROM   OCRD T0 INNER JOIN OINV T1 ON T0.CardCode = T1.CardCode INNER JOIN ORIN T2 ON T1.CardCode = T2.CardCode
WHERE  T1.[DocDate] >= @fromdate
       AND T1.[DocDate] <= @tilldate
       AND T2.[DocDate] >= @fromdate
       AND T2.[DocDate] <= @tilldate
       AND T0.[ChannlBP] IS NOT NULL
       AND T0.[frozenFor] LIKE '%N'
       OR T0.[validFor] LIKE '%Y' GROUP BY T0.[ChannlBP], T0.[CardCode], T0.[CardName]
The query should be able to show all of the Sales people who have Credit Memos issues to them as well as Sales people who don;t have Cm's issued to them.
But what I am currently getting from my query above are the people who only have CM's issued to them. I am unable to get the sales people who don't have CM's  in ORIN table for the specified date range, but of course have records in OINV table.
Did I link the tables incorrectly?
Also, the commission rate is also being computed in this query using CASE function as you can see from the code above. Which makes the query complex and very rigid. Is there also a good way of handling the commission rate? I am also thinking that in the future, client might change the commission rate. Be it increase the ranges or change the rate for each range. Is there a good way of handling that other than an AddOn? Since currently everything is hardcoded in the query.
Thanks in advance for everyone's time,
Sean

Similar Messages

  • Sales Person Commission Report

    What will be a query  to do a sales person commission report which includes Credit Memos?

    Hi Max, welcome to forums.
    Check this thread and see if it helps - Re: Commission Query
    Re: Commission Report
    Credit Memo query
    There are plenty of commission related query threads. You can mix and match to get a result most suitable to you.

  • Sales person commission based on sales revenue on material group-report

    Dear Experts,
    My client want to charge and calculate Sales person commission based on sale revenue on material group.
    lets say -sales person 'A' did sales during the month 5lakh on material group1 and 10 lakh material group2 .
    then i will give commission 5% on less than 6 lakh and 10% on more than 9 lakh sales revenue.
    so total commisssion they will book 125000(25000+100000) on GL .
    They want this information from CO so they they can book amount in FI and after that need to charge from COPA based on above logic..
    request you to guide me on the above.
    regards
    RR

    Hi ajay,
    I need Sales revenue ,sales person and material group information.
    will i get all this information from VBAP/VBRP table?.
    I will transfer sales revenue,material group and sales person to copa at the time of billing.
    Shall i use copa or VBAP/VBRP table in order to fetch information and based on information.I will calculate and post FI JV from FI to COPA.
    Guide me.
    regards
    RR

  • Sales Person Commission

    Hi,
    How to calculate sales person commision in order management.
    My client wants to give sepearate sales person commission on each type of sales category like Deal, special Deal, Nett orders commission differs like 2%, 5%, 3%.
    If we want to pull up sales orders by sales person, system should give the commision to be paid to sales person, if we give percentgage in parameters.
    Is there any standard report to achieve the sales person commission report in standard system or any work around solution to achieve this?
    please advise the how to achieve this in Order management.
    thanks
    Satti

    Hi,
    How to calculate sales person commision in order management.
    My client wants to give sepearate sales person commission on each type of sales category like Deal, special Deal, Nett orders commission differs like 2%, 5%, 3%.
    If we want to pull up sales orders by sales person, system should give the commision to be paid to sales person, if we give percentgage in parameters.
    Is there any standard report to achieve the sales person commission report in standard system or any work around solution to achieve this?
    please advise the how to achieve this in Order management.
    thanks
    Satti

  • How Configure Royalty/Sales Person Commission

    Hi,
           I am new to SAP.Can any body tell me "How to Configure Royalty/Sales Person Commission" in pricing?
    Thanks in advance.
    Chandra
    Edited by: Chandra BA on Aug 3, 2008 12:36 AM

    Dear Sudhir,
    Please refer to my Post in thread:
    [Sales Employee|Re: Sales Employee]
    Best Regards,
    Amit

  • Sales Person and Sales Commission without HR Module

    Hi,
    Can anyone explain me the customisation and process for sales person commission.
    Mahi

    Use T code <b>VPE1</b>. and create . hiring event.. mini
    master... create sales representatives
    Sales employee without HR
    <b>For Commission </b>
    1) Establish Partner Functions for the Commissionee(s)
    Menu Path: TOOLS ->; BUSINESS ENGINEER ->; CUSTOMIZING ->; SALES AND DISTRIBUTION ->; BASIC FUNCTIONS ->; PARTNER DETERMINATION ->; DEFINE PARTNER FUNCTIONS
    Transaction Code: VOPA
    2) Assign the Partner Functions to Partner Procedures
    Menu Path: TOOLS ->; BUSINESS ENGINEER ->; CUSTOMIZING ->; SALES AND DISTRIBUTION ->; BASIC FUNCTIONS ->; PARTNER DETERMINATION ->; DEFINE PARTNER FUNCTIONS
    Transaction Code: VOPA
    3) Create a Partner Procedure for the Commissionees
    Menu Path: TOOLS ->; BUSINESS ENGINEER ->; CUSTOMIZING ->; SALES AND DISTRIBUTION ->; BASIC FUNCTIONS ->; PARTNER DETERMINATION ->; DEFINE PARTNER FUNCTIONS
    Transaction Code: VOPA
    4) Create New Customer Account Group(s) for Commission Agents
    Menu Path: TOOLS ->; BUSINESS ENGINEER ->; CUSTOMIZING ->; LOGISTICS GENERAL ->; LOGISTICS BASIC DATA: BUSINESS PARTNERS ->; CUSTOMERS ->; CONTROL ->; DEFINE ACCOUNT GROUPS AND FIELD SELECTION FOR CUSTOMER
    Transaction Code: OVT0
    5) Assign the Partner Functions to the Customer Account Group(s)
    Menu Path: TOOLS ->; BUSINESS ENGINEER ->; CUSTOMIZING ->; SALES AND DISTRIBUTION ->; BASIC FUNCTIONS ->; PARTNER DETERMINATION ->; DEFINE PARTNER FUNCTIONS ->; GOTO ->; PARTNER FUNCTIONS ->; ENVIRONMENT ->; ACCOUNT GROUP ASSIGNMENT
    Transaction Code: VOPA
    6) Assign the Partner Functions to the Partner Procedure for the Sales Document Header
    Menu Path: Tools ->; Business Engineer ->; Customizing ->; Sales and Distribution ->; Basic Functions ->; Partner Determination ->; Define Partner Functions
    Transaction Code: VOPA
    7) Assign the Partner Functions to the Partner Procedure for the Sales Document Item (OPTIONAL)
    Menu Path: TOOLS ->; BUSINESS ENGINEER ->; CUSTOMIZING ->; SALES AND DISTRIBUTION ->; BASIC FUNCTIONS ->; PARTNER DETERMINATION ->; DEFINE PARTNER FUNCTIONS
    Transaction Code: VOPA
    8) Edit the Pricing Communication Structure (KOMKAZ) to Hold the New Functions (Client Independent)
    Menu Path: Menu Path: TOOLS ->; ABAP WORKBENCH ->; DEVELOPMENT ->; DICTIONARY
    Transaction Code: SE11
    9) Edit MV45AFZZ – userexit_pricing_prepare_tkomk (Client Independent)
    Menu Path: TOOLS ->; ABAP WORKBENCH ->; DEVELOPMENT ->; ABAP EDITOR
    Transaction Code: SE38
    10) Edit RV60AFZZ - userexit_pricing_prepare_tkomk (Client Independent)
    Menu Path: TOOLS ->; ABAP WORKBENCH ->; DEVELOPMENT ->; ABAP EDITOR
    Transaction Code: SE38
    11) Edit MV45AFZB - userexit_new_pricing_vbkd changing new_pricing (Client Independent)
    Menu Path: TOOLS ->; ABAP WORKBENCH ->; DEVELOPMENT ->; ABAP EDITOR
    Transaction Code: SE38
    The following code should be inserted into program MV45AFZZ to allow the system to re-execute pricing if the user makes a change to the relevant partner function (alteration, addition, deletion).
    13) Add the KOMKAZ Fields to the Pricing Field Catalog (Client Independent)
    Menu Path: TOOLS ->; BUSINESS ENGINEER ->; CUSTOMIZING ->; SALES AND DISTRIBUTION ->; BASIC FUNCTIONS ->; PRICING ->; PRICING CONTROL ->; DEFINE ACCESS SEQUENCES ->; MAINTAIN ACCESS SEQUENCES
    Transaction Code: OV24
    14) Create Condition Tables (Client Independent)
    Menu Path: TOOLS ->; BUSINESS ENGINEER ->; CUSTOMIZING ->; SALES AND DISTRIBUTION ->; BASIC FUNCTIONS ->; PRICING ->; PRICING CONTROL ->; DEFINE ACCESS SEQUENCES ->; MAINTAIN ACCESS SEQUENCES
    Transaction Code: V/03
    15) Create an access sequence containing the new tables (Client Independent)
    Menu Path: TOOLS ->; BUSINESS ENGINEER ->; CUSTOMIZING ->; SALES AND DISTRIBUTION ->; BASIC FUNCTIONS ->; PRICING ->; PRICING CONTROL ->; DEFINE ACCESS SEQUENCES ->; MAINTAIN ACCESS SEQUENCES
    Transaction Code: V/07
    16) Create a new condition type
    Menu Path: TOOLS ->; BUSINESS ENGINEER ->; CUSTOMIZING ->; SALES AND DISTRIBUTION ->; BASIC FUNCTIONS ->; PRICING ->; PRICING CONTROL ->; DEFINE CONDITION TYPES ->; MAINTAIN CONDITION TYPES
    Transaction Code: V/06
    17) Add the Condition Type to the Pricing Procedure
    Menu Path: TOOLS ->; BUSINESS ENGINEER ->; CUSTOMIZING ->; SALES AND DISTRIBUTION ->; BASIC FUNCTIONS ->; PRICING ->; PRICING CONTROL ->; DEFINE AND ASSIGN PRICING PROCEDURES ->; MAINTAIN PRICING PROCEDURES
    Transaction Code: V/08
    11) Create Commsission Report ZZCOMMISSION (Client Independent)
    Menu Path: TOOLS ->; ABAP WORKBENCH ->; DEVELOPMENT ->; ABAP EDITOR
    Transaction Code: SE38
    Message was edited by:
            SHESAGIRI.G
    Message was edited by:
            SHESAGIRI.G

  • Report to display activities of individal sales persons

    Hi Experts,
    My requirement is to display the list all activities of individal sales persons that has been made in the CRM system.
    This report is to be used by the sales manager to review the all notes that have been made in the CRM system by each individual sales person.
    The selection screen parameters has :
      BP Type of Employee Responsible -
      Employee (Mandatory)
    Created Date (Mandatory)
    Please let me know the FMs or tables to look into.
    Please let me know how to go about it.
    Regards,
    Sangeeta.

    Hello Sangeeta,
    You need to write a small report/program which queries CRM table CRMD_ORDERADM_H for activities.
    You can use  field OBJECT_TYPE =   'BUS2000125'    (task) and  'BUS2000126'  (Business Activity),
    which covers all CRM Online activities of all types.
    You can additionally use fields CREATED_BY (or/and CHANGED_BY) to list down the activities
    created /changed by that user.
    So a simple select query will solve your purpose.
    Hope this helps!
    Thanks and Best Regards,
    Shanthala Kudva.

  • Sales Representative Commission Report

    Hi,
    Is there any standard report for Sales Representative Commission Report for Professional services.
    regards
    ravi

    to my knowledge there is no standard report as such....u need to gather the requirements and develop a new report in SE38.

  • Sales person in the service call report

    Hello
    I am using PLD to make a new layout for the service call report. I would like to add a column with the sales person of the customer. I have already added the field from the table, but i just get a blank column.
    Does anyone know how I can do it?
    Thanks
    Jacobo

    Hi Jacobo,
    We cannot select the OSLP table in the list of tables available without using Alt+click. Please reconfirm if you have used this. Since OSLP is not available, you cannot include the Sales Employee column in the report.
    One workaround is to set the sales employee name in one of the unused fields on the Service call form (like problem type, call type etc). Just rename and define the sales employees here as well. You can even use Formatted search to update this field for change in BP code.
    Since this column is already available in the Service call reports, you can easily rename the columns and use the reports as-is without much customisation on PLD.
    Hope this helps.
    Regards,
    Hamsa

  • Is there a standard report for calculation commision for the sales person?

    is there a standard report for calculating commision for the sales person?

    Hi Stephen,
    Use standard tcode IW39.
    In IW39 in section General Data / Administrative Data the is a check box "incl. object list" just tick that box and then give your required input parameters and u can get actual cost and planned cost both equipment wise (provided your input is equipment).

  • Sales Employee wise comission report

    Hi all
    please guide me how to get the report of sales employee commission
    after setting nth initial setting related to Commission group & comission
    how i can view the report
    samir

    Samir,
    If you go to Query manager..Under System Reports you can see it
    SP Commission by Invoices in Posting Date Cross-Section
    Suda

  • Sales person targets

    can you please let me know is there any provision of inserting Sales person target so as to get reports of Target VS Actuals and other reports
    thanks
    srinivasan

    Dear Friend,
    If you want to assign a sales person to a customer master records,
    It can be done via partners .
    go to sales and dis tab in customer masters and in the partner function put PE  and then put the sales person's personnel number in the next column and save the same.
    now there are several satandard reports availabe sales person wise report where you can display number of customers their sales revenue with the personnel number of the sale semployee.
    reward points if helpful.
    regards,
    Amlan

  • Sundry debtors ageing Anmalysis with Sales person responsible

    Dear SAP Guru's,
    Please help me out with This .--->
    How to Configure the reports :
    Sundry debtors ageing Analysis with Sales person responsible:
    Is there any Standard reports available ?
    If Not Please tell me the procedure.
    Thanks in Advance
    regards,
    Amlan Sarkar

    Dear Friend,
    Thanks for your reply
    No Standard report exists as Such ?
    Is this related to CRM in any way?
    regards,
    Amlan Sarkar

  • Sales employee commission

    Hi All,
    how to calculate the sales employee comsission based ont he sales done hy him.
    regards
    Sunil

    Hi
    First of all you need to capture the sales employee name in the sales order.
    You can do this through creating the Sales Person with transaction PA30/20/40
    add the same sales employee in sales order.
    You can extract the report based on the sales employee and sales and pay them.
    If your company does have HR module impletemed , you can capture the sales employee name in the additional fields provided in the sales order.
    regards

  • Vendor Master- Sales person

    Hi Experts ,
    Our client has multiple contact person (Sales person) on the vendor side . Is there any possiblity to capture multiple sales persons in vendor master and later use it for reporting purpose.
    Your advise and comments will be appreciated.
    Regards
    Albert.

    Hi,
    You can get this functionality by creating the new Z account group for ex Contact person which will be similar like account group VERT. so create a Z account group and add this as a partner function to your main vendor group. this will help you to create as many contact person for this main vendor.
    at the time of creating PO the system pops up the partner function window to select your correct contact person.
    hope this helps

Maybe you are looking for

  • My file no longer works... any ideas/help?

    I'm pretty new to FC and am doing this project for class (I'm a Media Arts student at the University of Montana). I completely finished the project and when I went to save FC crashed, now FC crashes everytime I open the file. I'll attach if anyone wa

  • What files to copy to backup?

    what files should I copy to make daily bacckups? the same would be warm, because the idea is to have a quick restore point to problems. All this will be done on a Linux platform with Siebel 8.1

  • How do I get past the iTunes Store registration?

    At this time I do not want to register for the iTune Store. However, when I connect my iPod Nano I can't get past the Store requirements for registration. I have already registered my iPod. Pressing "Not now" and "Skip this step" are ignored. I just

  • Session in-memory replication problem

    Hi,           I am running into some cluster HttpSession replication problems. Here is           the scenario where replication fails (all servers mentioned here are a           part of a cluster).           1a - 2 Weblogic servers (A&B) are running

  • How to measure an Area in Analysis Photoshop cc-14?

    How to measure an Area in Analysis Photoshop cc-14? PS's online help only mentions to use the Ruler to measure a straight. The are many of capabilities, but I cannot figure it out. I have searched all of Photoshop's tutorials, but Help is the best. A