Query for PO total group by Supplier

Hi All,
Does any 1 have query which gives the total of PO's for a supplier? and that to top 10 suppliers?
For example there are 100 PO's for Supplier 'A'.
I need total of al 100 PO's for Supplier 'A'.
Also is there iny report which gives for top 10 suppliers.
Thanks in Advance,
SYR

Here are some pointers so you can write your own query.
Start with po_vendors to get vendor_id for your vendor.
Join with po_headers_all to get po's for that vendor. Focus on standard pos only.
Join with po_lines_all to get price and quantity for those po.
Sum up the price*quantity to get total.
Do you have blanket Purchase orders? If yes, then you will have to include po_releases_all.
Hope this helps,
Sandeep Gandhi

Similar Messages

  • SAP query for Material pricing group changes in material.

    Dear all,
    I'm trying to generate a query for Material Pricing group changes in material. For that I've to retrieve data from follwing three tables MVKE, CDHDR & CDPOS.
    Firstly while generating infoset -
    I tried it by joining tables MVKE & CDHDR, but system is not allowing it, also table CDPOS can't bejoined.
    Then I tried by reading dirctly from table MVKE and then adding additional fields in it. query created using this infoset is giving the output, however it's giving only 1 entry per material entered in input.
    for multiple entries in output for MPG changes in same material I tried creating addtional structure for table CDHDR & CDPOS but again I'm getting only 1 entry per material.
    please suggest how I can get MPG changes done in specified time period for a material.
    Thanks.

    Hi
    Check the report RSSCD100 and run it for object MAT_FULL for table MVKE. Use this report as a template for your own development.
    I hope this helps you
    Regards
    Eduardo
    PD: sorry, the table is DMVKE
    Edited by: E_Hinojosa on Sep 2, 2011 9:37 AM

  • Help in the query for sub total.

    hi friends.
           i have a query display below output.
          but i wanted to get sub total of each repeated records,.
    Output is like below.  
    Segment
    Units
    Total items
    CRE
    CRE - MUMBAI
    3
    CTA
    CTA - CHENNAI
    13
    CTA
    CTA - DELHI
    37
    CTA
    CTA - HYDERABAD
    10
    CTA
    CTA - KOLKATTA
    22
    CTA
    CTA - MUMBAI
    110
    Now i need to show like below.  if you see the sub total in bold.
    Segment
    Units
    Total items
    CRE
    CRE - MUMBAI
    3
    CRE
    Sub Total
    3
    CTA
    CTA - CHENNAI
    13
    CTA
    CTA - DELHI
    37
    CTA
    CTA - HYDERABAD
    10
    CTA
    CTA - KOLKATTA
    22
    CTA
    CTA - MUMBAI
    110
    CTA
    Sub Total
    192
    please help.

    with
    the_data as
    (select 'CRE' segment,'CRE - MUMBAI' units,3 total_items from dual union all
    select 'CTA','CTA - CHENNAI',13 from dual union all
    select 'CTA','CTA - DELHI',37 from dual union all
    select 'CTA','CTA - HYDERABAD',10 from dual union all
    select 'CTA','CTA - KOLKATTA',22 from dual union all
    select 'CTA','CTA - MUMBAI',110 from dual
    select segment,
           case grouping_id(segment,units) when 0
                                           then units
                                           when 1
                                           then 'Sub total'
                                           else 'Grand total'
           end units,
           sum(total_items) total_items
      from the_data
    group by rollup(segment,units)
    SEGMENT
    UNITS
    TOTAL_ITEMS
    CRE
    CRE - MUMBAI
    3
    CRE
    Sub total
    3
    CTA
    CTA - DELHI
    37
    CTA
    CTA - MUMBAI
    110
    CTA
    CTA - CHENNAI
    13
    CTA
    CTA - KOLKATTA
    22
    CTA
    CTA - HYDERABAD
    10
    CTA
    Sub total
    192
    Grand total
    195
    Regards
    Etbin

  • Single Query for getting total no of records N getting records from a selected range

    Hi,
    Got the below query:
    SELECT a.*, rowid FROM (SELECT name, postcode FROM Tbl ORDER BY name asc)a WHERE ROWNUM <=30
    MINUS
    SELECT b.*, rowid FROM (SELECT name, postcode FROM Tbl ORDER BY name asc) b WHERE ROWNUM <= 10
    Though I got the results right, I also want to know the total no of records from "SELECT name, postcode FROM Tbl ORDER BY name asc". Does anyone knows how to do it in a single query?
    Thanks.

    hi Carol
    The following output may help you.
    SQL> l
    1 select * from emp where (rowid,0) in (select rowid,mod(rownum,10)-rownum from emp)
    2 minus
    3* select * from emp where (rowid,0) in (select rowid,mod(rownum,6)-rownum from emp)
    SQL> /
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7839 KING PRESIDENT 17-NOV-81 5000 10
    7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
    7876 ADAMS CLERK 7788 12-JAN-83 1100 20
    7900 JAMES CLERK 7698 03-DEC-81 950 30
    The above query fetches the 6,7,8,9th records only.
    Well my suggestion would be not to use ROWNUM directly in where clause since it changes dynamically. it is not a fixed value. for example pls see the result.
    SQL> select rownum,empno,ename,sal,job from emp where sal > 3000;
    ROWNUM EMPNO ENAME SAL JOB
    1 7839 KING 5000 PRESIDENT
    SQL> select rownum,empno,ename,sal,job from emp where sal > 1000;
    ROWNUM EMPNO ENAME SAL JOB
    1 7566 JONES 2975 MANAGER
    2 7654 MARTIN 1250 SALESMAN
    3 7698 BLAKE 2850 MANAGER
    4 7782 CLARK 2450 MANAGER
    5 7788 SCOTT 3000 ANALYST
    6 7839 KING 5000 PRESIDENT
    7 7844 TURNER 1500 SALESMAN
    8 7876 ADAMS 1100 CLERK
    9 7902 FORD 3000 ANALYST
    10 7934 MILLER 1300 CLERK
    10 rows selected.
    SQL> select * from emp where rownum = 1;
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7566 JONES MANAGER 7839 02-APR-81 2975 20
    The record of employee KING is getting the rownum differently.
    My understanding (out of my little knowledge) is the rownum values are assigned to the records only after the records are read physically and after applying the conditions(without rownum). Then the row numbers (rownum) is assigned to the records. Hence the rownum is not constant to a record since it is a dynamic value.
    Well i would like to know the suggestions of the ORACLE EXPERTS here in the discussion forum.
    If my finding is correct then OK if not Pls excuse me and pls give the correct solution
    Regards
    Prakash Eranki
    [email protected]

  • SCCM 2007 database query for AD security group for machines

    dear,
    I am had created security DL in AD for machine to deploy software  and trying to link in SCCM 2007 with collection but could not
    i have tried query base following below link but its does not help
    http://www.windows-noob.com/forums/index.php?/topic/892-deploy-software-through-ad-groups-linked-to-collections-in-sccm/
    type all query but could not find in table (SystemGroupName).
    [email protected]

    Go to properties of you collection and add a new membership rule to add the security group
    SCCM use discovery methods to get information from AD. Make sure AD system discovery and AD security group discovery are enabled for the SCCM site. Once you add machines to the security group, you need to wait till the next discovery cycle is completed.
    The discovery cycle runs on a schedule set by SCCM administrator.

  • There are no queries in the log for selected measure group

    I configured SSAS 2008 R2 Server to dump every 5th query to olapquerlog table in a new logging database. Data is coming to the log table fine. I have been running it from last two weeks. I have about 175 queries against the cube which i
    want to aggregate. When i run the usage based aggregation wizard, ssas never finds any query for all measure group. i see a warning below that, "There are no queries in the log for selected measure group".
    Can anyone tell me why?
    Aneel Ismaily

    ID and Database Name look same when i open code from cube;
    <ID>Spend
    Analytics DW</ID>
    <Name>Spend
    Analytics DW</Name>
    this is how data looks like in sql table;
    MSOLAP_Database
    MSOLAP_ObjectPath
    MSOLAP_User
    StartTime
    Duration
    1
    SpendAnalyticsDW
    NT1101112\BICORP.SpendAnalytics.Spend Analytics DW.Account Ledger
    ROCKTENN\!sharepoint2010
    6/22/2011
    718
    2
    SpendAnalyticsDW
    NT1101112\BICORP.SpendAnalytics.Spend Analytics DW.Account Payable 1
    ROCKTENN\SDouglas
    6/20/2011
    359
    Note: I have removed actual dataset from the table, because of its length.Aneel Ismaily

  • Query for Group by & order by

    Hi all,
    I have a table name as angdata77 having attributes like asigno..
    i want to retrieve data from angdata77 by using both group by & order by clauses.. for total count..
    am using the query as
    select asigno,count(*) from angdata77 group by asigno order by asigno;
    Is there any other query for retrieving the data from angdata77
    Thanks in Advance,
    Venkatesh J.

    885756 wrote:
    Ya it's good.. Performance also good while retrieving data...
    I want to know other Possibilities also sir...There will be no better alternative for this, because this is the most simple and straight forward way to get the output you are looking for..
    Go ahead without any confusion... :)

  • Approval Query to skip for one Vendor Group - Not working

    Dear All,
    I am trying to create an approval query wherein when a user creates a Purchase Order for a Particular Vendor Group then the approval check is not required and for other Vendor Group approval check is required. The query is as under :
    SELECT distinct 'true'  FROM OPOR T0  INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode INNER JOIN OCRG T2 ON T1.GroupCode = T2.GroupCode WHERE T2.GroupName <> 'Supplier Own Group'
    I don't want that which vendors are in Supplier Own Group check go for an approval process. Means all vendors in this group should get skipped for approval.
    How to achieve this because this query seems not to be working in the approval process because when a user creates a PO whose Vendor group is under Supplier Own Group then also the approval checking is happening.
    Please help how to resolve this issue.
    Regards,
    Depika

    Hi,
    Try this
    SELECT distinct 'true'  FROM OPOR T0  INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode INNER JOIN OCRG T2 ON T1.GroupCode = T2.GroupCode
    AND T2.GroupName <> 'Supplier Own Group' where T0.CardCode = $[$4.1.0]
    Hope this helps,
    Son.

  • Query for tasks assigned individually to all members of a user group

    I am looking for a query that will allow me to create a list view that will show all tasks assigned to the current user (in the Assigned To field), as well as to other members of the user group that the current user belongs to. The scenario is that we want
    a student to see tasks assigned to them, as well as to other students in the class. Each class is its own user group. I have seen a lot of examples where the filter shows tasks assigned to the current user and the current users group - that is NOT what I am
    looking for.
    For example - Todd (me), Fred and John are members of one user group. When I look at this class view, I should see tasks assigned to me, as well as those assigned directly to Fred and John.
    Does anyone have a CAML query for this? I am thinking it would need to include the SPGroup element. Thanks!

    Hi William,
    I've tried this, but it isn't working for me. Should I chnge the Smart Group, to an ordinary one?
    Thanks

  • SQL Query for members of dynamic group - Need to include Name, Path and Type

    Hello,
    I built a custom dynamic group that has all my SQL databases in it using SCOM 2012 SP1.  The group works fine as I can see the Name(ie, Database name), Health State, Path (ie, hostname/instance) and Types (ie; SQL 2005).  Now I'm trying to
    build a custom report based off this same information using a SQL query.   I'm no DBA and could use some help.  So far this is what i have
    use
    select
    SourceObjectDisplayName as
    'Group Name',
    TargetObjectDisplayName,TargetObjectPath
    from RelationshipGenericView
    where isDeleted=0
    AND SourceObjectDisplayName
    like
    'SQL_Databases_All'
    ORDERBY TargetObjectDisplayName
    This gets me the Group Name (which i really don't care about), database name, and hostname/instance. What I am missing is the Health State and most importantly the Type (ie, SQL Server 2005 DB, SQL Server 2008DB).
    If someone could assist me here I would appreciate it. I believe I need to do some type of INNER JOIN but have no idea where the SQL type info lives or the proper structure to use. Thanks
    OperationsManager

    Here's the updated Query for OpsMan 2012 R2:
    To find all members of a given group (change the group name below):
    select SourceObjectDisplayName as 'Group Name', TargetObjectDisplayName as 'Group Members' 
    from RelationshipGenericView 
    where isDeleted=0 
    AND SourceObjectDisplayName = 'Agent Managed Computer
    Group' 
    ORDER BY TargetObjectDisplayName

  • Querying for the members of a group using the PRC

    I've been combing through the PRC API for a way to query for the members of a group (not the ACL, but the member users and groups).
    I can't find anything that seems to do this for Plumtree 5.0x using the PRC. Am I missing something or is this just not implemented? Seems like a major oversight to me. If any Plumtreevians are listening, can I add a feature request for those methods in your next release of the WS Server?
    Thanks!
    Chris Bucchere | bdg | [email protected] | http://www.bdg-online.com
    Like blogs? Check out http://bdg-plumtree.blogspot.com

    If you go into the Calendar section and select the Edit option for that calendar and then change the permissions for that calendar people should be able to subscribe to it.

  • Query for user group

    Dear Team,
    When I am creating  Query for user group via T-code  SQ01.
    Query     ZDEMO1    then Create
    This messege is comming .
    System setting does not allow changes to be made to
    object AQQU /ISDFPS/OM  ZDEMO1
    Why this messege is comming .
    Thanks
    manu

    Dear Manu,
    Please check in SE06 >> change system options >> if the system and the relevant object is in modifiable status.
    Cheers,
    Jazz

  • Notification Query for Item Group

    Dear Experts,
    Please Guide me for a Notification Query for this Scenario :
    I want to put a Notification Query for a  Group i.e. when any user do transactions in any form or any Particular form using items
    of this Group than if the Item Quantity is in Decimal then he can not do that Transaction and Get Error Message.
    Thanks in Advance.
    Atul Chakraborty

    Hi Atul,
    to achieve this you have to write SPTN at the back end
    under databases node select your live database.
    Select programability
    select stored procedure
    select db.sbo.SP_Transactionnotification
    and paste your code into
    ADD YOUR CODE AREA
    If (@object_type = '17') and (@transaction_type in ('A', 'U'))
    BEGIN
         Declare @ItmGrpCode as int
         Declare @Qty as int
         set @ItmGrpcode = (select oitm.itmsgrpcod from oitm inner join rdr1 on oitm.itemcode = rdr1.itemcode inner join ordr on   
            rdr1.docentry = ordr.docentry where  ordr.docentry=@list_of_cols_val_tab_del)
            set @Qty = (select quantity from rdr1 inner join ordr on ordr.docentry = rdr1.docentry where ordr.docentry =
            @list_of_cols_val_tab_del)
         BEGIN
                        if @ItmGrpcode = 10 and @qty = 0
                        Begin
                             set @error = -1
                             set @error_message = 'Invalid Input'
                       End
           End
    END
    Like wise by capturing object type and dml mode you have to write code for every document that you want to check.
    For example I've given code for Sales Order.
    hope this will help you
    Thanking you
    Malhaar'

  • Query Builder - Getting Universelist for one specific Group

    Hi All,
               I am in need of a query string (in query builder) that will return me All the universes for a specific group.Is it possible to do and if possible what will be the way to do this?
    Thanks in advance for your help,
    Anirban

    Hi Anirban,
    What is the BusinessObjects version you are using ( i.e. BO XIR2 or BOXI 3.0)?
    Regards,
    Deepti Bajpai

  • Re: Statistics Query for Total runtimes for Process Chain incorrect

    Hi Guys,
    I am building a Query for Total runtimes for Process Chain Statistics. I used the Cube 0TCT_MC21 for Query - 0TCT_MC21_Q0101.
    I dragged in Keyfigure section - startdate, end date, Start time are all correct and fine but the End time (0TCTENDTIM) is coming incorrect. Is something else i should use to get the End time?
    Please let me know if any suggestions?
    Regards

    Just check if the end times are in GMT ?? usually happens with timestamps....

Maybe you are looking for

  • Itunes has encountered a problem and has to close.

    When I opened iTunes the first time today, I had no problem, but then I went to the store, then my computer froze, so I closed it.. And now I downloaded the update and whenever I try to open it a box pops up saying "iTunes has encountered a problem a

  • How can i get my microphone to work on my hp2000 running windows 7 64 bit?

    I am trying to use an external mic on my Pavillion2000 laptop, and I turned off the internal mic in error. Now I cannot use either internal or external mic's. How can I turn on the mic's?

  • Exception handling design issue

    I have a class that's a low level building block of my application. It takes as its single constructor argument a String that needs to be in a known format. At present the constructor takes this String and checks it, throwing an Exception if it's not

  • Why won't my photoshop Elements 10 load?

    Why won't my photoshop elements 10 load?

  • Selecting an area in canvas

    Hi all, I have a canvas inside an application. I want to select a rectangular area inside the canvas, just like  we use to select text in MS Word , i.e, by dragging the mouse by left click.  i know it can be done by Mouse_UP and Mouse_DOWN events, bu