Need to pull ranked item from query into new query

Hi,
I have a parent query in which I assign a rank to characteristic values based on a key figure, in dollars. I need to pull the top 4 items from that parent query into 4 seperate child queries (i.e. child query 1 is written based on ranked item 1, child query 2 is written based on ranked item 2, etc.) Does anyone have any ideas how to achieve this?
Thanks
CM

Here's what I ended up doing to resolve this...
Created a Parent_Query that pulled all the results. No conditions or replacement path variable.
Created a Parent_Query_Top_4 with a condition "Top N: 4". Since I am using a Structure in my rows, I had to create a formula in the structure called "All" to get the condition to work. So in the condition, I selected my Key Figure "Cost", the Structure element "All" " (if you are using a structure in a condition, you're forced to select one of the structure elements), the condition "Top N" and the number "4". I also had to go to the Characteristic Assignment tab and select "Individual Chars and Char Combinations" with my "Code Group" characteristic selected, since I am only interested in seeing the Top 4 Code Groups and didn't want my query to consider any of the other characteristics.
Created Child_Query_Top_2. Restricted my Code Group characteristic to a replacement path by query variable. I replaced it with the results from Parent_Query. I then placed a condition on this query for Key Figure "Cost", the Structure element "All" the condition "Top N" and the number "2"; "Individual Chars and Char Combinations" with my "Code Group" characteristic selected.
Created Child_Query_Top_3. Restricted my Code Group characteristic to a replacement path by query variable. I replaced it with the results from Parent_Query. I then placed a condition on this query for Key Figure "Cost", the Structure element "All" the condition "Top N" and the number "3"; "Individual Chars and Char Combinations" with my "Code Group" characteristic selected.
Created Child_Query_1. This will find the #1 highest Code Group. Restricted my Code Group characteristic to a replacement path by query variable. I replaced it with the results from Parent_Query. I then placed a condition on this query for Key Figure "Cost", the Structure element "All" the condition "Top N" and the number "1"; "Individual Chars and Char Combinations" with my "Code Group" characteristic selected.
Created Child_Query_2. This will find the #2 highest Code Group. Restricted my Code Group characteristic to a replacement path by query variable. I replaced it with the results from Child_Query_Top_2. I then placed a condition on this query for Key Figure "Cost", the Structure element "All" the condition "Bottom N" and the number "1" (to get #2 item in the top 2); "Individual Chars and Char Combinations" with my "Code Group" characteristic selected.
Created Child_Query_3. This will find the #3 highest Code Group. Restricted my Code Group characteristic to a replacement path by query variable. I replaced it with the results from Child_Query_Top_3. I then placed a condition on this query for Key Figure "Cost", the Structure element "All" the condition "Bottom N" and the number "1" (to get #3 item in the top 3); "Individual Chars and Char Combinations" with my "Code Group" characteristic selected.
Created Child_Query_4. This will find the #4 highest Code Group. Restricted my Code Group characteristic to a replacement path by query variable. I replaced it with the results from Parent_Query_Top_4. I then placed a condition on this query for Key Figure "Cost", the Structure element "All" the condition "Bottom N" and the number "1" (to get #4 item in the top 4); "Individual Chars and Char Combinations" with my "Code Group" characteristic selected.
Very roundabout, but fulfills the request for these very dynamic reports. And once one is done, all you really need to do is copy that one and keep changing the conditions and/or replacement path variables. Now I'll stick it all in a workbook and VOILA!
Hope this can help someone sometime...
C

