Which query is using which Hierarchy?

Hello All,
Where can i get the information like which query is using which hierarchy!?
I tried to make it happen by combining lot of tables like
RSRREPDIR
RSZELTPROP
RSZELTXREF
RSHIEDIR
RSZCOMPDIR
but couldn't arrive at a solution. Did u guys come across such a situation!?
If so please brief me how?
Thanks
Karthik

Please see this link for a solution:
Queries that use a hierarchy
Hope this helps.
Regards
PS: assign points is the way to say thanks

Similar Messages

  • Using different hierarchy in a query and last value error

    Hi guys,
    there is a hierarchy for customers in the 0Customer Infoobject which I should use in my query.
    I have activated the hierarchy in the query and now some results are not appearing but red crosses "x" are shown.
    And the error message: The function Calculate Results as ... could not be applied everywhere.
    I know that I am using the result as "last value" for some columns because I need them there (for example: to determine the last value for the credit limit of the current month). I think these columns where I am using the last value calculation are only affected.
    I mean my query has a lot of characteristics and key figures and I was told that a hiearchy for customers which is available should be used. But now there are these red crosses.
    I don´t see any other solution as not to use this specific hierarchy.
    Has anybody a suggestion what could be an argument to use or not to use a hierarchy?
    Is it sometimes like in my case that a hierarchy is not possible to use?
    Thanks in advance!

    Hi,
    say for example your customer hierarchy is customers grouped under region. You can maintain this region as one of the attribute of customer and you can display this attribute in the report. Indirectly, this will give similar output to that of hierarchy.
    But lot depends on how your hierarchy is formed, before commenting whether it can be moved to master data attributes.
    Thanks.

  • How to write SQL query to flatten the hierarchy

    Hi,
    I have person table which has recursive hierarchy and I wish to flatten it upto 5 levels.
    I am using Oracle10g and I have written following query to flatten the hierarchy
    SELECT
    ID,
    level lvl,
    REGEXP_SUBSTR (SYS_CONNECT_BY_PATH (fname||' '||lname, '/'), '[^/]+', 1, 1) AS level_1,
    REGEXP_SUBSTR (SYS_CONNECT_BY_PATH (fname||' '||lname, '/'), '[^/]+', 1, 2) AS level_2,
    REGEXP_SUBSTR (SYS_CONNECT_BY_PATH (fname||' '||lname, '/'), '[^/]+', 1, 3) AS level_3,
    REGEXP_SUBSTR (SYS_CONNECT_BY_PATH (fname||' '||lname, '/'), '[^/]+', 1, 4) AS level_4,
    REGEXP_SUBSTR (SYS_CONNECT_BY_PATH (fname||' '||lname, '/'), '[^/]+', 1, 5) AS level_5
    FROM cmt_person
    CONNECT BY manager_id = PRIOR id
    and level<=5
    The person table have more than a million records.
    Here I am getting the correct output but this query is taking a lot of time to run.
    I am looking at a SQL query without use of connect by to get the required output.
    To recreate the issue, you can use this query in HR schema of Oracle and use Employees table.
    Any help would be greatly appreciated.
    Thanks,
    Raghvendra

    I tried to rewrite the query without using regular expression and connect by. Here is the code:
    SELECT
    cmt_person.id ,
    cmt_person.fname as mgr1,
    case when cmt_person2.manager_id=cmt_person.id then (cmt_person2.fname ) end as mgr2,
    case when cmt_person3.manager_id=cmt_person2.id then (cmt_person3.fname ) end as mgr3,
    case when cmt_person4.manager_id=cmt_person3.id then cmt_person4.fname end as mgr4,
    case when cmt_person5.manager_id=cmt_person4.id then cmt_person5.fname end as mgr5
    FROM
    cmt_person,
    cmt_person cmt_person2,
    cmt_person cmt_person3,
    cmt_person cmt_person4,
    cmt_person cmt_person5
    WHERE
    cmt_person2.manager_id(+)=cmt_person.id and
    cmt_person3.manager_id(+)=cmt_person2.id and
    cmt_person4.manager_id(+)=cmt_person3.id and
    cmt_person5.manager_id(+)=cmt_person4.id
    order by 2,3,4
    I got following output:
    emplo000000000200100     Bobby     Khasha     Rahul     Rajesh     
    emplo000000000200099     Bobby     Khasha     Rahul     Ajay     
    emplo000000000200101     Bobby     Khasha     Rahul     Swati     
    emplo000000000200320     Bobby     Khasha     Rahul     Jinesh     
    emplo000000000201231     Bobby     Khasha     Test123          
    emplo000000000201230     Bobby     Khasha     User1_Domain          
    emplo000000000201227     Bobby     Khasha     User1_World          
    emplo000000000200104     Bobby     Khasha     Yitzik     Natalia     
    emplo000000000200103     Bobby     Khasha     Yitzik     Andrew     
    total 9 rows
    But this is partially correct output. I want output like this:
    emplo000000000200097          Bobby                    
    emplo000000000200087          Bobby     Khasha               
    emplo000000000200102          Bobby     Khasha     Yitzik          
    emplo000000000200103          Bobby     Khasha     Yitzik     Andrew     
    emplo000000000200104          Bobby     Khasha     Yitzik      Natalia     
    emplo000000000201227          Bobby     Khasha     User1_World          
    emplo000000000201231          Bobby     Khasha     Test123          
    emplo000000000201230          Bobby     Khasha     User1_Domain          
    emplo000000000200098          Bobby     Khasha     Rahul          
    emplo000000000200099          Bobby     Khasha     Rahul     Ajay     
    emplo000000000200100          Bobby     Khasha     Rahul     Rajesh     
    emplo000000000200320          Bobby     Khasha     Rahul     Jinesh     
    emplo000000000200101          Bobby     Khasha     Rahul     Swati     
    total 13 rows
    Do you know what I should do to get this output.
    Thanks,
    Raghvendra

  • Can I refactor this query to use an index more efficiently?

    I have a members table with fields such as id, last name, first name, address, join date, etc.
    I have a unique index defined on (last_name, join_date, id).
    This query will use the index for a range scan, no sort required since the index will be in order for that range ('Smith'):
    SELECT members.*
            FROM members
            WHERE last_name = 'Smith'
            ORDER BY joindate, idIs there any way I can get something like the following to use the index (with no sort) as well:
    SELECT members.*
            FROM members
            WHERE last_name like 'S%'
            ORDER BY joindate, idI understand the difficulty is probably; even if it does a range scan on every last name 'S%' (assuming it can?), they're not necessarily in order. Case in point:
    Last_Name:  JoinDate:
    Smith          2/5/2010
    Smuckers     1/10/2010An index range scan of 'S%' would return them in the above order, which is not ordered by joindate.
    So is there any way I can refactor this (query or index) such that the index can be range scanned (using LIKE 'x%') and return rows in the correct order without performing a sort? Or is that simply not possible?

    xaeryan wrote:
    I have a members table with fields such as id, last name, first name, address, join date, etc.
    I have a unique index defined on (last_name, join_date, id).
    This query will use the index for a range scan, no sort required since the index will be in order for that range ('Smith'):
    SELECT members.*
    FROM members
    WHERE last_name = 'Smith'
    ORDER BY joindate, idIs there any way I can get something like the following to use the index (with no sort) as well:
    SELECT members.*
    FROM members
    WHERE last_name like 'S%'
    ORDER BY joindate, idI understand the difficulty is probably; even if it does a range scan on every last name 'S%' (assuming it can?), they're not necessarily in order. Case in point:
    Last_Name:  JoinDate:
    Smith          2/5/2010
    Smuckers     1/10/2010An index range scan of 'S%' would return them in the above order, which is not ordered by joindate.
    So is there any way I can refactor this (query or index) such that the index can be range scanned (using LIKE 'x%') and return rows in the correct order without performing a sort? Or is that simply not possible?Come on. Index column order does matter. "LIKE 'x%'" actually is full table scan. The db engine accesses contiguous index entries and then uses the ROWID values in the index to retrieve the table rows.

  • Unable to parse query when using dblink in forms 4.5

    Hi,
    I have created a query that uses a DBlink because I need to do query on a table located on another dbase. I've used the query on creating my report using Reports 6i. The report needs to be called from a menu on our system, which was developed under Developer 2000 (forms 4.5). The problem is, when I tried to access the report from the menu, it returns the error 'unable to parse query'. What I did after getting error was to create a dummy module using Forms 6i, and call my report from there. It worked fine.
    By the way, the table that I'm accessing using the dblink is under Oracle 9i dbase, and the dbase of the system that I've been working at is Oracle 8i.
    I don't have any idea on what's causing this error. Is there a compatibility issue when using a dblink located in Oracle 9i database with forms 4.5?
    Thanks!

    Hello,
    Not sure if it is the good answer, but I know that Forms does not recognize dblink and owner.object syntax. You have to create a simple synomym that point to the distant object and use this synonym within Forms.
    Francois

  • Using a hierarchy but also showing work orders that are not in hierarchy

    good morning bi people,
    i have a requirement to show data from a hierarchy which includes Operation and Maintenance information. for example it has an account broken into labour/material/trucking and below this is the pm acivity type and secondary cost element (concatenated). this hierarchy is a manually created hierarchy that is uploaded to BW and is not in ECC. The users do not want to see the concatenated field at the end of the hierarchy, but instead, want to see the Work Orders that have the PM activity types.
    At the present time, we have the report using the hierarchy but we need the work orders to replace the pm activity type/secondary cost element concatenated field. the work order field is a free characteristic and when we drag in the work order in analyzer, it works correctly.
    1) is this possible to use the hierarchy and somehow map the work order field to the end of the hierarchy within crystal?
    2) do you have a suggestion to change the hierarchy, without being a manual nightmare?
    all conversations are welcome.
    Erik

    Good Day Ingo,
    i have created a word document with screen shots of the hierarchy from BW, a screen shot of the BEx showing the free characteristic of Maintenance Order and a screen shot of the crystal report with the PM Activity type concatenated to the Cost Element. Once again, we do not wish to see the concatenated field, but rather see the Maintenance orders that have a PM Activity type the same as the concatenated field. 
    here is the link.
    https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B1j5hXTptfntYWI1MDUzNGEtY2MxNy00YmMzLWJjZjEtZDA4OGZiYmMyNzFh&hl=en&authkey=CKq4xcgJ
    thanks Ingo,
    Erik

  • How to find out Query last used by whom

    Dear All,
    Can any one tell me that "How to find out the Query last used by whom. I have already searched in SDN but no luck. In my system BW Stats are not installed and I have already checked the below tables.
    RSZELTDIR  - Directory of the reporting component elements
    RSZELTTXT  - Texts of reporting component elements 
    RSZELTXREF  - Directory of query element references 
    RSRREPDIR -  Directory of all reports (Query GENUNIID) 
    RSZCOMPDIR -  Directory of reporting components 
    RSZRANGE  - Selection specification for an element 
    RSZSELECT -  Selection properties of an element
    RSZELTDIR - Directory of the reporting component elements 
    RSZCOMPIC -  Assignment reuseable component <-> InfoCube
    RSZELTPRIO -  Priorities with element collisions
    RSZELTPROP - Element properties (settings)
    RSZELTATTR - Attribute selection per dimension element 
    RSZCALC - Definition of a formula element 
    RSZCEL - Query Designer: Directory of Cells
    RSZGLOBV -  Global Variables in Reporting
    RSZCHANGES  Change history of reporting components 
    I am able to find out the Date and time but not the user name.  So could you please help on this.
    Regards
    Sankar

    i think u have missed it.
    RSZCOMPDIR IS THE ONLY TABLE WHICH PROVIDES THE DATA.
    ENTER TECHNICAL QUERY Name in RSZCOMPDIR-COMPID.
    RSZCOMPDIR-TSTNAM gives you the user id of sap bw user who made the change.
    RSZCOMPDIR-TSTPDAT gives you date on which  change was made .
    RSZCOMPDIR-TSTPTIM   gives you timestamp on which  change was made .
    all users details can be obtained from TCODE SU01 where you need to enter sap user id.
    You can also get user name( description) by using tcode SE09 and entering above sap user id.

  • Combine two reports in query designer using key figure with sap exit

    Hi experts,
    i want to combine two reports in query designer using key figure with sap exit
    in the report 1 key figure calculation based on the open on key date(0P_DATE_OPEN)
    to calculate due and not due in two columns
    in report 2 key figure calculate in the time zones using given in variable Grid Width (0DPM_BV0) like due in 1 to 30 days, 31 to 60 days...the due amount based on the open on key date(0P_DATE_OPEN)
    to calculate in 1-30, 31-60, 61-90, 91-120, 121-150 and >150 days in 6 columns
    now i have requirement like this
    not due, 1-30, 31-60, >60, due,1-30, 31-60, >60 in 8 columns
    or
    not due, due, 1-30, 31-60, 61-90, 91-120, 121-150 and >150 in 8 col
    thank you

    Hi Dirk,
    you perhaps know my requirement,
    for the management to make used in one report,
    we have in reporting finacials Ehp3.
    Vendor Due Date Analysis - which show due, not due
    Vendor Overdue Analysis - show only due and analysis in time grid frame
    i want to combine in one report that show NOT DUE, DUE, DUE time frames in grid.
    krish...

  • How to find out where a query is used in a FMS and or Form?

    Hi Experts,
    How can I find out quickly where a query is used in which fms and / or form?
    thx,
    Richard

    Hi Richard,
    Try this:
    SELECT T2.FormID, T2.ItemID, T2.ColID,
    T1.CatName,T0.Qname FROM [dbo].[OUQR] T0
    INNER JOIN [dbo].[OQCN] T1 ON T0.QCategory = T1.CategoryId
    INNER JOIN [dbo].[CSHS] T2 ON T2.QueryId = T0.IntrnalKey
    ORDER BY T2.FormID
    Thanks,
    Gordon

  • Query rule using query variables

    Hi All,
    I am working on a query rule in SharePoint 2013. I am trying to build a query text using query variables to provide profile based results to the users. The query text which I am using in the query builder is of the following format:
    {SearchBoxQuery} CombinedLanguage:{User.PreferredContentLanguage}
    but its not taking the user.preferredcontentlanguage value. Has any one worked on similar type of query rules using query variables? Please share your suggestions.
    Thanks !!

    Hi,
    As I understand, you cannot get the user.preferredcontentlanguage value.
    1. Make sure you have set the value of query variable {user.preferredcontentlanguage}, it will return -1 if not set.
    2. Make sure you search in the right result source.
    3. Please check the crawled property mapped to the managed property CombinedLanguage and make sure that there is at least one value indexed by the crawled property equal to the {user.preferredcontentlanguage}.
    The article below is about the query variables.
    https://technet.microsoft.com/en-us/library/jj683123.aspx
    The article below is about the different query variables return different result examples.
    http://techmikael.blogspot.in/2014/05/s15e03-query-variables-constant-trouble.html
    Best regards
    Sara Fan
    TechNet Community Support

  • Linking Access tables, creating a query with using both Access and Oracle

    Hello,
    I am using 3.0.04.34 version Oracle Developer. I am supposed to create a script/procedure to use both Access tables and oracle tables together. There is an option in developer to copy the access tables into oracle. But it doesn't help me. Because when we updated the access tables
    the copied ones are not be updated. How can I created a linked access tables to oracle and create a query with using both access and oracle table together.
    I will appreciate if you guys help me. I look forward to hearing from you guys.
    Thanks,
    Pinar

    Pinar,
    to be able to query MS Access tables in Oracle you need an additional product, the Oracle Database Gateway for ODBC. It allows you to link any foreign database into an Oracle database using a suitable ODBC driver. You can then access the MS Access tables through a database link based on the Database Gateway for ODBC. This will also allow you to join local Oracle and remote MS Access tables from your Oracle database.
    There's a note on My Oracle Support which gives you more details:Document 233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases - For example - DB2, SQL*Server, Sybase, Informix, Teradata, MySQL
    And there's also a dedicated Forum: Heterogeneous Connectivity

  • How to use Vendor Hierarchy in Vendor Rebate Agreements

    Hi Friends,
    I need to use vendor hierarchy in vendor rebates agreements.
    Here are some inputs from my end so far I have done:
    Customizing Settings for vendor hierarchy and rebate agreement (agreement type 3000 and condition types A003/ A004) have been done.
    While creating the PO after creating rebate agreement (MEB1) I am able to see all higher partner functions (2A,2B,2C,2D) at header level in PO under partners.
    I have (say ) 3 vendors V1, V2, V3 (V1 being highest) set up in vendor hierarchy (MKH1).
    My requirement is; if my company make any rebate agreement with vendor at any node below the highest in the vendor hierarchy then that business volume should be taken in consideration for rebate purpose with the vendor at higher level while making any agreement with him.
    I request you to please let me know how to set up this.

    Hi lvshaolong,
    Thanks a lot for your reply.
    I believe I have not misunderstood the business scenario.
    But may I request you to tell me the process steps for the senario you told which is "Normally , you define condition with highest node in hierachy and then you can refer to it when you do biz with the lower nodes". How vendor rebate process takes place this scenarion (I mean process flow).
    This might help me to find some solution further.
    More input from my end:
    When I am creating the PO against a vendor included in the vendor hierarchy(after agreement), rabate condiion A003  or A004 is not appearing in pricing and hence during BV comparison,system does not find any data to update.
    Regards,
    Munish

  • How to use position hierarchy for approval in custom workflow ?

    Dear All,
    I have created a custom workflow which fires when ever a new supplier site is created.
    Now I want to add approval hierarchy in this flow. For that I want to use Position Hierarchy.
    I have not find useful resources for doing that. Can you please help me?
    Regards,
    Rubayat

    Hi;
    Please review:
    How to Create a New Position Hierarchy [ID 437489.1]
    Adding Positions to a Hierarchy from Another Business Group [ID 356127.1]
    How To Determine Position Controlled Organizations In The Hierarchy? [ID 549628.1]
    How Does One Create and/or Update Position and Position Hierarchy in HR Using an API? [ID 736443.1]
    Using AME, How To Create Approval Routing To a Certain Position In HR Position Hierarchy [ID 1501433.1]
    Regard
    Helios

  • How can i fetch records from 3 tables in a single query  without using join

    Hi.
    Can any body please tell me <b>How can i fetch records from 3 tables with a single query  without using joins</b>
    Thanx
    prabhudutta

    Hi Prabgudutta,
    We can fetch the data by using the views concept.
    Go throuth this info we can know the how to create view and same like database table only we can fetch the data.
    Views conatin the data at runtime only.
    Four different view types are supported. These differ in the
    way in which the view is implemented and in the methods
    permitted for accessing the view data.
    Database views are implemented with an equivalent view on
    the database.
    Projection views are used to hide fields of a table (only
    projection).
    Help views can be used as selection method in search helps.
    Maintenance views permit you to maintain the data
    distributed
    on several tables for one application object at one time.
    step by step creation of Maintenance view:
    With the help of the table maintenance generator, you are able to maintain the ENTRIES of the table in SM30 transaction.
    It can be set in transaction SE11 - Tools - Table maintenance generator.
    Table maintanance Generator is used to manually input values using transaction sm30
    follow below steps
    1) go to se11 check table maintanance check box under attributes tab
    2) utilities-table maintanance Generator-> create function group and assign it under
    function group input box. Also assign authorization group default &NC& .
    3) select standard recording routine radio in table table mainitainence generator to move table
    contents to quality and production by assigning it to request.
    4) select maintaience type as single step.
    5) maintainence screen as system generated numbers this dialog box appears when you click on create button
    6) save and activate table
    One step, two step in Table Maintenance Generator
    Single step: Only overview screen is created i.e. the Table Maintenance Program will have only one screen where you can add, delete or edit records.
    Two step: Two screens namely the overview screen and Single screen are created. The user can see the key fields in the first screen and can further go on to edit further details.
    SM30 is used for table maintenance(addition or deletion of records),
    For all the tables in SE11 for which Table maintenance is selected , they can be maintained in SM30
    Sm30 is used to maintain the table ,i.e to delete ,insert or modify the field values and all..
    It creates the maintenance screen for u for the aprticular table as the maintenance is not allowed for the table..
    In the SE11 delivery and maintenance tab, keep the maintenance allowed..
    Then come to the SM30 and then enter the table name and press maintain..,
    Give the authorization group if necessary and give the function group and then select maintenance type as one step and give the screen numbers as system specified..
    Then create,,,
    Then u will able to see the maintenance view for the table in which u can able to insert and delete the table values...
    We use SM30 transaction for entering values into any DB table.
    First we create a table in SE11 and create the table maintenance generator for that Table using (utilities-> table maintenance generator) and create it.
    Then it will create a View.
    After that from SM30, enter the table name and Maintain, create new entries, change the existing entries for that table.
    Hope this resolves your query.
    Reward all the helpful answers.
    Rgds,
    P.Naganjana Reddy

  • How to know whether a particular query is using the aggregates

    hi all....
    im very new to this group so plz help me out.....anyway hi to all ....
    There are many aggreegates are there but how to know which query is using perticular a?gregates

    Hi,
    use query monitor screen RSRT and select the option execute + debug . and u can have the option of checking display aggreagates for that query!
    cheers,
    ravi

