10 customer and 10 employed sales

Hi experts,
I would like sorting
1. consumer sales and
2. employed sales
only for the 10 best every day how to make a query,
because the existing Query Engadget incompatible with the existing results on the sales analysis
SELECT top 10 T0.Cardcode,max(T0.CardName) as 'Customer',Sum(T0.doctotal) as 'Total Shopping' from dbo.ORDR T0
WHERE Month(T0.DocDate) = Month(GetDate()) AND Year(T0.DocDate) = Year(GetDate())
Group by T0.Cardcode
Order by Sum(T0.doctotal) desc
Thanks

Hello.. Good Morning Expert
Gordun thank you for answering my question
Your query has been working but goordun .. sorry, I mean really that there are 2 questions ..
A) Customer
B)  Salesman..
so get 2 Query
A) Customer
SELECT top 10 T0.Cardcode,max(T0.CardName) as 'Customer',Sum(T0.doctotal) as 'Total Shopping' from dbo.ORDR T0
WHERE Month(T0.DocDate) = Month(GetDate()) AND Year(T0.DocDate) = Year(GetDate())
Group by T0.Cardcode
Order by Sum(T0.doctotal) desc
B)  Salesman
SELECT top 10 T0.Cardcode,max(T0.CardName) as 'Customer',Sum(T0.doctotal) as 'Total Shopping' from dbo.ORDR T0
WHERE Month(T0.DocDate) = Month(GetDate()) AND Year(T0.DocDate) = Year(GetDate())
Group by T0.Cardcode
Order by Sum(T0.doctotal) desc
I want to get the updates ..
example ...
I execute the date 10 years 9 months 2009
will display like this
A)
Customer/ vendor code || customer || Total day|| DAY || shoping this month || ToTal Shopping
123456 || LILA || 31 || 9 || 4,291,050.00|| 5,844,472,759.15
B)
Salesman  || Totalday || DAY || Shopping this month || ToTal Shopping
mercy || 31 || 9 || 7,020,392.00 || 194,243,452.00
thx...

