Heirarchy

Hi,
I have a table 'ABC' like this
parent child
3 30
3 31
3 32
3 33
30 300
30 302
31 312
31 313
30 301
32 32
iam creating hierarchy path from this table using the following query
select parent,child,sys_connect_by_path(child,'/') || '/' path
from ABC
start with parent='3'
connect by prior parent=child
iam getting the following error
SQL Error: ORA-01436: CONNECT BY loop in user data
01436. 00000 - "CONNECT BY loop in user data"
this is beacuse parant and child was same(32,32)
if we use connect by nocycle it is eliminating the last row
how to solve the problem
can any one help me?

select parent,child,sys_connect_by_path(child,'/') || '/' path
from ABC
start with parent='3'
connect by prior parent=child
iam getting the following error
SQL Error: ORA-01436: CONNECT BY loop in user data
01436. 00000 - "CONNECT BY loop in user data"What version of oracle are you using
I don't get error
SQL> r
  1  with data as (
  2  select 3 parent,30 child from dual union all
  3  select 3,  31 from dual union all
  4  select 3,  32 from dual union all
  5  select 3,  33 from dual union all
  6  select 30, 300 from dual union all
  7  select 30, 302 from dual union all
  8  select 31, 312 from dual union all
  9  select 31, 313 from dual union all
10  select 30, 301 from dual union all
11  select 32, 32 from dual
12  )
13  select parent, child , sys_connect_by_path ( child ,'/') xc
14  from data
15  start with parent = 3
16* connect by prior parent = child
    PARENT       CHILD XC
         3          30 /30
         3          31 /31
         3          32 /32
         3          33 /33You can use NOCYCLE key word if you get this error http://www.adp-gmbh.ch/ora/sql/connect_by_nocycle.html
SQL> r
  1  with data as (
  2  select 3 parent,30 child from dual union all
  3  select 3,  31 from dual union all
  4  select 3,  32 from dual union all
  5  select 3,  33 from dual union all
  6  select 30, 300 from dual union all
  7  select 30, 302 from dual union all
  8  select 31, 312 from dual union all
  9  select 31, 313 from dual union all
10  select 30, 301 from dual union all
11  select 32, 32 from dual
12  )
13  select parent, child , sys_connect_by_path ( child ,'/') xc
14  from data
15  start with parent = 3
16* connect by NOCYCLE prior parent = child
    PARENT       CHILD XC
         3          30 /30
         3          31 /31
         3          32 /32
         3          33 /33SS

