Hierarchy in reporting

Hi,
We have created a hierarchy with 4 text nodes.
In the first node, there are 3 values which we want to add them and display its result. How this can be done?
Next, we want to add the values present in all the remaining three nodes and display its result as well.
How to do this?
Please guide me in detail as I am a fresher in BW.
Thanks.

Hierarchy nodes total as standard - just display them and you will see the totals in expanded or collapsed mode

Similar Messages

  • Roll up of the formula results as per  hierarchy in report

    Hi,
    I am using a employee hierarchy in report with key figure  as ROWCOUNT and  formlas as Total liability amount
    Currently the report is showing the number of employee under its manager correct like if there are 5 employees under a employee E1.
    Suppose there are 2 employees wose total liability amount is 0
    The report is showing 5 as under E1.
    But now user  doesn't want to show the employees whose Total liability amount is 0.
    So i make a condition to show only employees whose total liability amount is 0 but the report is still showing the number of employees as 5 (ROWCOUNT) instead of 3 although the employees with non zero total liability amount is displayed in the report.
    SO,please suggest me how to achieve this.
    Its would be a great help to me.

    just need to properly maintain value categories..

  • How to display 3 level hierarchy alv report using SALV

    Hi ,
          I need to display a Hierarchy ALV report with 3 level.I thought of trying CL_SALV_HIERSEQ_TABLE but i am able to display only two level report.
          How can i display the 3 - level heirarchy report using SALV. I don't want to use SALV_TREE.
          Regards,
          Aditya Tanguturi.

    Hi Aditya,
    Please check this thread
    Is it possible to display more than 2 levels us... | SCN
    Thanks !
    Amit

  • Hierarchial ALV report

    Hi Friends,
    I have created a Hierarchial ALV report using OOP concept (Class Builder). The output is OK but it is displaying the unwanted columns in the header part.
    The code written is as follows.
    =====================================================
    REPORT ZMMSTKH.
    DATA: G_ALV_TREE         TYPE REF TO CL_GUI_ALV_TREE,
          G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    DATA: GT_ZSD_BILLINFO      TYPE ZSD_BILLINFO  OCCURS 0,      "Output-Table
          OK_CODE LIKE SY-UCOMM,
          SAVE_OK LIKE SY-UCOMM,           "OK-Code
          G_MAX TYPE I VALUE 255.
    DATA  CCONTAINER1.
    DATA LS_FIELDCAT TYPE LVC_S_FCAT.
    DATA GT_FIELDCAT_LVC TYPE LVC_S_FCAT OCCURS 0.
    DATA IT_FIELDCATALOG TYPE LVC_S_FCAT OCCURS 0.
    END-OF-SELECTION.
      CALL SCREEN 100.
    *&      Module  PBO  OUTPUT
          process before output
    MODULE PBO OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR 'MAINTITLE'.
      IF G_ALV_TREE IS INITIAL.
        PERFORM INIT_TREE.
        CALL METHOD CL_GUI_CFW=>FLUSH
          EXCEPTIONS
            CNTL_SYSTEM_ERROR = 1
            CNTL_ERROR        = 2.
        IF SY-SUBRC NE 0.
          CALL FUNCTION 'POPUP_TO_INFORM'
            EXPORTING
              TITEL = 'Automation Queue failure'(801)
              TXT1  = 'Internal error:'(802)
              TXT2  = 'A method in the automation queue'(803)
              TXT3  = 'caused a failure.'(804).
        ENDIF.
      ENDIF.
    ENDMODULE.                             " PBO  OUTPUT
    *&      Module  PAI  INPUT
          process after input
    MODULE PAI INPUT.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      CASE SAVE_OK.
        WHEN 'EXIT' OR 'BACK' OR 'CANC'.
          PERFORM EXIT_PROGRAM.
        WHEN OTHERS.
          CALL METHOD CL_GUI_CFW=>DISPATCH.
      ENDCASE.
      CALL METHOD CL_GUI_CFW=>FLUSH.
    ENDMODULE.                             " PAI  INPUT
    *&      Form  init_tree
          text
    -->  p1        text
    <--  p2        text
    FORM INIT_TREE.
      DATA: L_TREE_CONTAINER_NAME(30) TYPE C.
      L_TREE_CONTAINER_NAME = 'CCONTAINER1'(001).
      CREATE OBJECT G_CUSTOM_CONTAINER
         EXPORTING
               CONTAINER_NAME = L_TREE_CONTAINER_NAME
         EXCEPTIONS
               CNTL_ERROR                  = 1
               CNTL_SYSTEM_ERROR           = 2
               CREATE_ERROR                = 3
               LIFETIME_ERROR              = 4
               LIFETIME_DYNPRO_DYNPRO_LINK = 5.
      IF SY-SUBRC <> 0.
        MESSAGE X208(00) WITH 'ERROR'(100).
      ENDIF.
      CREATE OBJECT G_ALV_TREE
        EXPORTING
            PARENT              = G_CUSTOM_CONTAINER
            NODE_SELECTION_MODE = CL_GUI_COLUMN_TREE=>NODE_SEL_MODE_SINGLE
            ITEM_SELECTION      = 'X'
            NO_HTML_HEADER      = 'X'
            NO_TOOLBAR          = ''
        EXCEPTIONS
            CNTL_ERROR                   = 1
            CNTL_SYSTEM_ERROR            = 2
            CREATE_ERROR                 = 3
            LIFETIME_ERROR               = 4
            ILLEGAL_NODE_SELECTION_MODE  = 5
            FAILED                       = 6
            ILLEGAL_COLUMN_NAME          = 7.
      IF SY-SUBRC <> 0.
        MESSAGE X208(00) WITH 'ERROR'.                          "#EC NOTEXT
      ENDIF.
      DATA L_HIERARCHY_HEADER TYPE TREEV_HHDR.
      PERFORM BUILD_HIERARCHY_HEADER CHANGING L_HIERARCHY_HEADER.
      PERFORM ZF_CREATE_FIELDCAT.
      CALL METHOD G_ALV_TREE->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          I_STRUCTURE_NAME    = 'zsd_billinfo'
          IS_HIERARCHY_HEADER = L_HIERARCHY_HEADER
        CHANGING
          IT_OUTTAB           = GT_ZSD_BILLINFO. "table must be empty !
      IT_FIELDCATALOG = GT_FIELDCAT_LVC[].
      PERFORM CREATE_HIERARCHY.
      CALL METHOD G_ALV_TREE->FRONTEND_UPDATE.
    ENDFORM.                               " init_tree
    *&      Form  build_hierarchy_header
    FORM BUILD_HIERARCHY_HEADER CHANGING
                                   P_HIERARCHY_HEADER TYPE TREEV_HHDR.
      P_HIERARCHY_HEADER-HEADING = 'Region / Material'(300).
    p_hierarchy_header-tooltip = 'PO No'(400).
      P_HIERARCHY_HEADER-WIDTH = 30.
      P_HIERARCHY_HEADER-WIDTH_PIX = ' '.
    ENDFORM.                               " build_hierarchy_header
    *&      Form  exit_program
          free object and leave program
    FORM EXIT_PROGRAM.
      CALL METHOD G_CUSTOM_CONTAINER->FREE.
      LEAVE PROGRAM.
    ENDFORM.                               " exit_program
    *&      Form  create_hierarchy
          text
    -->  p1        text
    <--  p2        text
    FORM CREATE_HIERARCHY.
      DATA: LS_ZSD_BILLINFO TYPE ZSD_BILLINFO,
            LT_ZSD_BILLINFO TYPE ZSD_BILLINFO OCCURS 0,
           l_bukrs like zsd_billinfo-bukrs,
           l_vbeln like zsd_billinfo-vbeln,
           l_fkdat like zsd_billinfo-fkdat,
           l_fkart like zsd_billinfo-fkart,
           l_vkorg like zsd_billinfo-vkorg,
           l_spart like zsd_billinfo-spart,
            L_BZIRK LIKE ZSD_BILLINFO-BZIRK,
            L_BZIRK_LAST LIKE ZSD_BILLINFO-BZIRK,
           l_vkbur like zsd_billinfo-vkbur,
            L_WERKS LIKE ZSD_BILLINFO-WERKS,
            L_WERKS_LAST LIKE ZSD_BILLINFO-WERKS,
            L_MATNR LIKE ZSD_BILLINFO-MATNR,
            L_MATNR_LAST LIKE ZSD_BILLINFO-MATNR,
            L_FKIMG LIKE ZSD_BILLINFO-FKIMG,
            L_NETWR LIKE ZSD_BILLINFO-NETWR.
      DATA: L_BUKRS_KEY TYPE LVC_NKEY,
            L_BZIRK_KEY TYPE LVC_NKEY,
            L_WERKS_KEY TYPE LVC_NKEY,
            L_MATNR_KEY TYPE LVC_NKEY,
           l_vbeln_key type lvc_nkey,
            L_LAST_KEY TYPE LVC_NKEY.
      SELECT BUKRS BZIRK WERKS MATNR FKIMG FROM ZSD_BILLINFO
      INTO CORRESPONDING FIELDS OF
      TABLE LT_ZSD_BILLINFO
      WHERE  SPART = 'CT' AND
             FKART = 'ZVAT'.
    select * from zsd_billinfo    into table lt_zsd_billinfo
    where  spart = 'CT' and
            fkart = 'ZVAT'.
      SORT LT_ZSD_BILLINFO BY BZIRK WERKS MATNR.
      LOOP AT LT_ZSD_BILLINFO INTO LS_ZSD_BILLINFO.
        L_BZIRK = LS_ZSD_BILLINFO-BZIRK.
        L_WERKS = LS_ZSD_BILLINFO-WERKS.
        L_MATNR = LS_ZSD_BILLINFO-MATNR.
        IF L_BZIRK <> L_BZIRK_LAST.
          L_BZIRK_LAST = L_BZIRK.
          PERFORM ADD_BZIRK USING    L_BZIRK
                                 CHANGING L_BZIRK_KEY.
          CLEAR L_WERKS_LAST.
        ENDIF.
        IF L_WERKS <> L_WERKS_LAST.
          L_WERKS_LAST = L_WERKS.
          PERFORM ADD_WERKS_LINE USING    LS_ZSD_BILLINFO
                                      L_WERKS_KEY
                              CHANGING L_WERKS_KEY.
          IF L_MATNR <> L_MATNR_LAST.
            L_MATNR_LAST = L_MATNR.
            PERFORM ADD_MATNR_LINE USING    LS_ZSD_BILLINFO
                                        L_MATNR_KEY
                                CHANGING L_MATNR_KEY.
          ENDIF.
          PERFORM ADD_COMPLETE_LINE USING  LS_ZSD_BILLINFO
                                           L_MATNR_KEY
                                  CHANGING L_LAST_KEY.
        ENDIF.
    *if l_matnr <> l_matnr_last.
         l_matnr_last = l_matnr.
             perform add_matnr_line using    ls_zsd_billinfo
                                         l_matnr_key
                                 changing l_matnr_key.
       endif.
       perform add_complete_line using  ls_zsd_billinfo
                                        l_matnr_key
                               changing l_last_key.
      ENDLOOP.
    ENDFORM.                               " create_hierarchy
    *&      Form  add_month
    *&      Form  add_ebeln
    FORM ADD_BZIRK  USING     P_BZIRK TYPE C
                              P_RELAT_KEY TYPE LVC_NKEY
                    CHANGING  P_NODE_KEY TYPE LVC_NKEY.
      DATA: L_NODE_TEXT TYPE LVC_VALUE,
            LS_ZSD_BILLINFO TYPE ZSD_BILLINFO,
            L_BZIRK(12) TYPE C.            "output string for month
      CALL METHOD G_ALV_TREE->ADD_NODE
        EXPORTING
          I_RELAT_NODE_KEY = P_RELAT_KEY
          I_RELATIONSHIP   = CL_GUI_COLUMN_TREE=>RELAT_LAST_CHILD
          I_NODE_TEXT      = L_NODE_TEXT
          IS_OUTTAB_LINE   = LS_ZSD_BILLINFO
        IMPORTING
          E_NEW_NODE_KEY   = P_NODE_KEY.
    ENDFORM.                               " add_month
    FORM ADD_WERKS_LINE USING     PS_ZSD_BILLINFO TYPE ZSD_BILLINFO
                                   P_RELAT_KEY TYPE LVC_NKEY
                         CHANGING  P_NODE_KEY TYPE LVC_NKEY.
      DATA: L_NODE_TEXT TYPE LVC_VALUE,
            LS_ZSD_BILLINFO TYPE ZSD_BILLINFO.
      L_NODE_TEXT =  PS_ZSD_BILLINFO-WERKS.
      CALL METHOD G_ALV_TREE->ADD_NODE
        EXPORTING
          I_RELAT_NODE_KEY = P_RELAT_KEY
          I_RELATIONSHIP   = CL_GUI_COLUMN_TREE=>RELAT_LAST_CHILD
          I_NODE_TEXT      = L_NODE_TEXT
          IS_OUTTAB_LINE   = LS_ZSD_BILLINFO
        IMPORTING
          E_NEW_NODE_KEY   = P_NODE_KEY.
    ENDFORM.                               " add_carrid_line
    FORM ADD_MATNR_LINE USING     PS_ZSD_BILLINFO TYPE ZSD_BILLINFO
                                   P_RELAT_KEY TYPE LVC_NKEY
                         CHANGING  P_NODE_KEY TYPE LVC_NKEY.
      DATA: L_NODE_TEXT TYPE LVC_VALUE,
            LS_ZSD_BILLINFO TYPE ZSD_BILLINFO.
      L_NODE_TEXT =  PS_ZSD_BILLINFO-MATNR.
      CALL METHOD G_ALV_TREE->ADD_NODE
        EXPORTING
          I_RELAT_NODE_KEY = P_RELAT_KEY
          I_RELATIONSHIP   = CL_GUI_COLUMN_TREE=>RELAT_LAST_CHILD
          I_NODE_TEXT      = L_NODE_TEXT
          IS_OUTTAB_LINE   = LS_ZSD_BILLINFO
        IMPORTING
          E_NEW_NODE_KEY   = P_NODE_KEY.
    ENDFORM.                               " add_carrid_line
    **&      Form  add_complete_line
    FORM ADD_COMPLETE_LINE USING   PS_ZSD_BILLINFO TYPE ZSD_BILLINFO
                                   P_RELAT_KEY TYPE LVC_NKEY
                         CHANGING  P_NODE_KEY TYPE LVC_NKEY.
      DATA: L_NODE_TEXT TYPE LVC_VALUE.
      WRITE PS_ZSD_BILLINFO-BZIRK TO L_NODE_TEXT.
      CALL METHOD G_ALV_TREE->ADD_NODE
        EXPORTING
          I_RELAT_NODE_KEY = P_RELAT_KEY
          I_RELATIONSHIP   = CL_GUI_COLUMN_TREE=>RELAT_LAST_CHILD
          IS_OUTTAB_LINE   = PS_ZSD_BILLINFO
          I_NODE_TEXT      = L_NODE_TEXT
        IMPORTING
          E_NEW_NODE_KEY   = P_NODE_KEY.
    ENDFORM.                               " add_complete_line
    *&      Form  zf_create_fieldcat
          text
    FORM ZF_CREATE_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME = 'FKIMG'.
      LS_FIELDCAT-REF_TABLE = 'zsd_billinfo'.
      LS_FIELDCAT-NO_OUT = 'X'.
      LS_FIELDCAT-KEY = ''.
      APPEND LS_FIELDCAT TO GT_FIELDCAT_LVC.
    ENDFORM. " ZF_CREATE_FIELDCAT
    =================================================
    Kindly look into the code and guide me the solution.
    TIA.
    Regards,
    Mark K

    hi
    good
    i tried your ALV report but it is giving some error due to some ztable you have used in your progam,
    you can go to se38 and give there BCALV* and press f4, you ll find lots of ALV example related to OOP concept, you can test them and use them as per your requirement.
    thnaks
    mrutyun^

  • PROD HIERARCHY WISE REPORT

    what are the different product hierarchy wise reports available in standard sap

    Hi,
    Product hierarchy is for only reporting. in standrad system u can have 3 levels in product hierarchy .if u implement product hierarchy u can have reports like below.
    reports that can give u the three (or modified ) levels. for ex; material group, material pricing group, additional material group. agriculture products,electricals and  pumps respectively. u can have the reprots each level.
      like this if u modify the system for more levels then standard 3 u can have more flexibility in reporting
    regards,
    sadanandam kasarla

  • Multilevel hierarchy ALV report of Mother WBS

    Hi ABAP Guru,
    I have created a Mother WBS sturcture which has been created in CJ91 tcode. I need a same hierarchy alv report same structure as shown in cj91 t code. Please help me out.
    I have created a alv reort on that but when I make change in mother WBS, the new added wbs is comming in my report at last. PLease help me out.

    Hi Manish,
                  I am able to see WBS Elements in MB51 Report after going to detailed list from the initial output page. In this detailed output the sender and receiver WBS Elements are getting displayed incorrectly.From that screen only,if I go to Material document list,sender and receiver WBS Elements are getting displayed correctly.
    Regards,
    B P Singh

  • Need hierarchy alv report base on salv_demo_hierseq_simple

    Hi friends,
    i need to do a hierarchy alv report,
    i copied example code from program salv_demo_hierseq_simple and changes the selection screen +changed the  select from tables.
    my problem is that the results is one big list of data,
    i dont have to open and close lines.
    is anyone can help me with what could the problem be?
    thanks,
    dana.

    Guys,
              Any Idea on this.

  • Urgent: hierarchy in report

    Hi,
    How can I exclude a account number with hierarchy active for it.
    I have a report in which col1 is account hierarchy and col2 is amount. In the report I want to exclude one account form the report. I right click on account number, select the option select filter value.. , select that particular account. For the account being selected in the selection box the option exclude from selection is grayed out and so I cant select it. If I make hierarchy inactive in the report and then try it I can do exclude from selection. But now with this filter condition on if I make hierarchy active then it gives me following message:
                                                                                    Invalid filter on 0ACCOUNT: Filter changed                                                                               
    Message no. BRAIN502                                                                               
    Diagnosis                                                                               
    You tried to filter according to an invalid value.                                                                               
    This could be because you filtered according to a hierarchy node which  
        is not visible to the current user.                                                                               
    System response                                                                               
    The filter is not evaluated for the characteristic, but removed instead.
        If no other filter values exist for this characteristic, the system     
        responds to the whole request with the message "no applicable data      
        found".                                                                               
    Thank you,
    sam

    Try placing account number in global filter and do the same (select the account and choose exclude).
    Hope it works.
    Regards

  • Hierarchy relationship report - - Critical and urgent rek

    Hello Everyone,
           I have a critical problem. I have Unit in the row column displayed as hierarchy. Current and past year quantity as RKF in the column and share in relation to US as CKF in the column. US, northeast and southeast are all part of worldwide. When we rollup to worldwide the result should show up just US results in total and not add up all three. I tried many ways but its in vain. Is it possible to get the desired result?? Please any idea would be of great great help.
    CURRENT REPORT RESULT
    Unit--Current-PastShare in relation to US
    Worldwide---10000-5000---200%
    US--5000-2500---100%
    NorthEast3000-1500---60%
    SouthEast2000-1000---40%
    DESIRED RESULT
    Unit--Current-PastShare in relation to US
    Worldwide----5000-2500---100%
    US--5000-2500---100%
    NorthEast3000-1500---60%
    SouthEast2000-1000---40%

    Aneesh,
              This is a display hierarchy created at the characteristic level but each with a different node. US has the states covered by each individual region and Worldwide has US and 2 other regions under it. Is there a way to write a condition stating the worldwide to take just US values and nothing below it.
              Please experts let me know if there is a possibility and hopefully there should be a work around.
    Thanks,

  • G/L Account Hierarchy in BI not following the correct hierarchy in report

    Dear Friends,
         I tried using the queries 0FIGL_V11_Q0002 and also 0FIGL_V10_Q0010 in the both repot the Hierarchy is coming wrong for Example the element which has to come in second node is coming in last node. I have checked the hierarchy assignments in the BI system for the G/L Account.the Hierarchy was properly assigned but the same is not reflecting when i execute the report. Please tell me what might be the problem.
    Thanks in advance
    Karthik

    Hi,
      This is the hierarchy for the Financial statement version, The GL accounts are assigned in a hierarchy for finding out the profit/income and expenditure and loss. These GL accounts are assigned as per the requirement in the GL Account infobjects, but as i told if i execute the report the GL accounts are coming under different nodes irrespective of it is assigned. Let me know if i u want some more details.
    Thanks
    Karthik

  • Hide certain nodes in a hierarchy in report

    Hello all,
    I am having a repport where in I am using a hierachy. There are totally 8 nodes under the root (parent) node. The requirement of the report is to show only two nodes out of it the 6th node and the 8th node.
    Is it possible if yes can someone guide me how?
    Thanks in advance,
    K M

    Hi,
    You can restrict the hierarchy with these two nodes.
    Right click on the characteristic>properties>select required hierarchy-->ok
    again right click on char>restrict>here ylou can restrict the hierarchy with required node by moving them to right window.
    regards
    Message was edited by: Murali

  • How to display an expanded hierarchy in report?

    Hi,
    i'm working with BI 7.0. How do I display a completly expanded Hierarchy in my report. At present I see the hierarchy but the nodes need to be manually expanded in the report.
    pls help,
    SD

    In Query designer under properties of your characteristics there is a separate tab called "hierarchy"; only If hierarchy is active for your characteristic you can change the properties for the hierarchy. If not you will see a message like "no avalaible hierarchy for this characteristics".
    If it is active it will be changeable. For autoopen your hierarchy you should select the point "expand till step" and define here till which step you want autoopen your hierarchy.
    Regards
    Engin

  • Different chart for each level hierarchy in report designer

    Is there a way to display a different chart for each level of the hierarchy in a report designer? I want a different chart for each level. That is, if there are 5 nodes in level 4, I want 5 different nodes. Is there a way to do this? I tried to insert the chart inside a cell in each level, but it shows the same chart for all nodes instead of a different chart for each node.

    Has any one tried using a context sensitive chart?  According to this, it seems like this should be possible, but I am having no luck.
    http://help.sap.com/saphelp_nw70/helpdata/en/47/a99a0a5fdb0985e10000000a42189c/frameset.htm

  • How to activate hierarchy in report?

    Hi experts,
    I want to create a report which will have Sales Office.. and my requirement is Sales Office Hierarchy shoud be active.. What are the steps to activate hierarchy in the report?
    Thank you,
    Swati.

    1. why it is necessary to activate the sales hierarchy.. i mean what is its use??
    > hierarchy helps to view the data at various level. Say you have hierarchy for Plant. Then you can see data at each plant level or total at region level or at country level. Same can be with time - date or week or month or year.
    2. Sort withing the hierarchy according to - sorting by Key or by text - name of plant or plant code.
    3. Expand to level - at what level hier should be diplayed. if there are more levels, then at what level inital report output is required.
    4. Position of Lower level nodes - nodes below / above its previous level.
    5. Values of Posted nodes  & Nodes with only lower level nodes - used to display or hide the data at each node level
    regards: gaurave

  • Warning for hierarchy in report

    Hi,
    when i execute a report with rsrt I get the following warning and no result at all...
    To the InfoObject Balance/P&L-Position ist the Hierarchy "" not available
    When I check the query in BEx Designer, I get the following error...
    To the InfoObject Balance/P&L-Position ist the Hierarchy "TIAS_001" not available.
    However the technical name of the hierarchy is only TIAS.
    could someone pls help me out.
    Thanks,
    SD

    Check you the Hier for this Infoobject is 'Active' ?

  • Missing hierarchy in Report-Report Interface

    Hello friends,
    I have a problem with hierarchies in RRI. The scenario is like this:
    I have two reports based on the same Multiprovider, let's say report A and report B. Report A displays rows based on the Cost Center hierarchy and works fine. Report B displays rows based on Cost Element hierarchy and works fine too. The problem appears, when I am in report A and I jump (I go to) to the report B using RRI - data is not displayed in the hierarchy form anymore.
    Your help will be appreciated.
    Kooyot

    Hello
    This problem became urgent.
    Does anyone have an idea?
    Report A - rows in hierarchy of Cost Centers
    Repot B - rows in hierarchy of Cost Elements
    Kooyot

Maybe you are looking for