Similar Messages

  • Customer and month wise sales

    Dear All
        Which Table Stored Customer and month wise sales values?
    Thanks and Regards
    Suresh

    Hi
    Table VBRK Will help you.
    Assign points if you find the solution with this
    Regards

  • "Copy Control" for different customer and also different sales area

    Hi, expert.
               I would like to copy sales order from one to the others. However, I would like to change only "Partner Information and its sales area". For "Item Data", I would like to keep it same as original document.  <b>For example</b>,
    Sales Order1:  Customer ID = "1111111" and Sales area = "1000/10/10". 
    I would like to copy to Sales Order2:
    Sales Order2:  Customer ID = "1111112" and Sales area = "2000/20/20".
    <u>P.S</u> "Sales Organization 1000 assigned to company code 1000. And Sales Organization 2000 assigned to company code 2000"
    I have tried to do combination between different "Data transfer routines and Copy requirements". However, I am still not get my solution
    Everyone please share idea.
    Thank you,

    Dear John,
          Actually, I have tried with copy requirement 2.However, it works for copying a different customer with the same sales area as original. Yes, I may need to ask developer to solve my solution. But I would like to keep it to be the last choice. I tried to search "How to copy document between inter-company businees"; but the I still not get what my custome's want.  Anyways, thank you very much for sharing idea.

  • Extending Customer and Materials to Sales Area

    Hi,
    I want to extend multiple materials and customers to my Sales Area,so for this is there any mass transaction is available in SAP except LSMW ?
    Lalit

    hi lalit,
    in SHDB you choose to record the BDC jus like in LSMW. here it wud be mm01 and xd01. then with the help of your abaper you can make changes like defining frields as constants and all. the abaper will create a t-code and will alos provide the format in which the data will go to the text file.
    saurabh

  • How to get all open sales orders of a customer and also account group

    I want to know the logic to find all open sales orders of a customer and also account group

    Hi,
    You can check the status weather a Sales order is Open or not by checking its billing status form the following:
    Check table VBUK and VBUP for delivery status "LFSTK" and billing status "FKSTK".
    Rward points if helpful answer.
    Ashven

  • Wht r the standard tables for vendor customer and sales order report/

    Hi wht r the standard tables for vendor and customer reports and is how in normal we cannot use them for vendor reporting and etc ?

    Hi
    Customer is related to Sales Module
    So for a customer we fetch the reports of Sales orders , Deliveries and Billing doc's
    CUstomer and Vendor related tables with important fields:
    KNA1: Customer Master-General(KUNNR,NAME1,LAND1)
    KNB1: Customer Master(Company Code)(KUNNR,BUKRS,PERNR)
    KNC1: Customer Master Data (Transaction Figures)(KUNNR,BUKRS,GJAHR)
    KNVK: Customer Master Contact Partner(PARNR,KUNNR,NAME1)
    KNVV: Customer Master sales data(KUNNR,VKORG,VTWEG,KDGRP)
    KNBK: Customer Bank Details(KUNNR,BANKS,BANKL,BANKN)
    KNVH: Customer Hierarchy (HITYP,KUNNR,VKORG,VTWEG,SPART)
    KNVP: Customer Master Partner Functions(KUNNR,PARVW,KUNN2)
    KNVS: Customer Shipment data(KUNNR,VSTEL,TRANS)
    KNVI: Customer Tax data(KUNNR,ALAND,TATYP)
    LFA1: Vendor Master-General (LIFNR,NAME1,ORT01)
    LFB1: Vendor Master(Company Code)(LIFNR,BUKRS,PERNR)
    LFC1: Vendor Master (Transaction Figures)(LIFNR,BUKRS,GJAHR)
    Sales related Tables for a customer
    VBAK: Sales Document(Header Data) (VBELN, KUNNR)
    VBAP: Sales Document(Item Data) (VBELN,POSNR,MATNR,ARKTX,CHARG)
          Enquiry, Quotation, Sales Order are differentiated based on Doc.
          Type(VBTYP field) in VBAK,VBAP Tables( for Enquiry VBTYP = A,
          for Quotation 'B' & for Order it is 'C'.)
    LIKP: Delivery Table (Header Data)(VBELN,LFART,KUNNR,WADAT,INCO1)
    LIPS: Delivery Table (Item Data)(VBELN,POSNR,WERKS,LGORT,MATNR,VGBEL)
          (LIPS-VGBEL = VBAK-VBELN, LIPS-VGPOS = VBAP-POSNR)
    VTTK: Shipment Table (Header Data)(TKNUM)
    VTTP: Shipment Table (Item Data)( TKNUM,TPNUM,VBELN)
          (VTTP-VBELN = LIKP-VBELN)
    VTFA: Shipping Document Flow(TKNUM,VBELV,VBELN)
    VTPA: Shipping Partners data(VBELN,PARVW,KUNNR,PERNR)
    VTTS: Stages in Shipment(TKNUM,TSNUM,TSTYP)
    VTSP: Transport Stage/Shipment Item Allocation(TKNUM,TSNUM,TPNUM)
    VEKP: Handling Unit: Header(Packing)(VENUM,VSTEL)
    VEPO: Handling Unit: Item (Packing)(VENUM,VEPOS,VBELN)
    VBRK: Billing Table(Header Data)(VBELN,FKART,BELNR)
    VBRP: Billing Table(Item Data)(VBELN,POSNR,FKIMG,NETWR,VGBEL,VGPOS)
          (VBRP-AUBEL = VBAK-VBELN, VBRP-VGBEL = LIKP-VBELN)
          Apart from these tables there are lot of other tables which starts with
          ‘V’, but we use the following tables frequently.
    VBUK: All Sales Documents status & Admn. Data(Header)(VBELN,VBTYP)
          VBTYP= ‘C’(Sales Order) VBTYP=’J’(Delivery) VBTYP=’M’(Invoice) 
    VBUP: Sales Documents status & Admn. Data(Item)(VBELN,POSNR)
    VBEP: Sales Doc. Schedule Lines Data(VBELN,POSNR,EDATU,WMENG)
    VBKD: To get sales related Business data like Payment terms etc.(VBELN,ZTERM)
    VBFA: sales document flow data(VBELV,VBELN,POSNV,VBTYP)
    VBPA: Partner functions Data(VBELN,PARVW,KUNNR,LIFNR)
    VEDA: Contract Data(VBELN,VPOSN)
    VEDAPO: Contract Data(VBELN,VPOSN)
    Vendor related MM tables
    EBAN-- Pur.Reqn. Data (BANFN,BNFPO,BADAT,MATNR)
    EBKN-- Purchase Requisition Account Assignment(BANFN,BNFPO,VBELN)
    EINA—- Purchase Info.Record (General Data)(INFNR,MATNR,LIFNR)
    EINE-- Purchase Info.Record (Pur.Orgn Data )(INFNR,EKORG)
    ELBK-- Vendor Evaluation Header Data(LIFNR,EKORG,KLASS)
    EKKO-- Purchase Order Data (Header)(EBELN,BSTYP,BSART)
    EKPO-- Purchase Order Data (Item)(EBELN,EBELP,MATNR)
           RFQ and PO are differentiated by Doc Type(BSTYP)in EKKO table.
           For RFQ it is ‘A’ and for PO it is ‘F’.
    MKPF-- GRN Data (Header) (EBELN,BLDAT,BUDAT,XBLNR,BKTXT)
    MSEG-- GRN Data (Item)(MBLNR,BWART,LIFNR,MATNR,EBELN)
           Apart from this there are lot of tables which begin with 'M'& 'E', but we
           use the following very often.
    EKBE--PO History Data (EBELN,EBELP,BELNR,BLDAT,MATNR,VGABE)
    EKBZ--PO History with delivery Costs(EBELN,BELNR,LIFNR,XBLNR)
    EKET--Schedule lines data of a PO (EBELN,EINDT,SLFDT)
    EKES--Vendor Confirmations Data(EBELN,EBTYP,EINDT,XBLNR)
    Reward points if useful
    Regards
    Anji

  • Table name to find customer and which sales area he belongs to?

    Table name to find customer and which sales area he belongs to?

    Hi suchita,
    You can find these information Sales area he belongs and all in the table of  KNVV , take the customer number from customer master  KNA1-KUNNR  put it in KNVV-KUNNR. you can find all the  sales details.
    if you need more info send breaf requirement.
    if helpful award the points
    Regards
    Ram

  • Problem in Customer and sales Area assingment  for STO

    Hi Gurus,
    I am working on STO cycle , while config. of STO in first step when i assinged customer and sales area to plant in NODE
    "Define Shipping Data for Plants" ,here i can assinged only one customer belongs to only one Sales Area.
    For Eg :- 1000/10/00 is my sales area and customer is 01
       I assinged this to plant SID.
      Now if i want to assinge different sales area for the same customer , Because STO will not ne happened only for one Division , it will transfer goods from many division from a single plant ,So how can assinge more division or more than one sales area to a single plant.
      If through COMMON DIVISION , this problem is resolved please explain ,How means step. Because i want to assinge min 10 sales area to asingle plant means may be have to create common division funada, But how  I m not getting.
    Please Reply ASAP.
    Devdatta Joshi

    Dear Joshi,
                 1.First you do the common divisions and distribution channels through the t.codes VOR1 and VOR2.
    2. You assign common sales area to the suppliying plant which you have difined in the common divisions and distribution channels.
    i.e you maintain one division and one distribution channel as reference to all other divisions and distribution channels.
    3.The purpose of the assigning sales area data to suppliying plant is, we are allowing the system to sale or transferinmg the goods from that suppliying palnt.
    I hope it will help you
    Thanks,
    Murali.

  • Vendor,customer and sales analytics BW related info

    hi experts,
    We are going to give PPT PRESENTATIONS ON VENDOR, CUSTOMER AND SALES ANALYTICS RELATED TO BW.
    Can you plz provide some docs and implementation help regarding those.
    Basically i am BW consultant.
    Plz tell me how Customer analytics, vendor analytics and sales analytics related to me as BW Consultant.
    provide some docs.
    regards
    venuscm
    Edited by: venugopal vadlamudi on Feb 3, 2011 6:58 AM

    Pls reply me

  • IDoc error "customer  and sales area : GR could not be uniquely determined"

    Hi All,
    While posting some IDocs i am getting error customer  and sales area : GR could not be uniquely determined even when entries are available in EDSDC table.
    Please assist.

    Double check your entries. Once I ended up even sending a message to SAP and turned out there was a simple typo in the table.
    Also since you're saying "some IDocs" - check how exactly they are different from those that don't have this error.

  • We are using EBS 12.1.3.  When we input a sales order from a customer we input the sales order and specify the date the customer wants it.  This isn't always the date that we intend on manufacturing it though.  I need to put a customer due date in, but be

    We are using EBS 12.1.3.  When we input a sales order from a customer we input the sales order and specify the date the customer wants it.  This isn't always the date that we intend on manufacturing it though.  I need to put a customer due date in, but be able to put a date in another field that MRP can read in the event we choose to manufacture based on another date.  For example, early.
    Any help would be appreciated.

    What you are experiencing is 100% related to Malware.
    Sometimes a problem with Firefox may be a result of malware installed on your computer, that you may not be aware of.
    You can try these free programs to scan for malware, which work with your existing antivirus software:
    * [http://www.microsoft.com/security/scanner/default.aspx Microsoft Safety Scanner]
    * [http://www.malwarebytes.org/products/malwarebytes_free/ MalwareBytes' Anti-Malware]
    * [http://support.kaspersky.com/faq/?qid=208283363 TDSSKiller - AntiRootkit Utility]
    * [http://www.surfright.nl/en/hitmanpro/ Hitman Pro]
    * [http://www.eset.com/us/online-scanner/ ESET Online Scanner]
    [http://windows.microsoft.com/MSE Microsoft Security Essentials] is a good permanent antivirus for Windows 7/Vista/XP if you don't already have one.
    Further information can be found in the [[Troubleshoot Firefox issues caused by malware]] article.
    Did this fix your problems? Please report back to us!

  • Create customer and sales contract in one commit

    does anyone know a method to create a customer and a sales contract guaranteeing transactional, using one commit at last of work?
    I use to create a customer the standard class CMD_EI_API.
    Thanks of all.

    Hi Daniele,
    I see people who have one sold-to-party (AG) with several delivery address (temporary). In the SD document, they modify the address  to create a specific address for each SD document. In SAP that will create you an address starting with 999   it's an address only valid for the SD document.
    it's not beautiful, but it works
    regards
    Fred

  • Customer and PO number combination check in sales order

    Dear SD Gurus,
    Apart from the config within VOV8, is there a further check that can be done during sales order creation that can trigger an error message (not just warning) if a particular customer and PO number combination is entered?
    Thanks in advance,
    Alvin

    Hi,
    In VOV8 you can only Check whether the purchase order number already exists or not.
    If you want to do any other check like you said based on customer & PO number combination then follow steps below:
    Ask your ABAPER to
    1: Create a Z-table where you can store the required Customer No & PO No combinations.
    2: Write a code to check the PO no & Customer No entered in Sales order with the entries in the Z-table & throw an error if there is no match.
    This code needs to be written in the User exit Save_document_prepare by your ABAPER.
    3: This will work at time of Save & not a point of entry. The result will be same "error msg will be thrown"
    regards
    Edited by: Innovation is key on Feb 28, 2011 6:08 PM

  • How to handle BP who is both Customer and Vendor during history import?

    Hi Forum,
    This is for importing Financial transactions for Open Sales Orders, Open Sales Invoices, Open Purchase Orders and Open Purchase Invoices and also for importing history for all Closed Sales Orders, Invoices, Purchase Orders and Invoices.
    Our prospect has in their current system Business Partners who are both Customers and Suppliers (Vendors). In SAP Business ONE, BP is unique. It is recommended I believe in situation where BP is both Customer and Vendor, we need to create two BP Ids.
    Question?
    How do we import open and history of invoices in this situation where the same BP is both Customer and Vendor? Any tips would help please.
    Thank you all very much.

    Hi Syed,
    As Gordon and Rahul said, it is painful for you if you import closed transactions.
    Try to compromise your client that to use the old system for last year/old reports.
    Its always good practice to import the Opening balance and even the open documents only.
    If you have partially open items, then import the document for open quantities only.
    Let's say, if you have a sale order with an item of 100 Qty. Among that 100 qty, lets 20 qty has been already delivered then you have to create the sale order in SAP for remaining 80 qty only.
    Regards,
    Bala

  • Table and Field for Open Order Quantity for a Customer and Material

    Hi
    I created two sales orders 3 and 5 quantities, and delivered 1 qty in the second order.
    when I checked the table VBBE or VA05, I am able to see 3 and 4 qantities open.
    but I want to see the total 7 as open order qty, i.e, 3+4=7
    because both the orders are placed by the same customer and same material
    can u please tell me in which table exactly the total open order quantity for a customer and total open order quantity for a material is stored
    Madhu
    Edited by: madhubabu rao on Jul 1, 2008 1:49 PM

    HI,
    U can get the information in VA05 as there are columns like confirmed quantity and order quantty and status. U can use  summation button (add upto values) to get required information.
    Thx,
    Pramod

Maybe you are looking for