Similar Messages

  • Manager Heirarchy is not getting displayed in P&L Dashboard

    Hi All,
    I have implemented the P&L Dashboard for Financials. Suddenly, It is not displaying the Manager Heirarchy in the Manager Parameter in the P&L Dashboard.
    Did anyone faced the same kind of problem, please throw some light.
    Regards,
    Chandana

    Hi,
    Thank you All.
    Regards,
    Shruti B.

  • How to Display Heirarchy and Character at a time in the report...

    Hi
    I have a req ...where I need to design a query to display a character and its heirarchy colum by colum...I mean, I have document type master data info object it has texts and Heirarchy data source...and we loaded this data...Also we have document type directly coming from ECC  Transactional DS...Now When I take this document type and do not select heirarchy its displaying the document types (KN,KA ,KR etc...)..If I select the heirachy in my query..its displaying in heirarchy structure and the document types (KN,KA,KR ) are displaying as the last nodes. But I want to display the heirarchy and also the document type in 2 diff colums... how it would be possible..is there any thing needs to be done at query level / do i need to take a RKF / CKF and write any code to bring heir and info object value?
    Iam bit confused here..pelase advice ASAP.
    regards

    you cannot have the same character in the query twice.  You can either have it in the hier format or just the char.
    I am wondering why you need to display the same characters twice in each column.
    The best way is to have them in the hier. format and in the char. properties expand the node level as you want so you will see them in the detail level.
    assign points if helpful

  • When create heirarchy, can not find the entry which is in master data

    Hi, SDNs
        When create a heirarchy for a char , click this char button to add a fields to a node, i can't search the value which is actually in the master data.
       Thansk for your time

    If you go to create hierararchy or change mode of hierarchy
    3 types of nodes you can create
    1)Text node
    2)Charecteristic node
    3)Infoobject values node
    text node - is simple any text node you can create
    infoobject values node - if the master data is loaded you can create it
    if master data is loaded make sure its activated and no master data is under "M" version.
    charecteristic node - only if particular infoobject node is included in the tab "external chars in hierarchies" in RSD1 of that particular infoobject
    Hope it Helps
    Chetan
    @CP..

  • Product heirarchy vs material groups for sales

    Hi,
    Can I make use of the material groups(5 in toatl in sales view1) to generate report for seeing the value/sale of any material instead of using product heirarchy ?
    If I have created a 3 level heirarchy then how best I can use it to see in a report for any level.
    Is there any standard report availble to track my sales/inventory needs based on product heirarchy ??
    How can I track my purchases/open orders based on the employee resonsible for that material.i.e without having any HR module how can use the or create the staff of my company engaged in purchasing or for that matter selling also.
    May be I can use Purchasing group for each employee.But then I need to use the same employee as Sales person.
    How can this be achieved or any better option ??
    Thanks in advance.
    Regards,
    Manoj

    Redundant.Has been reposted in MM forum.Do not reply here

  • Product heirarchy vs material groups in sales view

    Hi,
    Can I make use of the material groups(5 in toatl in sales view1) to generate report for seeing the value/sale of any material instead of using product heirarchy ?
    If I have created a 3 level heirarchy then how best I can use it to see in a report for any level.
    Is there any standard report availble to track my sales/inventory needs based on product heirarchy ??
    How can I track my purchases/open orders based on the employee resonsible for that material.i.e without having any HR module how can use the or create the staff of my company engaged in purchasing or for that matter selling also.
    May be I can use Purchasing group for each employee.But then I need to use the same employee as Sales person.
    How can this be achieved or any better option ??
    Thanks in advance.
    Regards,
    Manoj

    Hi,
    Have you considered using the partner functions to do this.
    Most organisations create a new partner type for saleperson (i.e. someone who earns the commision from the sale). This can automatically default if you have  the correct master data settings, or can be keyed manually on the partner screen of the sales order. (ask about how to do this on the SD forum, I am sure that an SD expert can tell you the details on how to do this.
    I definitely would NOT recommend considering using the Purchasing group, this is not a field to use for this purpose in any way.
    The material group and material hierarchy are fine to use for reports on WHAT was sold, but not who by etc.
    Steve B

  • MS Word property descriptions or heirarchy?

    I am formatting test reports that I am creating via LabVIEW in MS Word 2000 on NT. The new LabVIEW 6.0.2 Report Generation Toolkit with Word vi's are great but incomplete. My huge hurdle for formatting directly with properties and methods is that there are no descriptions or a heirarchy showing the relationships between all of them. Does anyone know where I can find this documentation? NI does not offer this support, yet.

    As i had and will have to deal with those property and invoke nodes, i'd be interested in knowing that, but for now the only way i have found is using VBA (Visual Basic for Applications), most of the properties are detailed there. It also helped me to build my program, when i have a problem doing something programatically, i record a macro and analyze the results, applying them to LabVIEW.
    Hope this helps

  • How can an ADF Tree be configured to work with varying levels of heirarchy?

    We have a need for a Locations tree that represents the Locations heirarchy for any one of our clients. Depending on the client the number of levels in a location heirarchy could range from 1 to 9.
    I have created 9 different tree bindings and I can change the tree binding in the jsp page - the example below is for a client with 4 location levels.
    <af:tree value="#{bindings.ScdLocs4View1.treeModel}" var="node"
    binding="#{backing_locations.tree2}" id="tree2">
    For a client with 5 location levels, I'd like to programatically change the value to
    #{bindings.ScdLocs5View1.treeModel.  How can I do this?
    I was thinking I could use the setValue method on the tree control in my page's backing bean.  But I have been unable to get a reference to the tree binding.
    I don't see an appropriate method for finding a Tree Binding.  There are methods for finding an Iterator Binding, an Executable Binding, or a Region Binding (whatever that is).  But how do I "find" a reference to a Tree Binding?
    I have also given consideration to using a single Tree Binding with 9 levels (or rules in the Tree Binding Editor) and finding a way to  programatically "start" the rendering at a particular level (or rule) - in effect telling the ADF Tree control to ignore some number of rules and begin with the specified rule.  But I haven't been able to figure out how to do this either.
    Help would be greatly appreciated.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Bill,
    A tree binding is a particular kind of control binding, so you can find it as a control binding and then cast it to the more specific interface to work with it.

  • Short Dump while Activating a Heirarchy

    Hi Experts,
    I have a hierarchy which is in M version, I am trying to copy hierarchy from Quality to Dev system.
    The hierarchy in DEV system is in M version. When I try to activate the Hierarchy I am getting a short dump which I am not able to understand.
    I have tried also with the ABAP programe to activate it but still I am getting this.
    Sorry to paste all the dump but can any one advise what could be reasons behind heirarchy not getting activated.
    Thanks,
    Tati.
    Please find the Dump message.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "CL_RSSH_MESSAGE_HANDLER=======CP" had to be
         terminated because it has
        come across a statement that unfortunately cannot be executed.
    What can you do?
        Note down which actions and inputs caused the error.
        To process the problem further, contact you SAP system
        administrator.
        Using Transaction ST22 for ABAP Dump Analysis, you can look
        at and manage termination messages, and you can also
        keep them for a long time.
    Error analysis
        Only message types A, E, I, W, S, and X are allowed.
    Information on where terminated
        Termination occurred in the ABAP program "CL_RSSH_MESSAGE_HANDLER=======CP" -
         in "CALL_MESSAGE".
        The main program was "RSSH_HIERM_START_NEU ".
        In the source code you have the termination point in line 11
        of the (Include) program "CL_RSSH_MESSAGE_HANDLER=======CM003".
    Source Code Extract
    Line  SourceCde
        1 METHOD call_message .
        2
        3   FIELD-SYMBOLS: <l_s_msg> TYPE gt_s_msg.
        4
        5   READ TABLE p_t_msg INDEX 1 ASSIGNING <l_s_msg>.
        6   IF sy-subrc <> 0.
        7     MESSAGE x000.
        8   ENDIF.
        9
       10   <l_s_msg>-handled = rs_c_true.
    >>>>>   MESSAGE ID <l_s_msg>-msgid TYPE <l_s_msg>-msgty NUMBER <l_s_msg>-msgno
       12     WITH <l_s_msg>-msgv1 <l_s_msg>-msgv2 <l_s_msg>-msgv3 <l_s_msg>-msgv4.
       13
       14
       15 ENDMETHOD.                    "CALL_MESSAGE

    Hi Prasad,
    Have you changed the 'Object Status' from INA to ACT when using the program RSDG_TRFN_ACTIVATE?
    You can also refer to the note SAP Note 1030987 - Activation of transformations dumps
    regards,
    Ashvin

  • Issue while creating a heirarchy using Hierarchy Structure Time dependent

    Hi every body
    I created an Info object(SREP) with Heirarchy Strututre Time Dependent property. When i am creating an Heirarchy for the info object(SREP) i am not able to see any text node by default, do we need to create it explicitly or system would propose one node by defalut..
    I created a text node manually then and tried to assign an another info object(SREG) as a child using an option of "Insert Characterstic", but i am getting a message as "InfoObject SREG is not entered for InfoObject SREP as a Foreign Heirarchy Characterstic", and system is again proposing to assign some info object as a child.
    Thanks in advance..
    sekhar

    ok

  • Error while Displaying Heirarchy in Bex Report

    Hi All,
    plz Solve my problem,
    In the report Heirarchy displaying like notAssignedmaterial with one level, but my Heirarchy contain 8 levels.
    Plz Guide me
    Thanks in Advance
    Anil

    Hi Anil,
    Please run the Heirarchy attribute change run.  It may give u the desired solution.
    Administrator workbench-menubar Tools- apply hierarchy attribute change run.
    after doing this run the query and check if the values are coming.
    Hope it would help u
    Mohan

  • Gl account heirarchy

    Hello,
    we have a heirarchy for gl accounts in our BI system replicated from R3.The datasource providing data to it is GSBH_HIERARCHY_TRANSFER_SETS.
    Now, we are getting an error when we are running the report.When we run the report based on this Gl heirarchy we have to then give the Gl account number.and then when we press check it comes up with the chart of account and then gl account number.eg it comes up like 2000\gl  account.
    But since a couple of days when we are running the report when we press check it is coming up with 2000\20000gl account number.now due to this we when we run the report it comes up with no data available.
    when i go and then do selection from within the report we are getting 2 names for one record.One is just the gl account number and the other is 4000gl account number.Now the 4000gl account number shoudnt be in the list.
    now i checked the heirarchy nodes whcih are defined and the number ranges given in them is like 4000gl account.
    now is it because of this there will be a problem.
    in the master data as well we have got 2 records for 1 gl account.One is just tehe gl account number and the other is 4000gl account number.
    I tried to delete the 4000 one form the master data but after doing that if i again do a delta load the  record comes up.
    please can someone assist me.

    Now is it possible that because the heirarchy nodes is beeen defined as 4000xxxx when we are loading attribute data to the cube we are only getting the Gl account number. Is it possible that because as the heirarchy is defined it is creating new record as 4000xxxx in the master data.
    Run the transaction datasource in RSA3 and see if you can find this 4000XXXX...may be that made an entry into master data table.
    Is there any data stored in heirarchy or not.
    Hierarchy data is stored in hierarchy table, no transaction data is stored in the hierarchy table...not sure what exactly you wanted to ask.
    When we have a compunded char to a info object and we are defining a heirarchy for it.Will we define the heirarchy nodes as compunded char and then info object.
    Like we have controlling area 4000 attached to gl account number rdsd.Now when we define a heirarchy node for this will it be 4000RDSD.
    Yes.
    What is your question here ?

  • Heirarchy values are not displaying correctly in report.

    Hi,
    I am having a heirarchy field in my report.
    I have 2 local RKF's in my report and 2 manadatory variables(which are FISCAL YEAR AND CAL MONTH).
    When i am executing the report , it is displaying the Heirarchy values with respect to one restricted KF.
    The heirarchy values correspoding to other RKF are not getting displayed properly, it is showing as (NOT Assigned).
    Its giving the correct values for the RKF's but not showing the  heirarchy values.
    I hided the 2nd RKF, then also its showing in the same way.
    Please help me on this,
    Thanks in advance!

    Hi, Saro,
    >
    I have taken a std. report to customize, and the name of the report is Asset Retirements from Fixed Asset module.
    From the existing base query, i have added some query to customize it.
    I have summed  the cost column in the report using summary column.
    For example, im passing a parameters which displays 5 lines in the report output. Im getting the cost value correctly in all the 5 lines, but when i tried to sum all the 5 lines, it is taking the first line of cost value and it is not summing the cost value of all the 5 lines in the report. I dont know why this problem occurs.
    Summary column should be place one level up of the query and set the following values under summary
    Function
    Source
    Reset As

  • ADF bindings are not working with inheritance heirarchy.

    ADF bindings are not working with inheritance heirarchy. I am using embedded OC4J in JDeveloper 10.1.3.2.
    For the data model I have the following objects\attributes.
    1) User (abstract EJB 3.0 POJO)
    - Id
    - userId
    - userName
    2) Employee -> extends User (EJB 3.0 POJO)
    - enabled
    - password
    3) Manager -> extends Employee (EJB 3.0 POJO)
    - numOfEmployees
    4) UserSessionBean (Stateless Session Bean)
    - public User findUserByUserId(String userId)
    - public List<User> queryUserFindAll()
    - Object mergeEntity(Object entity)
    I created 2 JSF pages using ADF.
    1) ListUsers.jspx - Lists all the users of type Employee and Manager in a table. You can select an user and chose to modify the user details using a modify button.
    2) ModifyUser.jspx - Modify the selected user and persist the modified user details.
    I implemented ListUsers.jspx by dragging and dropping queryUserFindAll() method from the ADF datacontrol on to the JSF page and selected ADF Table format with selection enabled.
    Similarly for the ModifyUser.jspx page I dragged and dropped the User object returned by findUserByUserId(String userId) and selected ADF Form format. I selected OutputText field types for userId and userName.
    I then created a navigation case from ListUsers.jspx to ModifyUser.jspx and pass the selected user.
    Now when I try to run the web application, ListUsers.jspx correctly displays all the users. Then I select a user of type Employee and click on the modify button. This brings up the ModifyUser.jspx page. However, the UserId text field displays the value for "Id" field rather than "userId".
    Question that I have is:
    - Why is ADF framework not able to retrieve the appropriate user attribute value for a Employee based on the binding information in case of inheritance ?
    Thanks,
    Piyush

    Hi,
    tried with JDeveloper 10.1.3.3 and this works for me. Try JDeveloper 10.1.3.3 - if it doesn't work, have a closer look at your sessionFacade
    Frank

  • Deployment error when modifying measures and my heirarchy

    I am working on Lesson 3 on analysis services tutorial where i am modifying measures and my heirarchy
    and this is my error message.
    Warning 1 Dimension [Date] : Avoid visible attribute hierarchies for attributes used as levels in user-defined hierarchies. 0 0
    Warning 2 Dimension [Customer] : Avoid visible attribute hierarchies for attributes used as levels in user-defined hierarchies. 0 0
    Warning 3 Dimension [Product] : Avoid visible attribute hierarchies for attributes used as levels in user-defined hierarchies. 0 0
    Warning 4 Dimension [Product] : Define attribute relationships as 'Rigid' where appropriate. 0 0
    Warning 5 Errors in the OLAP storage engine: A duplicate attribute key has been found when processing: Table: 'dbo_DimDate', Column: 'CalendarQuarter', Value: '4'. The attribute is 'Calendar Quarter'. 0 0
    Error 6 Internal error: The operation terminated unsuccessfully. 0 0
    Error 7 Server: The current operation was cancelled because another operation in the transaction failed. 0 0
    What can i do to fix this?

    Hi Cook959,
    In your scenario, it seems that the issue was related to the error message.
    Errors in the OLAP storage engine: A duplicate attribute key has been found when processing: Table: 'dbo_DimDate', Column: 'CalendarQuarter', Value: '4'. The attribute is 'Calendar Quarter'. 0 0
    There are many reasons that can cause this issue, here are some blogs which list the reasons and explanation, please refer to the links below to see the details.
    http://ms-olap.blogspot.com/2009/11/duplicate-attribute-key-has-been-found.html
    http://blog.oraylis.de/2013/08/a-duplicate-attribute-key-has-been-found-during-processing-revisited/
    Hope this helps.
    Regards, 
    Charlie Liao
    TechNet Community Support

  • Track changes for Standard Heirarchy Cost Center details( Tcode: OKEON)

    Hi all,
    I have a requirement to track the changes for <b>Standard Heirarchy Cost Center</b> data and whenever it change i need to initimate with email to certain group of people in organization.
    Transaction code : OKEON .
    Whenever standard heirarchy get changes then i need to send email to certain group people .
    My findings and questions are as follows :
    1. I understand that the changes can be track by using CDHDR table .
    2. What is Object Class for Standard Heirarchy Cost Center  ?
    3. Is there any standard report available for that please let me know .
    4. How to track the changes when Cost center Group got changes ?
    5. Is there any exits or BADI for this requirement ?
    Please respond this question as soon as possible . For every useful answer points will be awarded.
    Appreciate your help.
    Thanks.
    Mark

    You can try using the option GoTo - Change Documents, which is available, when you display cost center hierarchy.
    Regards
    Rakesh Pawaskar

Maybe you are looking for