Skip to Content
avatar image
Former Member

Number Of Sales Orders Per Owner

Good Morning

I am wanting to create a query to see the effienciency of our sales office. I would like to create a query that shows number of orders processed per owner on a specific date range - is this possible?

many thanks,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Sep 20, 2017 at 07:21 AM

    Hi James.

    Yes.. It's possible..

    But You should provide more details..

    You want to use the query manager in SAP B1? Or a Crystal Report? Or something else?

    What kind of data you want to display? Only the sales agent (name or code) and the number or sales order in a range date or something other?

    LUCA

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Query Manager Gianluca :)

      Want to display who processed the order and the total number within a date range :)

      James

  • Sep 20, 2017 at 12:31 PM

    Please check with below queries

    For detail report

    SELECT H.firstName,A.CardCode, DocNum AS 'Ord.No', CONVERT(varchar, A.DocDate, 3) AS 'Date', B.Dscription AS 'Item Name', B.ItemCode AS 'Item Code', SUM(B.quantity) AS 'Quantity', SUM(B.price) AS 'Price', SUM(B.LineTotal) AS 'Amount'
     FROM ORDR A
    INNER JOIN RDR1 B ON (A.DocEntry = B.DocEntry)
    left outer join OHEM H on H.empID = A.OwnerCode
     WHERE (A.DocDate >= '20111231') AND (A.DocDate <= '20170601')
     --AND (A.OwnerCode = '3')
    GROUP BY  H.firstName, A.CardCode, A.DocNum, A.DocDate, B.Itemcode, B.Dscription
    ORDER BY 'Date'
    

    for summary

    SELECT H.firstName,count(DocNum) 'Count'
          FROM ORDR A left outer join OHEM H on H.empID = A.OwnerCode
     WHERE (A.DocDate >= '20111231') AND (A.DocDate <= '20170601') --YYYYMMDD
     --AND (A.OwnerCode = '3')
    GROUP BY  H.firstName
    
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Dear Mustafa,

      thank you for this - can i also add total number of lines? on the sales order.

      many thanks,

      James