Maybe you are looking for

  • My iPhone 5s got wet, I kept it in rice for 10 days, then it worked perfectly for 2 days. Now it´s dead, won´t turn on.

    My iPhone 5s fell in the toilet 2 weeks ago and it was in contact with water for 5 to 10 seconds. It almost immediately turned itself off. After that, I didn´t turn it on again and left it in rice for 10 days. After that, I turned it on and it was in

  • Jabber for MAC 9.2.1 doesn't use jabber-config.xml

    Hi all, I'm deployng jabber for mac 9.2.1 with on premises  IM&Presence (9.1) and CUCM (9.1) All works fine (jabber for windows, for tablet and Ipad). The only issue seem to be with Jabber for MAC. The search in corporate Directory fail. Below you co

  • Does anyone from Apple read these forums?

    If a representative from Apple would read these posts, doesn't it seem like all of us who are having the same problem (the iPod Mini not being recognized by iTunes 6.0.1) would have been fixed already? Check out the number of posts that ALL have to d

  • Outlook: "Send Immediately when connected" not working for Word 2010

    When i disable the option in Outlook "Send Immediately when connected" the messages are placed in the Outbox until i send them manually. But when i want to send a Word 2010 document from within Word 2010 by E-Mail the message is send immediately. Is

  • Freeze row at the bottom

    I am trying to create a spreadsheet for a small non-profit to create a budget, I want to freeze the row that it the bottom of each column so that the totals are always visible. The cells above can be scrolled up or down but the bottom stays the same.