Copy Top node of a hierarchy to the leaf node of another - within dimension

Hi,
Scenario is, user uploads monthly data in the respective leaf nodes of Monthly Input hierarchy. But at a later stage user might want to adjust figures directly on the Annual level.
For that matter I've got 2 hierarchies in Time Dimension, which look like as below:
Monthly Input
2007.TOTAL
2007.Q4
2007.Dec
2007.Nov
2007.Oct
2007.Sep
2006.TOTAL
Annual Input
xxxx.ANL
2009.ANL
2008.ANL
2007.ANL
I could think of two solutions:
1- To upload monthly data directly into .ANL leaf nodes and add signed data values w.r.t. key dimensions and YEAR. Problem is Append functionality isn't available if you loading/importing data from flat file. Can guide me if, somehow, it is workable or not? 
2- To copy the .TOTAL nodes to the respective member of  .ANL nodes (e.g. 2007.TOTAL to 2007.ANL). I'm not sure if it is possible or not?
Many thanks in advance for more suggestions and earliest reply.
Regards,
Shabbar
Edited by: Ali Shabbar on Jun 30, 2009 1:00 PM

Hi Shabbar,
If I was faced with the requirement to provide a means for allowing both monthly inputs and annual adjustments, I would use one hierarchy, rather than trying to sync signdata values between two hierarchies.  With the structure I've shown below, users could report on unadjusted values with 2007.YEAR, annual adjustments with 2007.ADJ or both with 2007.TOTAL.
2007.TOTAL
|
|--2007.ADJ
   |--2007.ANL
|
|--2007.YEAR
   |--Q4
       |--2007.DEC
       |--2007.NOV
       |--2007.OCT
Best regards,
[Jeffrey Holdeman|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/jeffrey+holdeman]
SAP BusinessObjects
Enterprise Performance Management
Regional Implementation Group

