Hierarchy Reporting

Hi ,
I built a hierarchy..But it is not showing up in the Query Designer.I did flat file upload for the hierarchy and then maintained the structure.But it is not showing up while reporying.
Can anyone help me with this ..
Thanks ,
kiran.

Hi
I am able to see in infoobject...But in query Desingner i am not able to see.
Thanks,
Kiran.

Similar Messages

  • Abt Hierarchy Reporting

    Hi ALL,
                We have uploaded data from Flat file to hierarchy using IDOC transfer method , data transfered successfully to hierarchy.
    The hierarchy contains following structure ,
    SALES REGION----->> SALES OFFFICE -
    >>SALES REP ID .
    While Creating Hierarchy Report , in query designer we drag the SALES REP ID to rows and right click the
    SALES REP ID -
    >>Properties -
    >> Hierarchy -
    >>Expand Level=10---->ok ... Given
    Note: Hierarchy is active...
    But Still Query  doesnt contain any data in output .
    What is the Reason ??
    Thanks n Advance

    Hi,
             Thanks for the Answers...
           1). The Sales Rep ID is available at infoprovider level ..
           2). We have removed the hierarchy in the query properties , and use Sales rep id alone  in rows and reported but the report doesnt fetch any data ...
            3). In RSH1 we have seen Our Hierarchy Structure presented ...
    need further answers ......
    thanks ....

  • ALV HIERARCHIAL REPORT

    Dear Experts,
    Can anyone tell me how to create a ALV Hierarchial report with one HEADER table and multiple ITEM(child) tables.
    thanks & regards,
    gautam

    Hi you can tray review this code for a example i found in the web and help me:
    REPORT Z_TEST_HIESEQ_REPORT.
    TABLES: ekko,ekpo.
    * selection option
    SELECT-OPTIONS s_ebeln FOR ekko-ebeln.
    TYPE-POOLS:slis.
        * define header table and item table
    DATA: BEGIN OF headertab OCCURS 0,
              ebeln LIKE ekko-ebeln,
              bstyp LIKE ekko-bstyp,
             bsart LIKE ekko-bsart,
             statu LIKE ekko-statu,
             END OF headertab.
        DATA: BEGIN OF itemtab OCCURS 0,
        ebeln LIKE ekpo-ebeln,
        ebelp LIKE ekpo-ebelp,
        matnr LIKE ekpo-matnr,
        werks LIKE ekpo-werks,
        menge LIKE ekpo-menge,
        netpr LIKE ekpo-netpr,
        peinh LIKE ekpo-peinh,
        netwr LIKE ekpo-netwr,
        END OF itemtab.
        DATA: i_fieldcat TYPE slis_t_fieldcat_alv.
        DATA: v_repid LIKE sy-repid.u201Ccurrent program name
        DATA: g_tabname_header TYPE slis_tabname,
        g_tabname_item TYPE slis_tabname.
        * data connect header table and item table
        * we can set 5 field as foreign key at same time
        DATA: gs_keyinfo TYPE slis_keyinfo_alv.
        INITIALIZATION.
        v_repid = sy-repid.
        START-OF-SELECTION.
        PERFORM get_data.
        END-OF-SELECTION.
        * get field catalog of header table
        CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
        i_program_name = v_repid
        i_internal_tabname = 'HEADERTAB'
        i_inclname = v_repid
        i_bypassing_buffer = 'X'
        i_buffer_active = "
        CHANGING
        ct_fieldcat = i_fieldcat
        EXCEPTIONS
        inconsistent_interface = 1
        program_error = 2
        OTHERS = 3.
        IF sy-subrc <;>; 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1
        sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        * get field catalog of item table
        CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
        i_program_name = sy-repid
        i_internal_tabname = 'ITEMTAB'
        i_inclname = v_repid
        i_bypassing_buffer = 'X'
        i_buffer_active = "
        CHANGING
        ct_fieldcat = i_fieldcat
        EXCEPTIONS
        inconsistent_interface = 1
        program_error = 2
        OTHERS = 3.
        IF sy-subrc <;>; 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1
        sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        * set the header and item table are connected by pur doc number
        gs_keyinfo-header01 = 'EBELN'.
        gs_keyinfo-item01 = 'EBELN'.
        g_tabname_header = 'HEADERTAB'.
        g_tabname_item = 'ITEMTAB'.
        CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
        i_callback_program = v_repid
        it_fieldcat = i_fieldcat
        i_save = 'A'
        i_tabname_header = g_tabname_header
        i_tabname_item = g_tabname_item
        is_keyinfo = gs_keyinfo
        i_bypassing_buffer = 'X'
        i_buffer_active = ' '
        TABLES
        t_outtab_header = headertab
        t_outtab_item = itemtab
        EXCEPTIONS
        program_error = 1
        OTHERS = 2.
        IF sy-subrc <;>; 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        FORM get_data.
        SELECT ebeln bstyp bsart statu
        INTO TABLE headertab
        FROM ekko
        UP TO 100 ROWS
        WHERE ebeln IN s_ebeln.
        IF NOT headertab[] IS INITIAL.
        SELECT ebeln ebelp matnr werks menge netpr peinh netwr
        INTO TABLE itemtab
        FROM ekpo
        FOR ALL ENTRIES IN headertab
        WHERE ebeln = headertab-ebeln.
        ENDIF.
        ENDFORM. "get_data
    Edited by: Juan Manuel Garcia on Aug 17, 2010 11:29 PM
    Edited by: Juan Manuel Garcia on Aug 17, 2010 11:36 PM

  • Department / Org. unit Hierarchy report

    Hi Team,
    I am trying to pull a department / org. unit hierarchy report that rolls-up, for example if I am an IT analyst, under Service mgmt, ultimately rolling up to IT (org. unit) similiar to PPOME view.
    I did try a FM (RH_STRUC_GET), but could not get the req. details.
    Let me know if there is something like this, that I can use.
    Thanks
    RL

    Hi,
    Please try evaluation path O-O-S-P in report RHSTRU00 as mentioned by semvladigo.
    Regards,
    Dilek

  • Dynamic hierarchial report

    Hello All,
    I need to write a report whose output format a hierarchy report which varying columns for each key in onereport
    Eg:
    ABC
    COL1    COL2  COL3 COL4  COL5 COL6
    XYZ
    COL1 COL2 COL3
    PQR
    COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8
    MNO
    COL1 COL2
    Please sugest how to do it.
    Ujwal

    Hi Ujwal,
    You can achive this one by populating row_pos and col_pos in the field catalog.
    Thanks and Regards,
    Shakeer Hussain

  • BW Employee Hierarchy report to be specific for the users.

    Hi *,
    My BW system contains the data from HR. There is a report which displays the list of all employees in a strict hierarchial manner with the topmost position being assigned to the highest designation.
    Now the change to this report should be done in such a way that the user who logs in should be able to see only his/her group. That is all the employees who report to him should be displayed with this user at the top.
    Is it possible ? I can create a new report also if required.
    Please suggest so that I can assign points.
    Regards,
    Srinivas

    Hi Srinivas,
    First u need to make that Info Object as Auth Relevant.
    InfoObject > BusinessExplorer tab > Auth Relevant
    In RSSM u need to generate the Auth Object for that.
    Authorization Object
    Regards,
    Ram.

  • Hierarchy Reporting - Suppress levels

    Hi
    I am using a Hiearchy to provide Grouping and Order. However, for certain Queries, I need to report at the lowest level, in Hierarchy Order, but WITHOUT displaying the levels above the lowest level. Any tips on how to do this, preferably within the Query, would be most welcome.
    Thanks

    I don't get a Restrict option on the right-click menu in the row definition. I can Restrict on the Filter tab in Query Designer. But, if I'm interpreting what you're saying correctly, every time the Hierarchy changed I would have to change the hard-coded leaves from the new hierarchy in the query. My Hierarchy is not static enough for this to be an option.
    Is there a way of using (creating?) a variable that would allow choice of Level (04, say), rather than hard-coded specific nodes?

  • Dynamic Hierarchy Reporting function

    Hi All,
    i was looking through the help and found:
    You can choose also whether to view dynamic hierarchies or standard Groups and Entity dimensions in the current view by making the appropriate selecting in the Current View selector. Thereafter, when the application type is consolidation, the dynamic hierarchy replaces Groups and Entity in the Current View. In addition, when you select the Group dimension in the Current View, the dynamic hierarchy stored with ownership application displays instead of the normal dimension hierarchy.
    from http://help.sap.com/saphelp_bpc75/helpdata/en/5A/69200C88AA40C9B18844A25259F147/frameset.htm
    under dynamic hierarchies > reporting on dynamic hierarchies.
    My question is:
    The help indicates there is a 'setting' to make in the current view selector, thereafter when the app type is consolidation, the dynamic hierarchy replaces group/entity - where is setting and how do i set it?
    I have bpc 7.5 sp4
    Edited by: Hiren Amin on Dec 16, 2010 3:13 PM

    Hi Hiren,
    I'm afraid I can't give you good news, as we have the same issue (same version).  We have been told by SAP that this is bug in the MS version, which I believe they are working on, however no news as yet as to when they expect to issue a fix for it.
    Thanks,
    Steve

  • Organization hierarchy Report

    Hi
    Is there a way how to print the organization hierarchy?
    The standard report does met the requirement as there is a specified diagram which was provided or any other tool to publish the hierarchy?
    Thank very much
    Regards

    A couple of Sql queries are detailed in the note - How To Extract HR Organization Hierarchies by SQL? [ID 463359.1]
    Hope that helps.
    Cheers,
    VB

  • Hierarchy report in Webi

    Dear all,
    I have a requirement of webi report as follows.
    I have to display the sales data,credit grade information based on different hierarchies.
    Business line,market class,geography and product.
    I am just thinking how to build the report.
    here is what am thinking
    create 4 blocks for each hierarchy i.e the navigation and create another 2 blocks for sales data and credit grade data.
    whenever I navigate through the hierarchies i.e selection the data of sales and credit grade should change.
    Is this a way to build or is there any other way to build this report
    your help will be highly appreciated
    thanks
    Dheepa

    Hi Ingo,
    Thanks for the reply.
    We are delivering few of the reports in Bex Analyzer as well but if at all the users want them in the webi then what could be the other way to do this in webi.
    Thanks

  • Hierarchy Report

    We are converting an Oracle Forms application to Apex. One of our reports has a section with a table that shows chemicals and their components (along with their percentages) and components of the components (along with the percentages. It is based on a "connect by" query. In Oracle Forms, it displayed very well, so that you could see which were the parent chemicals and which were the components of the components. In Apex, using the Template Builder for Word as the basis for the layout, all of the components show up at the same level, so it looks like the percentages total more than 100.
    This is the query:
    select
    LPAD(' ',12*(level-1) ) as h_level,
    a.percent as percent,
    a.name||'  :  '|| NVL(LPAD(a.component_addt_id,9,'0'),a.component )  as hierarchy
    from
    (select
    ADDITIVE_ID,
    COMPONENT_ADDT_ID,
    NVL(CAS_ID,NAME) as component,
    NAME,
    PERCENT,
    METHOD_ID,
    ACTIVE_INGREDIENT,
    STATUS
    from additive_component
    where status='A'
    ) a
    start with a.additive_id = :additive_id
    connect by prior a.component_addt_id = a.additive_idAny suggestions?
    Edited by: user7817733 on Jan 21, 2011 10:58 AM

    Hi,
    Firstly, this:
    LPAD(' ',12*(level-1) ) as h_level
    would produce multiple spaces on a line in the browser - the browser will ignore anything but the first one. So try:
    LPAD('&amp;nbsp;',12*(level-1) ) as h_level
    Secondly, you could use an Apex Tree region as that is designed for heirarchical output
    Andy

  • Hierarchy Report - is this possible through Crystal Report???

    Hello friends
    We have a requirment as follow:
    In Row : Hierarchy
    In Column: Qty
    we have 3 levels of hierarchy: level1 , level2 and level3
    we want level1 in row and rest two levels in column along with qty
    Row: :Level1
    Col: Level2, Level3, Qty
    please let me know whether its possible through Crystal Report or not,,,I tried out this in BEx (BW) but we cant do that

    Hi Aloke,
    This is possible,
    Create a group on Level1
    In Detail place Lavel2 ,Level3,Qty
    You may insert totals if required.
    Thanks,
    Sastry

  • Hierarchy Report - is this possible through BO???

    Hello friends
    We have a requirment as follow:
    In Row : Hierarchy
    In Column: Qty
    we have 3 levels of hierarchy: level1 , level2 and level3
    we want level1 in row and rest two levels in column along with qty
    Row: :Level1
    Col: Level2, Level3, Qty
    please let me know whether its possible through BO or not,,,I tried out this in BEx (BW) but we cant do that
    Edited by: Alok Kashyap on Feb 2, 2009 9:03 AM

    Hi Alok,
    As I understand you want to set different levels of hierarchies for different Columns objects in the report.
    BO doesnu2019t have the concept of Row and Column Level Hierarchy because when you select any value BO Select all values in column we canu2019t refer any single value in column and we canu2019t refer all related values as record thus Row level hierarchy is not possible.
    You can use Custom Hierarchies to set different hierarchies for different objects.
    Lets Say you Want Object in  Column A to follow Level 1 include that object in Level1 Hierarchy.
    Define Level 2, Level 3 Hierarchy and Include Object in Column 2 in those hierarchies thus Column 2 follows Level 2 and Level 3 Hierarchy.
    When there is confusion about which Hierarchy Level  to follow when at same level it asks user which way to go.
    I Hope this Helpsu2026
    Thanksu2026
    Pratik

  • Creating Hierarchy Report..

    Hi I am new to the ABAP Development and I am facing a problem. I want to create a hierarchy between tables ZSICM2 and Infostructure S961E. I have not Idea how to create a report of this. Could someone please help me in creating a report of creating hierarchy. This is the documentation provided to me by the client.
    <b>For each new record of ZSICM2, we must ensure hierarchies exist in S961E.
    1- Creation of hierarchy:
    Select * from ZSICM2 where ZNEW = ‘X’.
         Submit report RMCA961H (This program should automatically be created when creating infostructure) with all necessary parameters.
    Endselect.</b>
    Also The report RMCA961H, I have no idea where this report will come from because I am not finding it in Library and also It is not being created automatically while creating infostructure.
    Please help me in creating this report.
    Thanks and regards,
    Ravi

    Hi,
    This is the sample report for HIERARIHIAL SEQUENTIAL LIST   report.
    REPORT  YMS_HIERSEQLISTDISPLAY                      .
    Program with FM REUSE_ALV_HIERSEQ_LIST_DISPLAY                      *
    Author : Michel PIOUD                                               *
    Email : [email protected]  HomePage : http://www.geocities.com/mpioud *
    TYPE-POOLS: slis.                    " ALV Global types
    CONSTANTS :
      c_x VALUE 'X',
      c_gt_vbap TYPE SLIS_TABNAME VALUE 'GT_VBAP',
      c_gt_vbak TYPE SLIS_TABNAME VALUE 'GT_VBAK'.
    SELECTION-SCREEN :
      SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max.    "#EC NEEDED
    PARAMETERS p_max(02) TYPE n DEFAULT '10' OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN :
      SKIP, BEGIN OF LINE,COMMENT 5(27) v_2 FOR FIELD p_expand. "#EC NEEDED
    PARAMETERS p_expand AS CHECKBOX DEFAULT c_x.
    SELECTION-SCREEN END OF LINE.
    TYPES :
    1st Table
      BEGIN OF ty_vbak,
        vbeln TYPE vbak-vbeln,             " Sales document
        kunnr TYPE vbak-kunnr,             " Sold-to party
        netwr TYPE vbak-netwr,             " Net Value of the Sales Order
        erdat TYPE vbak-erdat,             " Creation date
        waerk TYPE vbak-waerk,             " SD document currency
        expand TYPE xfeld,
      END OF ty_vbak,
    2nd Table
      BEGIN OF ty_vbap,
        vbeln TYPE vbap-vbeln,             " Sales document
        posnr TYPE vbap-posnr,             " Sales document
        matnr TYPE vbap-matnr,             " Material number
        netwr TYPE vbap-netwr,             " Net Value of the Sales Order
        waerk TYPE vbap-waerk,             " SD document currency
      END OF ty_vbap.
    DATA :
    1st Table
      gt_vbak TYPE TABLE OF ty_vbak,
    2nd Table
      gt_vbap TYPE TABLE OF ty_vbap.
    INITIALIZATION.
      v_1 = 'Maximum of records to read'.
      v_2 = 'With ''EXPAND'' field'.
    START-OF-SELECTION.
    Read Sales Document: Header Data
      SELECT vbeln kunnr netwr waerk erdat
        FROM vbak
          UP TO p_max ROWS
        INTO CORRESPONDING FIELDS OF TABLE gt_vbak.
      IF NOT gt_vbak[] IS INITIAL.
      Read Sales Document: Item Data
        SELECT vbeln posnr matnr netwr waerk
          FROM vbap
          INTO CORRESPONDING FIELDS OF TABLE gt_vbap
           FOR ALL ENTRIES IN gt_vbak
         WHERE vbeln = gt_vbak-vbeln.
      ENDIF.
      PERFORM f_display.
          Form  F_DISPLAY
    FORM f_display.
    Macro definition
      DEFINE m_fieldcat.
        ls_fieldcat-tabname = &1.
        ls_fieldcat-fieldname = &2.
        ls_fieldcat-ref_tabname = &3.
        ls_fieldcat-cfieldname = &4.       " Field with currency unit
        append ls_fieldcat to lt_fieldcat.
      END-OF-DEFINITION.
      DEFINE m_sort.
        ls_sort-tabname = &1.
        ls_sort-fieldname = &2.
        ls_sort-up        = c_x.
        append ls_sort to lt_sort.
      END-OF-DEFINITION.
      DATA:
        ls_layout   TYPE slis_layout_alv,
        ls_keyinfo  TYPE slis_keyinfo_alv,
        ls_sort     TYPE slis_sortinfo_alv,
        lt_sort     TYPE slis_t_sortinfo_alv," Sort table
        ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv." Field catalog
      ls_layout-group_change_edit = c_x.
      ls_layout-colwidth_optimize = c_x.
      ls_layout-zebra             = c_x.
      ls_layout-detail_popup      = c_x.
      ls_layout-get_selinfos      = c_x.
      IF p_expand = c_x.
        ls_layout-expand_fieldname  = 'EXPAND'.
      ENDIF.
    Build field catalog and sort table
      m_fieldcat c_gt_vbak 'VBELN' 'VBAK' ''.
      m_fieldcat c_gt_vbak 'KUNNR' 'VBAK' ''.
      m_fieldcat c_gt_vbak 'NETWR' 'VBAK' 'WAERK'.
      m_fieldcat c_gt_vbak 'WAERK' 'VBAK' ''.
      m_fieldcat c_gt_vbak 'ERDAT' 'VBAK' ''.
      m_fieldcat c_gt_vbap 'POSNR' 'VBAP' ''.
      m_fieldcat c_gt_vbap 'MATNR' 'VBAP' ''.
      m_fieldcat c_gt_vbap 'NETWR' 'VBAP' 'WAERK'.
      m_fieldcat c_gt_vbap 'WAERK' 'VBAP' ''.
      m_sort c_gt_vbak 'KUNNR'.
      m_sort c_gt_vbap 'NETWR'.
      ls_keyinfo-header01 = 'VBELN'.
      ls_keyinfo-item01 = 'VBELN'.
      ls_keyinfo-item02 = 'POSNR'.
    Dipslay Hierarchical list
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
          i_callback_program      = sy-cprog
          i_callback_user_command = 'USER_COMMAND'
          is_layout               = ls_layout
          it_fieldcat             = lt_fieldcat
          it_sort                 = lt_sort
          i_tabname_header        = c_gt_vbak
          i_tabname_item          = c_gt_vbap
          is_keyinfo              = ls_keyinfo
        TABLES
          t_outtab_header         = gt_vbak
          t_outtab_item           = gt_vbap
        EXCEPTIONS
          program_error           = 1
          OTHERS                  = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                               " F_LIST_DISPLAY
          Form USER_COMMAND                                             *
    FORM user_command USING i_ucomm     TYPE sy-ucomm
                            is_selfield TYPE slis_selfield.     "#EC CALLED
      DATA ls_vbak TYPE ty_vbak.
      CASE i_ucomm.
        WHEN '&IC1'.                       " Pick
          CASE is_selfield-tabname.
            WHEN c_gt_vbap.
            WHEN c_gt_vbak.
              READ TABLE gt_vbak INDEX is_selfield-tabindex INTO ls_vbak.
              IF sy-subrc EQ 0.
              Sales order number
                SET PARAMETER ID 'AUN' FIELD ls_vbak-vbeln.
              Display Sales Order
                CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
              ENDIF.
          ENDCASE.
      ENDCASE.
    ENDFORM.                               " USER_COMMAND
    END OF PROGRAM Z_ALV_HIERSEQ_LIST ******************
    Thanks,
    Sankar M

  • BI Security: Hierarchy reporting authorizations

    Hi Guys,
      I have created hierarchy authorization object in RSECADMIN. Included this object in role and assigned
      this role to user. I have four reports in FI. In this four reports this heirarchy authorization is working for
      three reports as per the requirement but the one report is not working. It is showing the message
      " Need authorization". This report also has to show the required hierarchy node.
        Today  I have included one DSO in the same multi provider. Now all reports are not working for the
    authorized users. It is showing the message "No authorization". Till now I haven't generated the
    authorizations in RSECADMIN. Is this the problem? I tried to generate the authorizations in
    RSECADMIN it is showing below error messages.
    InfoProvider ZM_FIAM01 does not contain the required characteristic 0TCTUSERNM
    InfoProvider ZM_FIAM01 does not contain the required characteristic 0TCTAUTH
    InfoProvider ZM_FIAM01 does not contain the required characteristic 0TCTADTO
    InfoProvider ZM_FIAM01 does not contain the required characteristic 0TCTIOBJNM
    InfoProvider ZM_FIAM01 does not contain the required characteristic 0TCTHIENM
    InfoProvider ZM_FIAM01 does not contain the required characteristic 0TCTHIEVERS
    InfoProvider ZM_FIAM01 does not contain the required characteristic 0TCTHIEDATE
    InfoProvider ZM_FIAM01 does not contain the required characteristic 0TCTNIOBJNM
    InfoProvider ZM_FIAM01 does not contain the required characteristic 0TCTNODE
    InfoProvider ZM_FIAM01 does not contain the required characteristic 0TCTATYPE
    InfoProvider ZM_FIAM01 does not contain the required characteristic 0TCTACOMPM
    InfoProvider ZM_FIAM01 does not contain the required characteristic 0TCTTLEVEL
    Please suggest me if I messed any thing.
    Thanks
    Prasad

    Hi Zaheer,
    Hi Aduri,
    Thanks for your response.
    I tried to execute the user with logs in RSECADMIN. Here it is showing the error
    message "Authorizations missing for aggregation (":")".
    I have included 0TCAACTVT, 0TCAIPROV, 0TCAVALID, 0PROFIT_CTR, 0CO_AREA and
    0ASSET__0PROFIT_CTR in authorization object.
    I checked the relevent SAP not " Note 1140831 - Colon authorization during query execution ". In is
    saying to Restrict the characteristic in the query to a certain selection (single value, interval, hierarchy
    node, and so on) and authorize this selection explicitly.
    Thanks
    Prasad

  • Hierarchial report

    Dear All,
    I would like to display the report like below
    Hotel name                       01-May-09     02-May-09    03-May-09    04-May-09
    + Bangalor
        Single                           1000                  2000         3000            500
        Double                          2000                  4000         6000            1000    
    + Mumbai
    +PUNE
    IIf i click on this + Symbol of Bagalor then  tree should open and sub details should display like above
    single and double. If i click again on + symbol tree should close. 
                   Please help me how i can achieve this.
    Thanks in advance,
    Kumar.

    Dear ravi,
    Check the below code
       report  zalv_hierarchical.
    ALV Report for simple hierarchical sequential list display(single child)
    List of SAP tables and their characteristics are displayed as the header
    table  and the list of fields and their characteristics *& form the item table(child table)
    type-pools declarations for alv and icon
    type-pools: slis,icon.
    *structure declaration for table details
    types : begin of ty_dd02l,
    icon type icon_d,
    tabname type tabname,
    tabclass type tabclass,
    contflag type contflag,
    actflag type actflag,
    mainflag type maintflag,
    buffered type buffered,
    as4user type as4user,
    as4date type as4date,
    as4time type as4time,
    expand,
    end of ty_dd02l.
    *internal table and wa decln for table details
    data : it_dd02l type standard table of ty_dd02l,
    wa_dd02l type ty_dd02l.
    *structure declarations for field details
    types : begin of ty_dd03l,
    tabname type tabname,
    fieldname type fieldname,
    keyflag type keyflag,
    mandatory type mandatory,
    checktable type checktable,
    rollname type rollname,
    end of ty_dd03l.
    *Internal table and wa declaration  for field details
    data : it_dd03l type standard table of ty_dd03l,
    wa_dd03l type ty_dd03l.
    *data declarations for ALV
    data : it_fieldcat type slis_t_fieldcat_alv,
    wa_fieldcat type slis_fieldcat_alv,
    it_layout type slis_layout_alv,
    key type slis_keyinfo_alv.
    *Input the tables.User cannot enter a range but can enter any number
    *of tables one by one in this select-options
    select-options : s_table for wa_dd02l-tabname no intervals.
    *initializatin event
    initialization.
    *start-of-selection event
    start-of-selection.
    *subroutine to fetch the data from the tables
      perform fetch_tabledata.
    *subroutine to build alv hierarchy output
      perform hierarchyalv_build.
    *& Form hierarchyalv_build
    text
    --> p1 text
    <-- p2 text
    form hierarchyalv_build .
    *field catalogue
      perform build_fieldcat.
    *layout
      perform build_layout.
    *key information for hierarchy
      perform build_key.
    *output
      perform list_display.
    endform. " hierarchyalv_build
    *& Form build_fieldcat
    text
    --> p1 text
    <-- p2 text
    form build_fieldcat .
      clear wa_fieldcat.
      wa_fieldcat-col_pos = 1.
      wa_fieldcat-fieldname = 'TABNAME'.
      wa_fieldcat-tabname = 'IT_DD02L'.
      wa_fieldcat-seltext_m = 'Tablename'.
      wa_fieldcat-key = 'X'.
      wa_fieldcat-emphasize = 'C610'.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-col_pos = 2.
      wa_fieldcat-fieldname = 'TABCLASS'.
      wa_fieldcat-tabname = 'IT_DD02L'.
      wa_fieldcat-seltext_m = 'Tablecategory'.
      wa_fieldcat-emphasize = 'C600'.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-col_pos = 3.
      wa_fieldcat-fieldname = 'CONTFLAG'.
      wa_fieldcat-tabname = 'IT_DD02L'.
      wa_fieldcat-seltext_m = 'DeliveryClass'.
      wa_fieldcat-emphasize = 'C510'.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-col_pos = 4.
      wa_fieldcat-fieldname = 'ACTFLAG'.
      wa_fieldcat-tabname = 'IT_DD02L'.
      wa_fieldcat-seltext_m = 'Activationstatus'.
      wa_fieldcat-emphasize = 'C500'.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-col_pos = 5.
      wa_fieldcat-fieldname = 'MAINFLAG'.
      wa_fieldcat-tabname = 'IT_DD02L'.
      wa_fieldcat-seltext_m = 'MaintainenceFlag'.
      wa_fieldcat-emphasize = 'C410'.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-col_pos = 6.
      wa_fieldcat-fieldname = 'BUFFERED'.
      wa_fieldcat-tabname = 'IT_DD02L'.
      wa_fieldcat-seltext_m = 'BufferFlag'.
      wa_fieldcat-emphasize = 'C400'.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-col_pos = 7.
      wa_fieldcat-fieldname = 'AS4USER'.
      wa_fieldcat-tabname = 'IT_DD02L'.
      wa_fieldcat-seltext_m = 'User'.
      wa_fieldcat-emphasize = 'C310'.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-col_pos = 8.
      wa_fieldcat-fieldname = 'AS4DATE'.
      wa_fieldcat-tabname = 'IT_DD02L'.
      wa_fieldcat-seltext_m = 'Date'.
      wa_fieldcat-emphasize = 'C300'.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-col_pos = 9.
      wa_fieldcat-fieldname = 'AS4TIME'.
      wa_fieldcat-tabname = 'IT_DD02L'.
      wa_fieldcat-seltext_m = 'Time'.
      wa_fieldcat-emphasize = 'C210'.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-col_pos = 10.
      wa_fieldcat-fieldname = 'ICON'.
      wa_fieldcat-tabname = 'IT_DD02L'.
      wa_fieldcat-seltext_m = 'ICON'.
      wa_fieldcat-icon = 'X'.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-col_pos = 11.
      wa_fieldcat-fieldname = 'FIELDNAME'.
      wa_fieldcat-tabname = 'IT_DD03L'.
      wa_fieldcat-key = 'X'.
      wa_fieldcat-seltext_m = 'Field'.
      wa_fieldcat-emphasize = 'C600'.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-col_pos = 12.
      wa_fieldcat-fieldname = 'KEYFLAG'.
      wa_fieldcat-tabname = 'IT_DD03L'.
      wa_fieldcat-seltext_m = 'Key'.
      wa_fieldcat-emphasize = 'C500'.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-col_pos = 13.
      wa_fieldcat-fieldname = 'CHECKTABLE'.
      wa_fieldcat-tabname = 'IT_DD03L'.
      wa_fieldcat-seltext_m = 'Checktable'.
      wa_fieldcat-emphasize = 'C400'.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-col_pos = 14.
      wa_fieldcat-fieldname = 'MANDATORY'.
      wa_fieldcat-tabname = 'IT_DD03L'.
      wa_fieldcat-seltext_m = 'Mandatory'.
      wa_fieldcat-emphasize = 'C300'.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-col_pos = 15.
      wa_fieldcat-fieldname = 'ROLLNAME'.
      wa_fieldcat-tabname = 'IT_DD03L'.
      wa_fieldcat-seltext_m = 'Dataelement'.
      wa_fieldcat-emphasize = 'C200'.
      append wa_fieldcat to it_fieldcat.
    endform. " build_fieldcat
    *& Form build_layout
    text
    --> p1 text
    <-- p2 text
    form build_layout .
    *to expand the header table for item details
      it_layout-expand_fieldname = 'EXPAND'.
      it_layout-window_titlebar = 'Hierarchical ALV list display'.
      it_layout-lights_tabname = 'IT_DD03L'.
      it_layout-colwidth_optimize = 'X'.
    endform. " build_layout
    *& Form build_key
    text
    --> p1 text
    <-- p2 text
    form build_key .
    **key infomation for the header and item table
      key-header01 = 'TABNAME'.
      key-item01 = 'TABNAME'.
    endform. " build_key
    *& Form list_display
    text
    --> p1 text
    <-- p2 text
    form list_display .
    *ALV output
      call function 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        exporting
          i_callback_program = sy-cprog
          is_layout          = it_layout
          it_fieldcat        = it_fieldcat
          i_tabname_header   = 'IT_DD02L'
          i_tabname_item     = 'IT_DD03L'
          is_keyinfo         = key
        tables
          t_outtab_header    = it_dd02l
          t_outtab_item      = it_dd03l.
    endform. " list_display
    *& Form fetch_tabledata
    text
    --> p1 text
    <-- p2 text
    form fetch_tabledata .
    *select table data
      select tabname
      tabclass
      contflag
      actflag
      mainflag
      buffered
      as4user
      as4date
      as4time
      from dd02l
      into corresponding fields of table it_dd02l
      where tabname in s_table.
    *select field data
      if it_dd02l[] is not initial.
        select tabname
        fieldname
        keyflag
        mandatory
        checktable
        rollname
        from dd03l
        into corresponding fields of table it_dd03l
        for all entries in it_dd02l
        where tabname eq it_dd02l-tabname.
      endif.
    *adding icon to the header table
      loop at it_dd02l into wa_dd02l.
        at new tabname.
          wa_dd02l-icon = '@3M@'.
          modify it_dd02l from wa_dd02l transporting icon where tabname eq wa_dd02l-tabname.
          clear : wa_dd02l.
        endat.
      endloop.
    endform.                    "fetch_tabledata

Maybe you are looking for

  • Iphone and ipad does not find the airprint printer

    After I upgraded my iphone and ipad I lost my airprint function. Ipad and Iphone does not find the airprinter. The printer is a HP Photosmart 5520, and it does work wireless with my Windows PC that is on the same nettwork.

  • To take printout of purchase order

    Hi to all please tell me how to take printout of Purchase order once output message is generated. Please guide me... Regards Anubhav

  • SAP Dialog Process Number

    Dears: I just finish installation of my ECC 6.0 server. Now i want to change the number of the SAP dialog process. And do you know if there is any calculate formula to use so that i can know how many dialog process i should set for the server?

  • Php/mysql: can't write to mysql database [SOLVED]

    I'm writing a login script using php and mysql. I got it to work on my server about a week ago, and then I set up apache, php and mysql on my netbook so that I could take my code with me and test it. Now it doesn't work. My registration script doesn'

  • Embedded SWF in CR - is Java Viewer supported?

    We are attempting to embed a XC SWF in a Crystal Report that is essentially a group of buttons that will allow the user to export filtered data from the report to another system for use by that system u2013 basically integrating discovery from the BI