Determine Hierarchy Node

Hello,
knows anyone how i can determine hierarchy nodes based on leafs?
Example:
Lvl   Item    Type
1     10000 node
2     11000 node
3     11100 node
4     11111 leaf
4     11112 leaf
2     12000 leaf
Within a upload process on detail-level i have only the information that der characteristic is a leaf.
For the chararterstic exists a hierarchy. The connection/relation between parent and child is at the /bic/H* table available. Now i have to determine based on the leaf (11112) the next 'higher' node (11110). Is it possible to determine this node and exists a standard FB or has anyone an idea to implement it within the update or tranformation rules?
Thanks for advise.
Edited by: Markus Linortner on Jan 24, 2008 9:27 PM

Any idea????
Edited by: Cristina Martillo on Nov 18, 2010 9:30 PM

Similar Messages

  • How to determine partner according to higer hierarchy node?

    Hi Experts:
    I need to determine a partner in a sales document according to partner in higher (pricing) hierarchy node.
    I user access sequence wizard and hierarchy was not available as source for determination.
    I tried sourc CRM_PARTNER_G assigning it manually to access sequence. But it does not work.
    Any idea??
    Best regards,
    Cristina

    Any idea????
    Edited by: Cristina Martillo on Nov 18, 2010 9:30 PM

  • Execution of a planning function for a row selection of a hierarchy node

    Hi all!
    Has anyone accomplished to make a configuration, where a planning function would have been executed for a hierarchy node selection and this selection would have been made by a row selection in an analysis item? I can filter the characteristic in a lowest level by selecting rows in analysis item, but if I would select a hierarchy node, the value for the characteristic is empty. I have set the selection state by binding the item_characteristic of analysis item to filter of the other characteristics.
    I tried first to reach this functionality by filtering the characteristic with variables in planning modeller filter and determining the values of the variables during runtime by the selection of the analysis item row selection. But I can not implement it as the display hierachy and the hierarchy node selection in the analysis item  are variables and modeller does not allow selection of a hierarchy node and hierarchy by variables - even thoug it let's you do it (I receive error message saying "field hienmflag with value 5 is not correct").
    Greatful for any working solutions tips you have made up!
    Sari

    Thanks for the explanation. I come from BPS background and there are few changes when it comes to planning functions in IP.  In BPS, the planning function is a bit loosely tied to Planning Package in a sense that a planning function can use any planning package under the planning level to which it belongs.  Same is the case in IP (technically), but in BPS the planning package contains all the characteristics and key figures of the planning level and hence the function can execute correctly.  What I see in IP is that planning function is very loosely tied to Filter.  It can use any filter under the aggregation level even though they differ in the characteristics and key figures.  I have tried a PF with different filters and it executes with everyone of them!  This doesnu2019t sound right!  Am I missing something here?
    Also, you can only execute a IP planning function if it is included in a planning sequence.  An extra step!  The modeling is so intuitive in BPS that IP is a bit repulsive.

  • Authorisation Error - Hierarchy Node

    Hi All,
    I have the following error when I try to run a report, there are madatory fields on the variable screen for Cost Centre Hierachy & Cost Element Hierarchy.  When using BEx Analyser I can enter passed this error message & the report will display results, however when I use the Portal, a different error message appears.
    I need this report to run successfully in the Portal, please can you help
    BEx ANALYSER ERROR MESSAGE
    Diagnosis
    The system has determined the authorized areas (nodes) for the characteristic and the hierarchy (,). It also determined that you do not have authorization for any of these areas.
    System Response
    If this situation was determined while a variable was being filled, the query cannot be executed or the hierarchy is not displayed.
    Procedure
    You have to have authorization for at least one node or leaf for the characteristic and the hierarchy (,) so that something can be displayed.
    If the selection only comprises end nodes ("leaves") and all of these leaves are covered by value authorizations, a query result is still displayed.
    Procedure for System Administration
    PORTAL ERROR MESSAGE
    WARNING EYE (019): No authority for the node from characteristic ASCH407D, hierarchy YIR BI-KPIGRP (00000000,)
      MSGV1: ASCH407D
      MSGV2: YIR BI-KPIGRP
      MSGV3: 00000000
    ABEND RSBOLAP (000): Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
      MSGV1: SAPMSSY1
      MSGV3: UNCAUGHT_EXCEPTION
    & it will not display results

    Hi,
    Using the T-code SU01 check what are the authorization do you have. Identify the authorization which is related to cost center/cost element. In the T-code PFCG check if that authorization includes that cost center/cost element hierarchy node or not?
    In order that query should run in Portal, relevant authorization must be transported to portal.
    Hope it helps.
    Regards,
    Prakash

  • How to find direct & indirect BW hierarchy nodes?

    Hi Group,
    Is there a class or function module that would allow me to find the direct and indirect sub-nodes in a hierarchy?
    For example, I have a time and version dependent hierarchy for company (coming from SEM-BCS).
    I would like to pick a node (node A) and find out all the direct and indirect nodes beneath node A.
    HIEID
    + Node A
    + + Node B
    + + Node C
    + + + Node D
    + Node E.
    So if I input node A, I would get back Nodes B, C and D but not E (E is at same level as A).
    I can loop through the hierarchy tables and find this, but I'm curious if there is an existing FM or method to do this already.  No sense in re-writing existing code.
    Thanks in advance,
    - Chris

    Thanks, that FM is very useful.
    Because the hierarchy I was working with originates in SEM-BCS, I was able to use the BCS master data factory to ultimately get what I needed. 
    The BCS delivered logic can be viewed in CL_UC_SSCR_GENERATE_GUI and method PROCESS_USER_SELECTION.  It uses the BCS selection context + the consolidation group (aka Hierarchy Node) to determine the lower level consolidation groups which must also be provided in the selection criteria when querying data. 
    It's more complex than seems necessary, but it's using the BCS hierarchy data rather than the BW hierarchy data, which is probably a good thing.
    Thanks,
    Chris

  • Bapi_costelementgrp_create and hierarchy nodes

    Hi to all,
    I need an algorythm in order to fill the internal table hierarchynodes (def. like bapiset_hier ) to pass to the bapi_costelementgrp_create.
    The hierarchy nodes will be uploaded from a file with two fields: "father node" and "child node" like the following:
    TESTJR     TESTJR2
    TESTJR2   TESTJR3
    TESTJR     TESTJR4
    in the internal table the hierlevel shoul be like the following schema:
    TESTJR is level 0
    TESTJR2 have to assigned to TESTJR (hierlevel 1)
    TESTJR3 have to assigned to TESTJR2 (hierlevel 2)
    TESTJR4 have to assigned to TESTJR (hierlevel 1)
    Any ideas and suggestions?
    Thanks in advance.
    Andrew

    Hello Andrew,
    Try the code below.  However, you should test it thoroughly.  WARNING:  Make sure first record in internal table pertains to the root node.  The internal table lt_hier is the internal table that you assign parameter "hierarchynodes" when calling BAPI_COSTELEMENTGRP_CREATE.
    Kind Regards,
    Rae Ellen Woytowiez
    * Types, internal table, and structures for input file
    TYPES:  BEGIN OF input,
              groupname1 TYPE bapiset_groupname,
              groupname2 TYPE bapiset_groupname,
            END OF input.
    TYPES:  input_tt TYPE TABLE OF input.
    DATA:  lt_input TYPE input_tt,
           ls_input TYPE input.
    TYPES:  BEGIN OF input_numbered,
              groupname1 TYPE bapiset_groupname,
              groupname2 TYPE bapiset_groupname,
              rrn TYPE i,
            END OF input_numbered.
    TYPES:  input_numbered_tt TYPE TABLE OF input_numbered.
    DATA:  lt_input_numbered TYPE input_numbered_tt,
           ls_input_numbered TYPE input_numbered.
    * Types, internal tables, structures used to help
    * determine hierarchy level.
    TYPES:  BEGIN OF group_level_numbered,
              level TYPE bapiset_level,
              rrn TYPE i,
              groupname TYPE bapiset_groupname,
            END OF group_level_numbered.
    TYPES:  group_level_numbered_tt TYPE TABLE OF group_level_numbered.
    DATA:  lt_group_level_numbered TYPE group_level_numbered_tt,
           ls_group_level_numbered TYPE group_level_numbered.
    * Types, internal table, structures for function module.
    TYPES:  bapiset_hier_tt TYPE TABLE OF bapiset_hier,
            bapi1113_values_tt TYPE TABLE OF bapi1113_values.
    DATA:  lt_hier TYPE bapiset_hier_tt,
           lt_values TYPE bapi1113_values_tt,
           ls_hier TYPE bapiset_hier,
           ls_values TYPE bapi1113_values.
    DATA:  count TYPE i.
    DATA:  level TYPE i.
    START-OF-SELECTION.
      count = 1.
      LOOP AT lt_input INTO ls_input.
        CLEAR:  ls_input_numbered.
        ls_input_numbered-groupname1 = ls_input-groupname1.
        ls_input_numbered-groupname2 = ls_input-groupname2.
        ls_input_numbered-rrn = count.
        APPEND ls_input_numbered TO lt_input_numbered.
        count = count + 1.
      ENDLOOP.
    * Build hierarchy
      SORT lt_input_numbered BY groupname1 rrn.
      level = 0.
      LOOP AT lt_input_numbered INTO ls_input_numbered.
        PERFORM process_group
                    USING
                       ls_input_numbered
                    CHANGING
                       level.
      ENDLOOP.
    * derive table to be used in FM
      SORT lt_group_level_numbered BY rrn.
      LOOP AT lt_group_level_numbered INTO ls_group_level_numbered.
        ls_hier-groupname = ls_group_level_numbered-groupname.
        ls_hier-hierlevel = ls_group_level_numbered-level.
        ls_hier-DESCRIPT = ls_group_level_numbered-groupname.
        APPEND ls_hier TO lt_hier.
      ENDLOOP.
    FORM process_group USING value(ps_input_numbered) TYPE input_numbered
                       CHANGING value(pv_level) TYPE bapiset_level.
      DATA:  groupname1_subrc TYPE sysubrc,
             groupname1_tabix TYPE sytabix.
      DATA:  groupname2_subrc TYPE sysubrc,
             groupname2_tabix TYPE sytabix.
    * Check and if necessary add groupname1.
      CLEAR ls_group_level_numbered.
      READ TABLE lt_group_level_numbered INTO ls_group_level_numbered
                 WITH KEY groupname = ps_input_numbered-groupname1
                 BINARY SEARCH.
      groupname1_subrc = sy-subrc.
      groupname1_tabix = sy-tabix.
      IF groupname1_subrc <> 0.
        ls_group_level_numbered-groupname = ps_input_numbered-groupname1.
        ls_group_level_numbered-level = pv_level.
        ls_group_level_numbered-rrn = ps_input_numbered-rrn.
        INSERT ls_group_level_numbered INTO lt_group_level_numbered
               INDEX groupname1_tabix.
      ELSE.
        pv_level = ls_group_level_numbered-level.
      ENDIF.
    * Check and if necessary add groupname2.
      CLEAR ls_group_level_numbered.
      READ TABLE lt_group_level_numbered INTO ls_group_level_numbered
                 WITH KEY groupname = ps_input_numbered-groupname2
                 BINARY SEARCH.
      groupname2_subrc = sy-subrc.
      groupname2_tabix = sy-tabix.
      IF groupname2_subrc <> 0.
        ls_group_level_numbered-groupname = ps_input_numbered-groupname2.
        ls_group_level_numbered-level = pv_level + 1.
        ls_group_level_numbered-rrn = ps_input_numbered-rrn.
        INSERT ls_group_level_numbered INTO lt_group_level_numbered
               INDEX groupname2_tabix.
      ENDIF.
    * Check for childs for groupname2.
      pv_level = pv_level + 1.
      LOOP AT lt_input_numbered INTO ls_input_numbered
                         WHERE groupname1 = ps_input_numbered-groupname2.
        PERFORM process_group
                    USING
                       ls_input_numbered
                    CHANGING
                       level.
      ENDLOOP.
    ENDFORM.
    Edited by: Rae Ellen Woytowiez on Apr 15, 2011 7:24 AM
    Edited by: Rae Ellen Woytowiez on Apr 15, 2011 7:26 AM
    Edited by: Rae Ellen Woytowiez on Apr 15, 2011 7:26 AM

  • How to filter hierarchy node in BEX query designer

    Dear experts
    We are working on FI balance sheet with hierarchy infoobject 0GLACCEXT. Example of our balance sheet is as follow:
    Parent Node A = 20
         Sub-parent Node A1 = 10
             Leaf A11 = 5
                 Leaf A12 = 5
    Parent Node B = 20
         Sub-parent Node B1 = 10
                   Leaf B11 = 5
                   Leaf B12 = 5
    We require only:
        Sub-parent Node A1 = 10
        Leaf B12 = 5
    So I filter those out in BEX restriction;  however, after we examine the report in tcode RSRT, "Sub-parent Node A1" is not shown in BEX Report, and the result is as follow:
    Parent Node B = 5
         Sub-parent Node B1 = 5
                 Leaf B12 = 5
    Are there solutions for us to show merely A1 and B12 ?

    Hi Chu
    Try the following steps.
    Initial Output
    In this example I will restrict the query for only displaying Node 8603 and leaf 9000
    Proceed to restrict the Characteristic. Please be aware of the difference between hierarchy nodes and leaf characteristic values. Also set the Hierarchy display properties to expand up to level 1.
    Execute the query again:
    Please be aware that users will still be able to expand node 8603 and see the lower level nodes/leaf. In order to restrict users from doing this set up users authorizations.
    Regards,
    Carlos

  • DSO or ODS "Insert New Hierarchy Nodes" under Data Fields

    When you insert info objects under the Data Fields in DSO right mouse click on the Data Fields icon and you will find Insert New Hierarchy Nodes . I created a hierarchy node with infoobjects associating with it which will be visible under the Filters Folder in BEx Query designer as a seperate folder. I can add them to the infoobjects from this folder into the query. I did not know how to apply this functionality in Queries and what it really does. My guess was you can create dynamic hierarchy using characteristic infoobjects from transactional data.Any ideas or links to documentation. This option was available from 7.X in DSO's and i think even in 3.x ODS.

    Hi,
    May help you:----
    http://help.sap.com/saphelp_nw70/helpdata/en/4a/e71f39488fee0ce10000000a114084/content.htm
    You could feel the flexibility of using this hierarchial display in the Query. Try to create any Query on this DSO.
    Regards,
    Suman

  • Drilldown to hierarchy nodes in VC..

    Hi..
    I want drilldown functionality in VC..
    1. my Query has a hierarchy
    2. my VC application has a table attached to this query.
    3. In Output the hierarchy nodes are displayed
    4. i ve taken a button Drilldown on my table
    5. on selection of a node and onclick of button all the hierarchy nodes get expanded(drilled down)
    Problem : i do not want all the nodes to get drilled down..only the selected node should get drilled..
    Plz help me out for the same...
    Thanks in advance..
    Bhavna.

    Hi,
    Just check out in hierarchy attribute setting... what is the start node for the drill down..
    Regards,
    Viren.

  • Issue with hierarchy node variable and multiple SAP hierarchies

    Hello experts,
    We are currently facing an issue when using two SAP hierarchies in Web Intelligence and one of them is restricted with a hierarchy node variable.
    The systems we use are a SAP BI 7.01 (SPS 05) and a Business Objects Enterprise XI R3.1 SP2 (fix pack 2.3). I want also to point out that the fix pack 2.3 has been applied to all BOE related components: the SAP integration Kit, client tools, and enterprise (server and client).
    The universe used in our scenario is based on a BEX Query with two hierarchies (non-time dependent hierarchies, intervals allowed) loaded on their corresponding characteristics. One of these characteristics is restricted with a hierarchy node variable (manual input, optional, ready for input, multiple single values allowed). 
    Prerequisites for replicating the problem:
    1)     When building the web intelligence query select several levels from both hierarchies (they have seven levels each) and    the   only amount of the InfoCube that the BEX query (that was used to create our universe) relies on.
    2)     In the hierarchy node variable prompt select a hierarchy node entry (not an actual InfoObject value that exists as transactional data in the InfoCube )
    By executing the query built above, all characteristics are returned null (no value) and the key figure with value u201C0u201D. No error messages, no partial results warnings.  Now if we go back to u201CEdit queryu201D and select levels of only one of any of the two hierarchies the query runs normally (by selecting the exact same value for the hierarchy node variable prompt).
    Any ideas on the matter?
    Regards,
    Giorgos

    Hi,
    Have you ever got a solution for this problem?
    I have a similar one.
    Thanks,
    regards, Heike

  • Hierarchy Node Variable search (find) option not working

    Hi Experts - I have created a hierarchy node varibale on a fixed hierarchy. When user run the report and click on hierarchy node variable selection option , A new window will pop up which has all the nodes.
    As the list is quite big and has many levels , On the same pop up , we have find option , when we enter any node in the find box , its always give a ABAP Dump , It never works for me...
    Is node find/search in not working in Bi 7.0 .
    Thanks
    R

    Hi Rohan,
    We can restrict the hierchey level at property of of the hiearchey enabled characteristic.
    Hope this hels...let me know if u require any further info on this..
    Best Regards,
    Maruthi

  • How to pass a hierarchy node variable value over OpenDocument?

    Hello,
    I have been unable to link to an instance with matching parameters with opendocument with hierarchy node variables.
    Has anyone attempted this or been successful?
    Please reference this post I had in the Web Intelligence forum.  sInstance=Param not working for sap bw query based reports (FWM 02020)
    Here's some background information
    We've created 2 new crystal reports based of sap queries.
    Report 1, single prompt, no hierarchy.
    Result : Can link to specific instance with matching parameters. Great!
    Report 2, single prompt, hierarchy based.
    Result: Cannot link to specific instance with matching parameters
    Parameter list for report 2
    [!V000001} : Cost Center/Gr{oup (Multiple) = {0COSTCENTER XXXXXXXX.BGT3}.{XXXXXXXXX.BGT3 0HIER_NODE} - XXX, XXX & XXX
    However when I go into the history and look at the successful instance parameters used, it seems to be picking up an extra parameter ( my guess is node)
    XXX, XXX & XXX; {0COSTCENTER XXXXXXXX.BGT3}.{XXXXXXXXX.BGT3 0HIER_NODE} - XXX, XXX & XXX
    We have attempted to use the entire string, the first portion, second portion, and just the technical response. No luck.
    Any help or pointers would be appreciated!
    Nick

    Hello  Ingo,
    I'll explain the situation more clearly,
    Report 2, single prompt, hierarchy based.
    Result: Cannot link to specific instance with matching parameters with a response from the Bus Objects server
    An error has occurred: The object with ID -1 does not exist in the CMS or you don't have the right to access it (FWM 02020)
    We have 1 parameter for report 2
    {!V000001} : Cost Center/Group (Multiple)
    We selected a single value:
    {0COSTCENTER XXXXXXXX.BGT3}.{XXXXXXXXX.BGT3 0HIER_NODE} - XXX, XXX & XXX
    (The XXX, XXX, & XXX is the description)
    We ran a successful instance.
    However when I go into the history and look at the successful instance parameters used it displays the following: 
    XXX, XXX & XXX; {0COSTCENTER XXXXXXXX.BGT3}.{XXXXXXXXX.BGT3 0HIER_NODE} - XXX, XXX & XXX
    An extra description seems to appear (The first XXX, XXX & XXX;) Our original selection was only {0COSTCENTER   XXXXXXXX.BGT3}.{XXXXXXXXX.BGT3 0HIER_NODE} - XXX, XXX & XXX
    We attempted to build variations of the open document strings
    1. We tried the entire parameter response,
    XXX, XXX & XXX; {0COSTCENTER XXXXXXXX.BGT3}.{XXXXXXXXX.BGT3 0HIER_NODE} - XXX, XXX & XXX
    2. The first description that was not part of the original selection,
    XXX, XXX & XXX
    3. The technical name and description
    {0COSTCENTER XXXXXXXX.BGT3}.{XXXXXXXXX.BGT3 0HIER_NODE} - XXX, XXX & XXX
    4. The technical name
    {0COSTCENTER XXXXXXXX.BGT3}.{XXXXXXXXX.BGT3 0HIER_NODE}
    Please let me know if you need more details.
    Regards,
    Nick

  • Data slice inconsistency problem with hierarchy nodes

    Hi Experts,
    We want to lock planning tables from function. We create the appropriate data slices but there are problems with (material group) hierarchy nodes.
    If I give the node as input variable to the function it causes inconsistency in the data slice. If I choose and add this node to the lock in modeler, the problem is the same.
    We are using the following variables to create a data slice:
    0VERSION
    0VTYTYPE
    0COMP_CODE
    ZGRMAT (developed material group)
    Z_YEARCR (developed yera created)
    The problem also exist if I set an another type of node e.g. destination country (0RECIPCNTRY) instead of material group.
    For me, the problem seems to be generic.
    Do you have any idea?
    Many thanks in advance
    Peter

    There is a note related to this proble:
    Note 1070608 - Lowflag field is not valid
    The implementation of this note resolves the problem.
    Peter

  • Exclude a hierarchy node by using exit variable (not in query designer)

    Hi gurus!!
    I have a hierarchy for the infoObject 0COSTELMNT. Depending on the user who executes the report, the node '0599ADJUSTMENTS' must be displayed or not.
    I am trying to solve it by using an exit variable:
    Varible Type: Hierarchy Node
    Processing : Exit
    On the exit, I have entered the following code:
          IF ( sy-subrc = 0 ).
              l_s_range-sign = 'E' .
              l_s_range-opt  = 'EQ' .
              l_s_range-low = 'AJUSTES'.
              APPEND l_s_range TO e_t_range.
         ENDIF.
    But unfortunately does no work!!
    Any ideas?
    Thanks in advance
    Regards.
    Carmen Rodríguez

    Hi,
    Check the below link gives good knowledge on variables:
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/579b3c494d8e15e10000000a114084/content.htm
    Reg
    Pra

  • How to writre a comment in BI Report hierarchy node?

    Hello All,
    I have a problem where I want to enter a comment on some hierarchy node e.g. on product group ?
    Is there any alternative with which we can achieve this ?
    Thanks & Regards,
    SMP

    If you are in such situation, take help of portal team.

Maybe you are looking for