Similar Messages

  • Alternate hierarchy with only the Leaf nodes

    Hi,
    I have an account hierarchy with multiple levels in it. Now I want to make an alternative hierarchy with only the leaf nodes of that hierarchy with using the same nodes. Can anyone please explain the steps how to do it.

    Unless you have any special requirements it will be straight forward, get an export of all the leaf members in an action script format and execute the INSERT action on your alternate hierarchy, you can create your alternate hierarchy with only the TOP node and insert the leaf members under it, in case you have thousands of them, you can split them by introducing dummy parents, also if you wish to maintain any local properties, please have them updated accordingly.

  • How to get the leaf node in a hierachy????

    if i get a record that a parent node in a hierachy table ,so how can i get the leaf node of this parent node quicklly?????thank you!

    Hi xuhuanjun ,
    Refer to the below threads which disucss the same.
    Re: how to ensure a hierarchy tree's node is a internal leaf???????
    Re: Retrieve Hierarchy Leaf Node using API.
    Hope it helps.
    Thanks,
    Minaz

  • How to make the leaf node of the APEX tree downloadable

    Hi All,
    I am trying to build a "library" page for my application, with the documents as the leaf nodes of the tree. The documents come from a database table, and each document is a BLOB.
    My question is, how should I write the "link" part of the APEX tree query to make the lead node document downloadable for the end users?
    Thanks,
    Christine

    Hilary helped me out of this by creating a new form page with two new items there corresponding to the PK and BLOB column, then in the tree query use apex_util.get_blob_file_src function as the link. Below is the email from Hilary:
    1. Created Form, page 13, based upon your table storing the documents as BLOBs. The form page has just two associated items: P13_DOC and P13_DOC_ID. The item P13_DOC is of type FILE and contains a source type of DB column, which is the first required parameters of the function get_blob_file_src. NOTE: I could have created a form region on the same page as your tree, but chose to generate a separate page. You may choose to change this yourself.
    2. Updated the Tree query on pg 12 to use the following link for tree nodes of level 4:
    apex_util.get_blob_file_src('P13_DOC',v.attr3)
    ...where P13_DOC is the application page item mentioned in step 1 above, and v.attr3 should hold the unique ID associated with the document. Your tree now allows users to download the listed documents.

  • Nodes unavailable for selection from the OUI Node Selection screen

    After successfully installing the grid infrastructure, The second node is not available fr selection while installing the database software.I am installing Release 11.2.0.1 on OEL 5.8 running on Esxi. These are two nodes And am using /etc/hosts file for IP resolution. cluster services are online on both nodes. I have even restarted them as per the docs but still can't see the node.

    I have two users, grid and oracle. These are the environments
    Oracle:
    Node1:
    [oracle@OELRacNode1 ~]$ env|grep ORA
    ORACLE_BASE=/u01/app/oracle
    [oracle@OELRacNode1 ~]$
    Node2:
    [oracle@OELRacNode2 ~]$ env|grep ORA
    ORACLE_BASE=/u01/app/oracle
    [oracle@OELRacNode2 ~]$
    This means I haven't set $ORACLE_HOME for the user oracle on both nodes before running the runInstaller for the database software.
    User grid:
    Node1:
    [grid@OELRacNode1 ~]$ env|grep ORA
    ORACLE_BASE=/u01/app/11.2.0/grid
    [grid@OELRacNode1 ~]$
    Node2:
    [grid@OELRacNode2 ~]$ env|grep ORA
    ORACLE_BASE=/u01/app/11.2.0/grid
    [grid@OELRacNode2 ~]$
    Password-less ssh has been set for the user grid:
    [grid@OELRacNode2 ~]$ ssh grid@OELRacNode1
    Last login: Mon Aug  5 12:41:29 2013 from 192.168.1.74
    [grid@OELRacNode1 ~]$
    [grid@OELRacNode1 ~]$ ssh grid@OELRacNode2
    Last login: Mon Aug  5 12:42:39 2013 from 192.168.1.74
    [grid@OELRacNode2 ~]$
    From primary (Node1):
    [grid@OELRacNode1 bin]$ ./crsctl check cluster -all
    oelracnode1:
    CRS-4537: Cluster Ready Services is online
    CRS-4529: Cluster Synchronization Services is online
    CRS-4533: Event Manager is online
    oelracnode2:
    CRS-4537: Cluster Ready Services is online
    CRS-4529: Cluster Synchronization Services is online
    CRS-4533: Event Manager is online
    [grid@OELRacNode1 bin]$ ./olsnodes
    oelracnode1
    [grid@OELRacNode1 bin]$
    [grid@OELRacNode1 bin]$
    From secondary (Node2):
    [grid@OELRacNode2 11.2.0]$ cd grid/bin/
    [grid@OELRacNode2 bin]$ ./crsctl check cluster -all
    oelracnode1:
    CRS-4537: Cluster Ready Services is online
    CRS-4529: Cluster Synchronization Services is online
    CRS-4533: Event Manager is online
    oelracnode2:
    CRS-4537: Cluster Ready Services is online
    CRS-4529: Cluster Synchronization Services is online
    CRS-4533: Event Manager is online
    [grid@OELRacNode2 bin]$
    [grid@OELRacNode2 bin]$ ./olsnodes
    oelracnode2
    [grid@OELRacNode2 bin]$
    I installed the grid infrastructure as grid
    I am installing rdbms as oracle.

  • Hiding a intermediate node in a Jtree without hiding leaf nodes

    Hi who can help me out of this problem. What my prob is dat i m interrested in hiding few intermediate nodes in JTree without hiding their children.
    Thanks
    Rakesh

    but how do you then expand to see the children? once the node is hidden, can you by any means expand/collapse it to view/hide the child leaves?

  • Display a particular node of Hierarchy in the Report.

    Hi , all
    I have an urgent requirement that i have to  display only a particular node(5) of Hierarchy in the Bw Report , I have tried different options available in the Hierarchy tab (That is Expand to level 5 , Position of lower node - Above , Value of posted node - Hide ) . But stil it is displaying 5 and then 4 node , but i don't want that 4 node .
    Can anybody gine me some useful suggestion .
    Thanks in advance..

    Hi Akash,
    - To show only particular nodes of a hierarchy in the Excel sheet:
    Step 1: include the base characteristic
    Step 2: select the hierarchy (properties of the characteristic) - (display key only)
    Step 3: user restrict (from context menu of the characteristic) on the nodes that you want to display.
    Step 4: expand to level: 1 (properites of the characteristics)
    This should serve the purpose.  I know it is a little late, but it might be helpful in the future

  • Stored Procedure- Multil level employee hierarchy in the same row

    I have an employee table where I have employee details  which includes the following properties:
    EmployeeID, EmployeeName, ManagerID, DesignationCode.
    ManagerID maps to EmployeeID in the Emp table. DesignationCode is to identify the employee designation.
    The topmost person of the organization could be identified by : whose DesignationCode is 'XX' and ManagerID=EmplyeeID.
    Here, 'XX' is fixed and will not change.
    Also, we know there could be a maximum of 10 level for each hierarchy.
    Example: Employee1 reports to Manager1 who reports to Manager2 who reports to Manager 3 ..... who reports to ManagerN.
    I need to pull a hierarchy in the below format:
    EmpName  MgrName0   MagrName1   MgrName2 ..........MgrName7  MgrName8 
    MgrName9
    SAMRAT                                                                      
                                XXX                XXX
    SUDHAKAR                                                                   
      XXX                 XXX                XXX
    SATESWAR                                                                   
                              XXX                XXX
    SRINI               XXX                  XXX                      
              XXX                 XXX                XXX
    IMPORTANT POINT: We need to identify the reporting hierarchy level for each employee's manager and then place the manager names accordingly based on the columns.
    Example:
    If an employee's manager has only 1 reporting manager(who is at top level), then he would be placed at the column "ManagerName8" and ManageName9 would be the topmost employee of the organization
    In short, we need to identify the reporting level at which the employees manager belongs and then start filling the columns values for that row ( employee details)
    I am stuck and unable to do the same. Please help.
    Thank you.

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
    use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. 
    >> I have an employee table where I have employee details <<
    An SQL programmer would have a Personnel table instead. What you have said is that you have only one employee! 
    >> which includes the following properties:
    emp_id, emp_name, manager_emp_id, designation_code.<<
    Why do you think that a manager is an attribute of an employee? This is absurd! They have a relationship; where is the table that models that relationship? It is missing from this non-normalized, improperly designed table. 
    There are many ways to represent a tree or hierarchy in SQL. YOU are trying to use an adjacency list model. This approach will wind up with really ugly code -- CTEs hiding recursive procedures, horrible cycle prevention code, etc.  
    Another way of representing trees is to show them as nested sets. 
    Since SQL is a set oriented language, this is a better model than the usual adjacency list approach you see in most text books. Let us define a simple OrgChart table like this.
    CREATE TABLE OrgChart 
    (emp_name CHAR(10) NOT NULL PRIMARY KEY, 
     lft INTEGER NOT NULL UNIQUE CHECK (lft > 0), 
     rgt INTEGER NOT NULL UNIQUE CHECK (rgt > 1),
      CONSTRAINT order_okay CHECK (lft < rgt));
    OrgChart 
    emp_name         lft rgt 
    ======================
    'Albert'      1   12 
    'Bert'        2    3 
    'Chuck'       4   11 
    'Donna'       5    6 
    'Eddie'       7    8 
    'Fred'        9   10 
    The (lft, rgt) pairs are like tags in a mark-up language, or parens in algebra, BEGIN-END blocks in Algol-family programming languages, etc. -- they bracket a sub-set.  This is a set-oriented approach to trees in a set-oriented language. 
    The organizational chart would look like this as a directed graph:
                Albert (1, 12)
        Bert (2, 3)    Chuck (4, 11)
                       /    |   \
                     /      |     \
                   /        |       \
                 /          |         \
            Donna (5, 6) Eddie (7, 8) Fred (9, 10)
    The adjacency list table is denormalized in several ways. We are modeling both the Personnel and the Organizational chart in one table. But for the sake of saving space, pretend that the names are job titles and that we have another table which describes the
    Personnel that hold those positions.
    Another problem with the adjacency list model is that the boss_emp_name and employee columns are the same kind of thing (i.e. identifiers of personnel), and therefore should be shown in only one column in a normalized table.  To prove that this is not
    normalized, assume that "Chuck" changes his name to "Charles"; you have to change his name in both columns and several places. The defining characteristic of a normalized table is that you have one fact, one place, one time.
    The final problem is that the adjacency list model does not model subordination. Authority flows downhill in a hierarchy, but If I fire Chuck, I disconnect all of his subordinates from Albert. There are situations (i.e. water pipes) where this is true, but
    that is not the expected situation in this case.
    To show a tree as nested sets, replace the nodes with ovals, and then nest subordinate ovals inside each other. The root will be the largest oval and will contain every other node.  The leaf nodes will be the innermost ovals with nothing else inside them
    and the nesting will show the hierarchical relationship. The (lft, rgt) columns (I cannot use the reserved words LEFT and RIGHT in SQL) are what show the nesting. This is like XML, HTML or parentheses. 
    At this point, the boss_emp_name column is both redundant and denormalized, so it can be dropped. Also, note that the tree structure can be kept in one table and all the information about a node can be put in a second table and they can be joined on employee
    number for queries.
    To convert the graph into a nested sets model think of a little worm crawling along the tree. The worm starts at the top, the root, makes a complete trip around the tree. When he comes to a node, he puts a number in the cell on the side that he is visiting
    and increments his counter.  Each node will get two numbers, one of the right side and one for the left. Computer Science majors will recognize this as a modified preorder tree traversal algorithm. Finally, drop the unneeded OrgChart.boss_emp_name column
    which used to represent the edges of a graph.
    This has some predictable results that we can use for building queries.  The root is always (left = 1, right = 2 * (SELECT COUNT(*) FROM TreeTable)); leaf nodes always have (left + 1 = right); subtrees are defined by the BETWEEN predicate; etc. Here are
    two common queries which can be used to build others:
    1. An employee and all their Supervisors, no matter how deep the tree.
     SELECT O2.*
       FROM OrgChart AS O1, OrgChart AS O2
      WHERE O1.lft BETWEEN O2.lft AND O2.rgt
        AND O1.emp_name = :in_emp_name;
    2. The employee and all their subordinates. There is a nice symmetry here.
     SELECT O1.*
       FROM OrgChart AS O1, OrgChart AS O2
      WHERE O1.lft BETWEEN O2.lft AND O2.rgt
        AND O2.emp_name = :in_emp_name;
    3. Add a GROUP BY and aggregate functions to these basic queries and you have hierarchical reports. For example, the total salaries which each employee controls:
     SELECT O2.emp_name, SUM(S1.salary_amt)
       FROM OrgChart AS O1, OrgChart AS O2,
            Salaries AS S1
      WHERE O1.lft BETWEEN O2.lft AND O2.rgt
        AND S1.emp_name = O2.emp_name 
       GROUP BY O2.emp_name;
    4. To find the level and the size of the subtree rooted at each emp_name, so you can print the tree as an indented listing. 
    SELECT O1.emp_name, 
       SUM(CASE WHEN O2.lft BETWEEN O1.lft AND O1.rgt 
       THEN O2.sale_amt ELSE 0.00 END) AS sale_amt_tot,
       SUM(CASE WHEN O2.lft BETWEEN O1.lft AND O1.rgt 
       THEN 1 ELSE 0 END) AS subtree_size,
       SUM(CASE WHEN O1.lft BETWEEN O2.lft AND O2.rgt
       THEN 1 ELSE 0 END) AS lvl
      FROM OrgChart AS O1, OrgChart AS O2
     GROUP BY O1.emp_name;
    5. The nested set model has an implied ordering of siblings which the adjacency list model does not. To insert a new node, G1, under part G.  We can insert one node at a time like this:
    BEGIN ATOMIC
    DECLARE rightmost_spread INTEGER;
    SET rightmost_spread 
        = (SELECT rgt 
             FROM Frammis 
            WHERE part = 'G');
    UPDATE Frammis
       SET lft = CASE WHEN lft > rightmost_spread
                      THEN lft + 2
                      ELSE lft END,
           rgt = CASE WHEN rgt >= rightmost_spread
                      THEN rgt + 2
                      ELSE rgt END
     WHERE rgt >= rightmost_spread;
     INSERT INTO Frammis (part, lft, rgt)
     VALUES ('G1', rightmost_spread, (rightmost_spread + 1));
     COMMIT WORK;
    END;
    The idea is to spread the (lft, rgt) numbers after the youngest child of the parent, G in this case, over by two to make room for the new addition, G1.  This procedure will add the new node to the rightmost child position, which helps to preserve the idea
    of an age order among the siblings.
    6. To convert a nested sets model into an adjacency list model:
    SELECT B.emp_name AS boss_emp_name, E.emp_name
      FROM OrgChart AS E
           LEFT OUTER JOIN
           OrgChart AS B
           ON B.lft
              = (SELECT MAX(lft)
                   FROM OrgChart AS S
                  WHERE E.lft > S.lft
                    AND E.lft < S.rgt);
    7. To find the immediate parent of a node: 
    SELECT MAX(P2.lft), MIN(P2.rgt)
      FROM Personnel AS P1, Personnel AS P2
     WHERE P1.lft BETWEEN P2.lft AND P2.rgt 
       AND P1.emp_name = @my_emp_name;
    I have a book on TREES & HIERARCHIES IN SQL which you can get at Amazon.com right now. It has a lot of other programming idioms for nested sets, like levels, structural comparisons, re-arrangement procedures, etc. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Hierarchy VIewer - Card only on Leaf nodes

    I am using version 11.1.2.3.0.
    Is there a way to show a Card only on the leaf nodes of the Hierarchy VIewer?
    I have information that only applies to the nodes on the very bottom of the tree.
    Thanks in advance.

    This should be possible.
    I've not tested this but you can use the rendered property of the panelCard component and set it to an EL which evaluates to false is the node has children (node.hasChildren? or some other data which lets you know if you want to show the card).
    If this does not work you leaf the rendered property as is and use the visible or rendered property of the component which holds the information you only want to show in leaf nodes.
    Timo

  • Preferences.removeNode() doesn't actually remove the preference node

    I have the following method in a class I use to modify system preferences:
        public boolean removePreferenceNode (String nodePath)
            throws BackingStoreException {
            // get the preferences node specified by the node path
            Preferences node = preferences.node(nodePath);
            if (node != null) {
                // remove the node and persist the change
                node.removeNode();
                node.flush();
                // success
                return true;
            // the preference node referenced by the node path was never found
            return false;
        }This code appears to work fine (the return value is always true when I provide a valid node path), but when I run it and then look at the preferences under $JAVA_HOME/jre/.systemPrefs I still see the node in the prefs.xml. This is happening regardless of whether the program that uses the prefs is running or not. I get the same behavior on a Windows machine when I view the preferences using regedit.
    Can someone please tell me what I'm missing here? Thanks in advance for your help.
    --James                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    The thread you’re referring to discusses POP account issues, but it looks like you’ve set up your .Mac account as type .Mac or IMAP (.Mac is basically the same as IMAP). The Remove copy from server setting that the OP was talking about in the other thread does not even exist if the account is set up as .Mac or IMAP, so there is no way you may have done everything described there...
    the mail still sits on the .Mac server.
    And it will remain there as long as you keep it in Mail’s Inbox, because that’s precisely how IMAP works. What you see in Mail is what’s on the server. It will be removed from the server as soon as you move it out of the Inbox in Mail (and vice versa), which, interestingly enough, is precisely what the OP in the other thread wanted to do with his POP account.
    I checked the iMail preferences and .Mac webmail preferences
    and unchecked all possible "leave messages on server" buttons.
    Those settings have absolutely no effect on the Inbox. Inbox is always stored remotely on the server for IMAP accounts and that cannot be changed. If that’s not what you want, what you really want is probably to set up your .Mac account as POP:
    What is POP mail?
    What is IMAP mail?
    .Mac Mail Help: POP or IMAP?
    Changing .Mac Mail from IMAP to POP
    Before doing what the last article suggest to change the .Mac account to POP, I encourage you to quit Mail and make a backup copy of the ~/Library/Mail folder, just in case something goes wrong. You can do this in the Finder by dragging the folder to the Desktop while holding the Option (Alt) key down, for example. This is where all your mail is locally stored.

  • Leaf node Hierarchy based on tree position

    Hi All,
    I need to find the Hierarchy of given leaf node. Can you please help me. Here are details
    create table t_rk_4 (child_id number, parent_id number, treenum varchar2(100));
    insert into t_rk_4 values (2,1,'1');
    insert into t_rk_4 values (3,1,'1');
    insert into t_rk_4 values (6,2,'1.2');
    insert into t_rk_4 values (7,6,'1.2.6');
    insert into t_rk_4 values (4,3,'1.3');
    insert into t_rk_4 values (5,4,'1.3.4');
    insert into t_rk_4 values (7,5,'1.3.4.5');
    insert into t_rk_4 values (8,7,'1.2.6.7');
    insert into t_rk_4 values (4,9,'1.9');
    insert into t_rk_4 values (9,1,'1');
    In the above date, child 8's parent is 7 only in case if tree context 1.2.6.7
    select child_id,parent_id connect_by_isleaf,level,lpad(' ',level*3)||a.child_id
    from t_rk_4 a
    start with child_id = 8 connect by child_id = prior parent_id ORDER SIBLINGS BY child_id;
    when I run the above query I am getting all tree contexts,
    Is there a way I can only get tree positins thru 1.2.6.7 ?
    In real table I have more than 1 million records..
    Any help would be helpful..
    Thanks
    ay.

    Hi,
    Welcome to the forum!
    Thanks for posting the CREATE TABLE and INSERT statements! It clarifies things a lot and makes it much easier to reply.
    Another very helpful thing is to post the results you want from the data you posted. In this case, I think you want:
    . CHILD_ID  PARENT_ID CONNECT_BY_ISLEAF      LEVEL INDENTED
             8          7                 0          1    8
             7          6                 0          2       7
             6          2                 0          3          6
             2          1                 1          4             2Is that right?
    Notice how multiple spaces are not compressed in the section above. That's because I typed &#123;code&#125; (all small letters, in curly brackets) before and after that section.
    To get those results, I just added one line to your CONNECT BY clause, saying that the parent's treenum has to be the first part of the child's treenum:
    SELECT     child_id
    ,     parent_id
    ,     CONNECT_BY_ISLEAF
    ,     LEVEL
    ,     LPAD (' ', LEVEL * 3) || a.child_id     AS indented
    FROM     t_rk_4     a
    START WITH     child_id = 8
    CONNECT BY     PRIOR parent_id     = child_id
    AND          PRIOR treenum     LIKE treenum || '.%'     -- *** NEW CONDITION ***
    ORDER SIBLINGS BY     child_id;What do you want to do if the node you're starting with has two (or more) parents?
    If we START WITH child_id = 7, the query above produces this output:
    . CHILD_ID  PARENT_ID CONNECT_BY_ISLEAF      LEVEL INDENTED
             7          5                 0          1    7
             5          4                 0          2       5
             4          3                 0          3          4
             3          1                 1          4             3
             7          6                 0          1    7
             6          2                 0          2       6
             2          1                 1          3          2That is, there are two rows in the table with child_id = 7, so the query shows two lines of ascent. The alternate route, going through the node with child_id = 9, is not shown. Is that what you want?

  • Displaying leaf nodes at the bottom of a tree that has parent nodes

    I have a problem in that - leaf nodes added to the tree at the bottom appear with big spaces (vertically) between them. It looks as if the nodes are somehow expanded by default!
    Is this a known issue with leaf nodes that are added in below parent nodes?
    I notice in the normal hierarchy the leaf nodes are displayed fine. Also if I return false on isleaf() it displays the last 3 nodes as expandable icons but they're still lage gaps between them.
    this is an example of what i'm getting
    Main �
    +Parent Node(expandable)
    |
    +Parent Node(expandable)
    |
    +Parent Node(expandable)
    |
    |
    |_leaf node (not expandable)
    |
    |
    |_leaf node (not expandable)
    |
    |
    |_leaf node (not expandable)

    You got my interest with your topic subject as I'm working on a library which simplifies the development with Swing trees. However everyone here except you knows nothing about your "anormal hierarchy" which creates you problem.
    Denis Krukovsky
    http://sourceforge.net/projects/dotuseful/

  • Retrieve Hierarchy Leaf Node using API.

    Hello All,
      Is there a way to search in the Hierarchy Lookup table only on it leaf node.
    Example.
    I have a Hierarchy structure
    Americas
       I
       ___ North America
                        I
                        _____ United States and Virgin Island
                                                          I
                                                          ______ United States,US,USA.
    For the above structure if i search by "United States" and put in CONTAINS as a constrain then, i need to retrieve only "United Stated,US,USA". Is there a Java API, to do this search.
    Thanks,
    Priya.

    Hi Priya,
    yes there is API Command available for retrieving the Hierarchy elements.
    All you need is the Record ID of the selected innermost leaf noe that you can get by performing a search.
    Once you get his record ID for the innermost leaf node, you need to use the RetrieveHierAncestors Command to get the Values for the parent of the leaf node.
    Documentation is avaible at: [http://help.sap.com/javadocs/MDM/SP06/com/sap/mdm/data/commands/RetrieveHierAncestorsCommand.html]
    Hope his helps!!
    Cheers,
    Arafat

  • Validation to find the Root Node !!!!

    Hi All,
    Is it possible to write a Validation to find the Root Node of the Hierarchy,
    For E.g.  If we have a three level hierarchy
    Printer
            Dot Matrix
                          T123
    So is there a way I can check if my Root node value is Printer or not, because in Data Manager the value that is selected from the hierarchy drop down is the leaf node.
    Regards,
    Parul

    Hi Jitesh,
    The solution is as follows:
    MDM does not give us the option to traverse to the grandparent of the leaf node..
    In the example that we have taken :
    Printer
    - Dot Matrix
    - Laser
    --Laser1
    --Laser2
    Here if we want to check if the Grandparent of Laser1 is Printer, this cannot be done using the simple Validation, because through validation also we can at max find the parent of the current node i.e. we can traverse till Laser (for Laser 1 leaf node).
    Further we cannot use Laser as the node because in MDM we have to traverse completely through the last node and select it in Data Manager. So again we cannot search for Laser -> Parent.
    The Work Around that I have used is :
    I have created a new field and every time I import data I have mapped this field with the first Level Node and have put the Validation on this field.
    Eg: The field name is Root Node, so everytime the data is imported, Level 1 is mapped to Root Node and so all the Root node values are imported in the Root Node field that we have created and everytime the Validation Runs on this Root Node field and accordingly the process follows.
    Hope that would be helpful to you all!!!!
    Regards,
    Parul Malhotra

  • Error deleting Hierarchy leaf nodes

    Hi SDNers,
    I have hierarchy table whose values I want to delete.
    If I check in the Main table, none of the records are assigned the hierarchy values. But if I try to delete it, i am getting the error "one or more values are set to records in another table" !!
    If I select all the records in the main table, and try to modify the heirarchy field value.. the error is "Records cannot be modified because their data is out of date"
    I have tried unloading n loading again with update indices.. but same error!!
    Note: In the hierarchy table one of the leaf node i want to delete is greyed out!!
    Thanks,
    Priti

    Hi Priti,
    If I check in the Main table, none of the records are assigned the hierarchy values. But if I try to delete it, i am getting the error "one or more values are set to records in another table" !!
    I faced the similar kind of error, on carefully evaluating the repository  in our case i found that this hierarchy values are assigned to a field in Qualified table. So i would suggest you to please check all the other sub-tables (flat tables, Qualified tables etc) where may be a field in any of this sub-table is look-up to this hierarchy table.
    Regards,
    Mandeep Saini

Maybe you are looking for