Similar Messages

  • Need to pull ranked item from one query into new query

    Hi,
    I have a parent query in which I assign a rank to characteristic values based on a key figure, in dollars. I need to pull the top 4 items from that parent query into 4 seperate child queries (i.e. child query 1 is written based on ranked item 1, child query 2 is written based on ranked item 2, etc.) Does anyone have any ideas how to achieve this?
    Thanks
    CM

    Hi,
    I have a parent query in which I assign a rank to characteristic values based on a key figure, in dollars. I need to pull the top 4 items from that parent query into 4 seperate child queries (i.e. child query 1 is written based on ranked item 1, child query 2 is written based on ranked item 2, etc.) Does anyone have any ideas how to achieve this?
    Thanks
    CM

  • How to copy existing query report into new query report in SQ00

    Hi Experts,
    Hi Experts,
    I want to add fields "company code" "'region" to existing  query report AQZZ/SAPQUERY/FKF1============
    (list of vendor address) for this i done as following:
    1.In SQ01  go to "EDIT->other user group" and i selected user group as /SAPQUERY/FK
    2.I typed F1 in query field and click change button
    3.I clicked next screen button and entered into "change query f1: select fields screen".here i clicked "basic list" button and searched company code checkbox and saved it as result company code is appearing in the standard report"AQZZ/SAPQUERY/FKF1============"
    but unfortunately there is no region field(LFA1-REGIO) for this i think i should copy the existing  query report  into new query report(Ex:Z_LIST_OF_VEND) which should be 14 characters.please tell me briefly how to do this because this is first time i am using SQ00.
    one more issue is when i selected "edit-otheruser group" and choosing /SAPQUERY/FK  i  am getting only infoset "/SAPQUERY/FIKD" but i should need Info set: "/SAPQUERY/FIDD" please tell me how to add the previous one into user group.i think if i got /SAPQUERY/FIDD into usergroup  /SAPQUERY/FK i can add region also into Query report as i mentioned above by going SQ01 ...............................
    please help regarding this which should be very beneficiary to my carrier.
    Regards,
    naresh

    Hi Experts ,
    I solved issue by changing infoset in SQ02 by means of assigning field to field group and changed the query in SQ00.
    Regards,
    naresh.

  • Copying of Service items from contract into Purchase order

    Dear Friends,
    We have upgraded from 4.6B to ECC6.
    Previously when we create Purchase Order with reference to Contract(i.e.Release order),we select service line items by selecting service selection button from PO and select the service line items from Contract,then whatever the line item whether line item 30,or line item 60 copied from Contract is copied into line item 10 of Purchase order in 4.6B version.
    But in ECC6 ,it is copied into other line item but not copied into line item 10 of purchase order.
    Please suggest ,what needs to be done, what went wrong.
    Regards,
    Dayanand

    Hi,
    Pl. elaborate whether the quantity 1 is appearing at Item Overview level or at Item Details level. At the item overview level the quantity will aleays be 1 with unit of measure as AU. At item details, you will be able to view the actual quantity of services copied from contract.
    Regards,
    Prashant
    - Pl reward points if answer is helpful to you

  • Trouble pulling Keynote files from iMac into iPhone4

    I've always been able to pull Keynote files from my iMac desktop into my iPhone4, via iTunes (I connect my iPhone to my iMac, then open up iTunes, go to the "apps" section, select Keynote, then "add" Keynote files from any folder, then pick up my iPhone and "add" the files via iTunes).
    Today one of my files wouldn't download, and my iPhone4 displayed an error message (it looked like the file was almost completely downloaded, before the error message showed up).  Then, I tried to "add" files through iTunes as usual (with the iPhone4 connected), and my iMac gave me an error message any time I tried to "add" a Keynote file through iTunes.
    Does anybody have any similar experience?  Any ideas?  Thanks!

    Welcome to the Apple Discusion Forums.
    The files mat well be incompatible with iMovie. MOV is a container format not a compression format and the compression used may simply the wrong type.
    You could convert your files using Quicktime or similar conversion application, but I feel you'd be better exporting from eyeTV in the correct format to begin with.
    Personally I'd choose to export to QuickTime using Apple Intermediate Codec for video and AAC for audio. You will need to expand the eye TV export options to reveal these options.

  • Need to pull License type from GTS to R3 in case of STO documents

    Hi Gurus,
    Currently, In standard sales order process, we are using 2 functional modules in R3 to get the ECCN number and license type from GTS. This is required to populate on some billing output.
    Functional modules used are:
    /SAPSLL/***_DOCS_SD0C_FETCH_R3
    /SAPSLL/***_DOCS_SD0C_GET_R3
    Using above mentioned functional modules, we can only pull ECCN number and license type from GTS only if we pass sales document number to this FM and further system pulls ECCN and license type from GTS by referring the sales document number.
    Issue:
    We have a requirement is to pull the License type in case of STO documents also but STO documents/STO deliveries are not checked for GTS check, so we can not use above mentioned functional modules to pull the license type from GTS to R3 because STO/PO / deliveries do not exist in GTS.
    I just have the material number with me and I need to pull the license type from GTS to R3.
    Could anyone please advise the table name or any structure where i can pass the material number in GTS and can pull the license type to R3.
    Your kind response would be appreciated.

    Hi DG,
    Thanks for your kind response. Regarding your second point, I am already pulling the ECCN number by using one customized functional module so I already have ECCN number with me. Could you please brief me how I can pull the License type linked to an ECCN number. What is the relationship table/ logic for pulling the license type by passing the ECCN number ??
    Looking forward to your response.
    Regards,
    Anoop

  • Need to pull the information from two facts and associated dimensions

    HI All, i need to pull all the columns from the two Facts and their associated dimensions, get the results.
    here is the example:
    Fact1 --> D1, D2, D3
    FACT2--> DA, DB, DC, D1
    D1 Dimension has a Join with two fact tables, as long as i'm using columns from D1 and FACT2, DA, DB, DC report works.
    but my requirement is to get the results when pulling the columns from all the dimensions and two facts like Fact1, FACT2, D1, D2, D3, DA, DB, DC
    how to achieve this requirement, can someone pls help me with this.
    your responses are much appreciated.
    Thanks
    rar

    Hi RAR,
    I assume you have created proper dimensional hierarchies for all the dimensions in your subject area. Also, ensure that all of them have a Total Level created.
    Assuming the above, since D1 is a conformed dimension, if you create a report having columns from only D1,Fact1 and Fact2, the report should show you proper results.
    For creating a report having columns from all tables, ensure the following:
    1. For all measure columns from Fact1 to be included in the report, set them to be calculated at the Total Level of dimensions DA, DB and DC
    2. For all measure columns from Fact2 to be included in the report, set them to be calculated at the Total Level of dimensions D2 and D3
    The physical sql will fire separate queries for the 2 star schemas and then join them using the conformed dimension.
    Hope this helps,
    Gaurav

  • Need to get catalog item from MDM of a specific supplier

    Hi gurus,
    i need to get the list of catalog item from MDM of a specific supplier,
    user will give the supplier and i need to bring the list of the catalog item
    that belong to the supplier that the user gave me,
    through abap.
    is anyone can help me with wich class+method do i need to use if i have the supplier name or id?
    thanks in advanced,
    dana.
    Edited by: dana leving on Jan 10, 2011 3:59 PM

    Hi Dana.
    You can achieve this through MDM Webservices.
    1. Create a MDM Webservice
    2. Configure the tables and list the list of fields which you want to retrieve
    3. You can specify the search criteria as well(supplier=XXX)
    4. Generate it and save it
    You can deploy the application in your landscape and call this webservice from your custom application to create shopping cart.
    The below link will give you an insight of MDM Webservices.
    http://help.sap.com/saphelp_nwmdm71/helpdata/en/45/018c03166a0486e10000000a155369/frameset.htm
    Hope it helps.
    Regards
    Bala

  • Need help in automating text from xml into illustrator

    I have seen some examples of automation script for filling text from xml into illustrator, need some help in this matter.
    Need script (currently working in mac OS)

    Firefox doesn't do email, it's a web browser.
    If you are using Firefox to access your mail, you are using "web-mail". You need to seek support from your service provider or a forum for that service.
    If your problem is with Mozilla Thunderbird, see this forum for support.
    [http://www.mozillamessaging.com/en-US/support/] <br />
    or this one <br />
    [http://forums.mozillazine.org/viewforum.php?f=39]

  • Insert item from library into text

    I am wondering if anyone knows how to insert an item from a library into a text or graphics frame programmatically? Are items in the library referenced by their names or do they have unique IDs
    I have a custom bullet that I have not yet converted to a font and I don't want to have to manually insert the bullet into each line of text I want. I have a tag where the bullet should go and I just want to replace the tag with the bullet.
    I know this is pretty strange but I am sure someone has experience with this.
    Thanks in advance

    Choose it from where?  See this user tip by Terence Devlin for how to access photos for use outside of iPhoto: How to Access Files in iPhoto
    Have you tried dragging the photo from the iPHoto window into the open Word document window?
    OT

  • Need to transport a Folder from cFolders into SAP R/3

    Dear Members,
      I want to import a whole folder( and it's child documents) from cFolder into SAP R/3. What I did so far is that I have created the RFC Dest., Configured the cFolder in R/3 using Tx CFC01, created a Search for the folder inside cFolder and ran CFI01. There I entered the cFolder Application name and entered the cFolder Search as my search name (using the search help). Then when I am trying to Add Documents it's showing a message <b>No lines added. cFolders document(s) contain no file(s)</b>. What I have seen so far even after debuging and after doing a lot of R&D is that, Documents can be imported but folders can't be. <b>But my requirement is to import all the folder element in one shot.. how to go about that? Please lit into the matter..I am waiting with points</b>
    Sugata

    in cfi02 it is not possible if you are game you can try
    CFX_API package to write a prg to do so
    CFX_API_FOLDER_GETDETAIL - to get doc ids
    CFX_API_DOC_DOCUMENT_READ

  • Drag & drop images from Finder into new Photoshop layer?

    Is it possible to drag & drop images from Finder into a new Photoshop layer?
    I can do it from a web browser, but not the Finder.

    >I couldn't find a way to do so in Bridge, but also I never use that program. Never got into Bridge's workflow. >
    I really do suggest that you re-visit Bridge especially the CS4 version.
    I just cannot conceive of trying to use a Digital camera, a Scanner or the Creative Suite programs without using Bridge and ACR.
    I can even use it to read PDFs and inDesign documents (all pages!) without opening Acrobat or InD..
    >I usually keep a "work" window open with all the files I am using for a project, so it would be far more handy to be able to skim them in the Finder.
    It is now far more effective and efficient to do that in Bridge than in the Finder.
    This is where you would find the new Collections feature to be invaluable:
    Just select all the images and other files connected to a project from any folder and drag their icons into the same Collection.
    You then have all aliases (previewable at full-screen slide-view size with one click of the space bar in CS4) to ALL of your files which are now visible in. and openable from, a single panel.

  • When needing to send an email from Pages a new email document does not come up. PDF

    When needing to send email document from Pages when I hit Share, send via email then PDF no new email document comes up. Please advise.

    Chances are you have an "illegal" character in the file name such as a / or *.

  • Need to pull the data from one server to another server in SSMS using linked server

    Hi, I have store proc which will take the parameters passed to it and store it in a table in that server. Now, this table data has to be pulled to another server table which is of same structure. But I need to do that in the same store proc which is in
    first server. I have searched in online but could not figure it how to link connection between these two servers and pull data from the first sever to the second. Can anyone please help

    You can setup a linked server from Server A to Server B. Then you will be able to query server B from Server A.
    eg: Assume you have a database test in Server B which has a table sample. From server A you could run this query to pull details.
    Select * from ServerB.test.dbo.sample.
    http://msdn.microsoft.com/en-us/library/ms188279.aspx
    http://msdn.microsoft.com/en-us/library/ff772782.aspx#SSMSProcedure
    You also have other options like distributed queries (openquery), check this blog
    http://blog.sqlauthority.com/2007/10/06/sql-server-executing-remote-stored-procedure-calling-stored-procedure-on-linked-server/
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • Need to pull certain data from certain documents

    First off if you know of a more acceptable place to post this please let me know
    Ok here is my scenario, i receive these documents in excel files they have users first and last name, badge number, email, E.T.C. Now i want to extract just the badge number out of this excel document. So my first question is i want to do this with a java program so what do i want to research about to make a java program that searches one of these excel documents and assuming it is space dillimeted pulls just the badge number out?
    Then i have another document called NCAS, this document has every employee listed only unique thing here is badge number and username but i want to take the badge number out of the first document and use this badge number to search my NCAS document. This will bring up a line in the document with user badge number username phone , e.t.c. again this document is space dillemited. So i want it to pull a field out of this document which i believe is the first one copy it.
    Then for my third thing i want to transfer this copied username over to a esb (oracle product) which has a database adapter on it and use it to input this username and query through our oracle database that username after that im going to use esb database connector to assign users responsibilities. but thats another project im just trying to extract certain information from certain documents i will worry about insserting this into a database later
    I guess what i would ask is can someone direct me to something that explains how to pull entries out of a document or something to that nature maybe at the same time how can i implement my java program that is pulling data out of files and incorprate that with an esb project that involves database adapters
    Message was edited by:
    vande

    Hi Vande,
    Just a comment. You will often get that type of response to a question that Google answers well, especially if it's a recurring question that has been asked and answered lots of times. Have a look at http://www.catb.org/~esr/faqs/smart-questions.html for some pointers.
    If you had said,
    "I searched Google/this forum, found a few ideas, and am looking for feedback from anyone who has tried this and might be able to help me pick the best way"
    you would have likely got a response more in line with what you were looking for. Also note that searching this forum for "java excel" found lots of interesting hits.
    Best,
    John

Maybe you are looking for

  • Electronic Bank Statement Redirect postings using Account Mod

    We wish to redirect postings using the same bank transaction to various bank subaccounts depending on the contents of the note to payee field. We set up the search string and the search string use with a target of account modification. The account sy

  • NOT ABLE TO DO PGR

    Dear All,              I have an issue regarding Return order -- PGR--Return Invoice. The problem is that after creation of sales order, it is allowing me to create Delivery Order but not allowing me to do PGR. what could be the possible reason? It c

  • Html comment around css

    When you have the following code: <style type="text/css"> <!-- .header { font-weight: bold; background: #979797; --> </style> What does that mean? This header class will only take effect in IE? Or, is does the <!-- and --> do something else?

  • Windows 8 admin login

    I am trying to log on as the admin on windows 8 but the users and groups folder is'nt there 

  • FCP Crashes when working with un-rendered stills

    Hello my FCP project (6.0.3) crashes often when I am dealing with unrendered stills, or even clicking through a list of stills in my browser. (I am cutting an animatic with thousands of stills...) I have tried switching computers and trashing prefs,