Creating a Tree Reports

I would like to create a region that combines the following tree and report region features.
TREE FUNCTIONALITY:
- the ability to show/hide individual nodes.
REPORT FUNCTIONALITY:
- the ability to display multiple fields
- highlight search words
- have multiple drill down paths in one row.
I've played a little with the following two ideas:
1. Base the report on a collection that has a hide/show flag. Create a report link that runs a process that updates this field. My concern with this approach is performance. I found the report based on a collection takes more time than running directly against the database. In production this issue will be greater as every user will be caching a fairly large collection every time they log onto to the system.
2. Use the connect_by function to create a hierarchical sql result set and then use javascript to show/hide nodes. However, I could figure out how to hide nodes/rows using javascript.
Does anyone have any suggestions?
Thanks,
David

On Thu, 14 Apr 2011 10:06:04 +0000, cps7 wrote:
> ZLM73 creates a eDir tree on install. Is that tree used only for ZLM and
> I need another tree to keep all user information? Or should I create
> another tree to keep users profiles?
>
> Also is this a good approach if I want in future expand network with win
> server and win xp machine and ZDM?
That tree is meant just for ZLM itself. That one uses it as the object
store where meta data of the all the bundles, devices, policies and so on
is stored. I should not be used for other things.
You know that ZCM 11 is out for a few months now and that is the next
version of ZLM. Not everything is in for the linux systems, but for the
windows systems. So if you plan to have both worlds, I would take a look
at that and see if it fits your needs better then ZLM which you can use
only for linux systems.
Rainer

Similar Messages

  • Is it possible to create hierarchical tree report (not group tree) CR2008?

    Hi,
    Is it possible to create hierarchical tree kind report using CR 2008(no group tree in the report)?  The report somewhat look like below and a node can have multiple Child and so and so. Is there any magical way either as a chart or any object which supports the below structure.
                                                          Parent1
                                           Child1              Child2             Child3             Child4          Child5
                     Child1A     Child1B      Child1C
        Child1Aa  Child1Ab
    its hierarchical tree  structure and it should be in detail section of the report so that print in paper is possible.
    Please help first of all, can we able to create a report in above structure(each item needs to be surronuded with box and the each last child will contain a table valued data.
    (if I post this thread, it may look like plain text, please consider the above data as a hierarchical tree  structure with child having N number of children)
    Thanks

    Moved from .NET Development - Crystal Reports forum to Crystal Reports Design forum.
    Ludek

  • Required Sample Programs on Tree Reports using ALV and Reports

    Hi Pals,
       I require sample progrms on Tree Reports using Function Modules for both ALV and Classical Reports. Send the list of sample programs and function modules used for tree reports.
    Regards,
    Pradeep.g
    <removed by moderator>

    Check these threads..U can find sample programs.
    tree type report
    ALVtree reports - Example code and information on creating ALV tree reports
    http://www.sapdevelopment.co.uk/reporting/alv/alvtree.htmhttps://alv tree
    ALso check this DEMO Program
    SAPCOLUMN_TREE_CONTROL_DEMO
    CL_GUI_ALV_COLUMN_TREE
    Sample code:
    http://www.geocities.com/victorav15/sapr3/utilities/zvvooa3.txt

  • Creating TREE REPORT with CHECKBOX against each row

    Hi Friends,
    I need to create a <b>TREE REPORT with  CHECK BOX</b> against each row. when the user selects a row and clicks on a custom button then those should get populated into an internal table. <b>This is HIGH priority</b> one and I have tried my best but couldnt find any solution. Please advise me some sol.
    thanks in advance for your valuable time and help.
    Regards
    srithan
    Message edited by me for easyness
            Reddy

    Hi
    Following code is to add checkboxes in ALV tree:
    FORM add_root_request USING pls_data_ TYPE csg_gs_outtab_p_key__l_is_sub_node_ TYPE c
    CHANGING pl_carrid_key._node = nodes->add_node( related_node = p_key
    relationship = cl_gui_column_tree=>relat_last_child ).
    ... §0.2 if information should be displayed at
    the hierarchy column set the carrid as text for this node
    text = p_ls_data-object.
    node->set_text( text ).
    ... §0.3 set the data for the nes node
    node->set_data_row( p_ls_data ).
    item = node->get_hierarchy_item( ).
    item = node->get_item( 'FCHECKBOX' ). "FCHECKBOX is my radio button field in internal table which I am using to populate the ALV
    item->set_type( if_salv_c_item_type=>checkbox ).
    pl_carrid_key = node->get_key( )._
    CATCH cx_salv_msg.
    ENDFORM_._Following code is for handling checbox_change event
    PERFORM application_action_events.
    FORM application_action_events .
    data: lr_events type ref to cl_salv_events_tree.
    *data gr_events type ref to lcl_handle_events.
    lr_events = gr_tree->get_event( ).
    create object gr_events.
    set handler gr_events->check for lr_events.
    set handler gr_events->on_link_click for lr_events.
    set handler gr_events->on_before_user_command for lr_events.
    set handler gr_events->on_after_user_command for lr_events.
    set handler gr_events->on_keypress for lr_events.
    endform. " application_action_events----
    CLASS lcl_handle_events DEFINITION.
    PUBLIC SECTION.
    METHODS:
    check FOR EVENT checkbox_change OF cl_salv_events_tree IMPORTING node_key columnname checked. "Here node_key is the row number
    ENDCLASS. "lcl_handle_events DEFINITION
    CLASS lcl_handle_events IMPLEMENTATION
    §4.2 implement the events for handling the events of cl_salv_table
    CLASS lcl_handle_events IMPLEMENTATION_._
    METHOD check_._
    WRITE 'hello'_._
    DATA lwa_modify_check_ TYPE REF TO csg_gs_outtab.
    node_key = node_key - 1_._
    READ TABLE csg_gt_list INDEX node_key REFERENCE INTO lwa_modify_check._
    if columnname = 'FCHECKBOX'_._
    IF checked = 'X'_._
    If the value in internal table is set to X, then it is deselct
    lwa_modify_check->fcheckbox =_ ' '_._
    ELSE_._
    lwa_modify_check->fcheckbox =_ 'X'_._
    ENDIF_._
    ENDIF_._
    if columnname = 'CHECKBOX_READ'_._
    IF checked = 'X'_._
    If the value in internal table is set to X, then it is deselct
    lwa_modify_check->checkbox_read =_ ' '_._
    ELSE_._
    lwa_modify_check->checkbox_read =_ 'X'_._
    ENDIF_._
    ENDIF_._
    *MODIFY TABLE csg_gt_list from l_wa_modify_check.
    flag_test = flag_test + 1_._
    ENDMETHOD_._ "check
    ENDCLASS_._ "lcl_handle_events IMPLEMENTATION
    Please give me reward points

  • How to create a dynamic tree report

    hi experts,
           i have a requirement to create a dynamic tree report in OM module.
      this report should show the number of people positions required in a org unit, and also the number of people available in a org unit.
      There is something called as qualification catalog to which qualifications are attached, to these qualifications org units are attached, these org units will have some positions attached to it, and each of this position might have a person attached to it.
    The user will enter the qualification catalog number in the selection screen for which he should be getting the result in a tree format which flows from qualification catalog to qualifications, from qualifications to org units, from orgunits to the total no of positions present in this orgunit and the no of positions occupied in the orgunit.
      This is a challenging job as far as i am concerned.
    Please suggest me a way to approach this,i promise to reward the answers.
    thanks in advance,
      santosh.

    Hi,
    Check the demo tree programs for yuor requirement?
    SAP List Tree:  SAPSIMPLE_TREE_CONTROL_DEMO
    SAP Column Tree : SAPCOLUMN_TREE_CONTROL_DEMO
    SAP Easy Tree : SAPSIMPLE_TREE_CONTROL_DEMO
    Thanks,
    Ramakrishna

  • Create a tree node and show the report on the same page

    Hi,
    I have created a tree for our organization and each node represents a unit. The top one is office level and followed by division and brach.
    I have created a reprot on the same page as the tree node.
    What I want to do is:
    I would like to click a specific node and the report shows only that node and bellow. So, If I click division A and division A has two branch. my report shows only those two braches that bellong to division A.
    Can someone help me?
    Thank you

    The only way it could work is using iframes. Now OBIEE 11g would not allow iframes inside it's dashboard. It offers a dashboard object called "Embedded content" which is a restricted iframe kinda thing but unless you get this object's id from generated HTML you can change it's content dynamically. Besides, such an implementation may break with next patch. So here is an idea.
    Create a HTML page with two iframes, left one will hold all the reports with links (you can always generate a list of reports through catalog manager, open it in excel and make HTML links from it) that open report urls (in the format of ./saw.dll?GO&Path=....) in right iframe (using javascript open.window method). Once that page is working, call this page from dashboard using an action link. This is slightly twisted approach but at least it would give you what you asked for.
    About making the report list dynamic, I am afraid there are no easy answers. OBIEE provides web service that will allow the users to query catalog to get a list of reports. You can try some basic JSP to access the web service and generate the list dynamically. But that is not something I can provide here.

  • Create Group Tree option no longer available in report designer

    I am currently using Crystal Reports 2008 report designer to create reports which are embedded in our application.  We deploy a run time version of Crystal within our application.  In previous versions there was a report setting in the report designer to "Create Group Tree", this appears to no longer be available in Crystal 2008.  My question is... Is there a way to enable this option outside of the report designer?  Is there a setting that I am just missing?  This is causing an issue since I cannot upgrade existing reports to the 2008 version without losing the ability to display the group tree.   thanks

    CR 2008 only has a .NET Report engine now so I moved your post to the .NET SDK forum.
    I kind of recall this may have been and RDC API, there is no RDC in CR 2008 and the Embedded Designer is for use in the Visual Studio .NET IDE for creating reports only. No longer licensed to be used in an application nor can it be distributed. If you were using crpe32.dll it is no longer supported as of CR 9.
    Search here also, lots of posts on various how to's.
    Thank you
    Don

  • ORA-06502 in the Tree Report

    I am encountering the following error on my Tree report occasionally. "Unexpected error ORA-06502: PL/SQL: numeric or value error: character string buffer too small". Apex version 3.x (I think not sure), Database 10.1.0.4
    I have noticed that I can keep on expanding nodes a couple of times and then suddenly I get error. After I logoff and logon again, I can get tree displayed and then after few expands I receive the error. I have reduced MAX LEVEL from 5 to 1. Here is the query and the table:
    select "METHOD_ID" id,
    "P_METHOD_ID" pid,
    method_id || ' : ' || P_method_id || ' : ' ||
    PROJECT_NAME || ' : ' ||
    package_name || ' : ' ||
    class_name || ' : ' ||
    method_name name,
    'f?p=&APP_ID.:10:&SESSION.::NO::GLB_METHOD_ID:'||"METHOD_ID" link,
    null a1,
    null a2
    from java2java_usedby h .
    The table java2java is:
    CREATE TABLE JAVA2JAVA_USEDBY
    METHOD_ID NUMBER(15) NOT NULL,
    PROJECT_NAME VARCHAR2(200 BYTE),
    COMPONENT_NAME VARCHAR2(200 BYTE),
    PACKAGE_NAME VARCHAR2(200 BYTE),
    CLASS_NAME VARCHAR2(200 BYTE),
    METHOD_NAME VARCHAR2(200 BYTE),
    P_METHOD_ID NUMBER
    NOLOGGING ;
    CREATE UNIQUE INDEX JAVA2JAVA_USEDBY_U1 ON JAVA2JAVA_USEDBY
    (P_METHOD_ID, METHOD_ID)
    NOLOGGING;
    This table allows a row to have multiple parents. So for a given method_id, there could be more than one p_method_id.
    Method ID values are 10-12 digits

    Vasant - It would be ideal if you could show this problem on apex.oracle.com.
    There was an error with similar symptoms reported and discussed here: Tree error, after Expand All, then collapsing any node, ORA-6502/6512 , so if you could determine the version of Application Express you are using that might be useful.
    Scott

  • Development of alv tree report using classes from basics

    Hi,
    Need a simple ALV tree report by showing the reason for why we are using the classse so that i can build a ALV report in the same manner.
    i have the data from MARA for given materials and their descriptions.Now in the basiv out put MARA information should come and tree out put for the material description when the user selects the maerial.
    A hot spot should come on the material and if he opts click the material then MM03 out put should come.
    Help me out in this regard
    Regards
    Naren

    Ok, but the importance of ABAP OO, should not be taken from an example ALV tree, but more in general. There are several good  articles on this on SCN. But for example in this particular case (ALV Tree), you should already see the importance as far as object instances and inheritance is concerned. Without much work, you can create an instance of an ALV tree, and all the attributes, methods etc. are there for use. Some of the methods / attributes are inherited from other superclasses.
    There are propably even more things to be mentioned here which emphasizes the importance of ABAP OO in ALV tree, but as far as I'm concerned, this is about it for me.

  • Hierarchial ALV  Tree Report.

    Hi!
    iam designing a module pool to get all the info of the idoc like status record control record etc.the 3 rd screen would be a hierarchial tree structure.All the data would be retrieved from Z tables.
    My requirement is on the left side of the pane the tree would contain 6 tables as nodes and these would be constant for all the idoc numbers.On the right side of the screen i would have to populate the complete data from these tables.
    When user clicks on the first table only that table data needs to appear.This would be only a display report.
    Plz tell me if this logic would work
    I will create the tree structure on the left side of the pane with all the 6 tables as default.I would also define a subscren on the right side and would call a table control for the respective tables along with the data populated in them.
    Now can i link the double click event of the tree ie the table name to populate the table control in the subscreen.
    Please provide suggestions.
    thanks
    kedar

    HI Kedar,
    What u r trying to do is going to work.
    Evn I tried to do the same, but since I ahve less knowledge in ALV class I couldnt do it.
    U can refer to DWDM, it is for demo programs...it has ALV tree method

  • Output of tree report to be downloaded to html format

    Hi Techies,
               how to download output of a tree report( created using oo abap)  into HTML format.
    Thanks,
    Briteny.

    Hi,
    I don't think it can be done easily, you'll have to code it yourself (not so complex if it's a custom program, if you keep things simple with the UL and LI HTML elements, and maybe even by adding TABLE, TR and TD if it's a column tree). Is the ALV tree built by standard or custom program? Is it a simple tree, or a column tree, or even mixed with ALV, or what?
    Sandra

  • Creating Hirarchal/ Recursive report like the Balance Sheet in Quickbook in rdlc

    Hi All Experts,
    I am creating an Account Software FMS, here I facing a problem to create a Hirarchal report with drill through report in RDLC. the problem which i facing is to create a Trail Balance in the Hirarchal / Recursive form where there are Parent and more child
    accounts are oriented and I want to see it in the Parent/Child for like in Tree view. Kindly help me in this regards you can give me example on the Employees table of Northwind database where managerID and ReportsTo fields link it.
    thanks in Advance.

    Hi Afridi_ALAMDAR,
    According to your description, you want to have a hierarchy structure in your rdlc report. Right?
    In Reporting Services, if you want to have a tree view to navigate to corresponding fields, you can use a document map to achieve your goal. A document map provides a set of navigational links to report items in a rendered report. We just need to set the
    document on group level so that it will create tree nodes within this group. For more information, please see:
    Create a Document Map (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • ALV Tree Report without using ABAP Objects

    Hi all,
    I want to know the name of a function module to create ALV Tree in SE38 as a report. I am required to create this ALV Tree Report without using ABAP OBJECTS. Can u pls help me as early as possible.

    Hi
    see this link
    http://www.sapdev.co.uk/reporting/alv/alvtree.htm
    *& Report  ZBCALV_TREE
    REPORT  ZBCALV_TREE.
    class cl_gui_column_tree definition load.
    class cl_gui_cfw definition load.
    data tree1  type ref to cl_gui_alv_tree.
    data mr_toolbar type ref to cl_gui_toolbar.
    include <icon>.
    include bcalv_toolbar_event_receiver.
    include bcalv_tree_event_receiver.
    data: toolbar_event_receiver type ref to lcl_toolbar_event_receiver.
    data: gt_VBAK  type VBAK occurs 0,      "Output-Table
          gt_fieldcatalog type lvc_t_fcat, "Fieldcatalog
          ok_code like sy-ucomm.           "OK-Code
    start-of-selection.
    end-of-selection.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
          text
    module STATUS_0100 output.
      SET PF-STATUS 'MAIN'.
    if tree1 is initial.
        perform Zinit_tree.
      endif.
      call method cl_gui_cfw=>flush.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Form  Zinit_tree
          text
    -->  p1        text
    <--  p2        text
    form Zinit_tree .
    perform Zbuild_fieldcatalog.
    create container for alv-tree
    data: l_tree_container_name(30) type c,
            l_custom_container type ref to cl_gui_custom_container.
      l_tree_container_name = 'TREE1'.
    if sy-batch is initial.
        create object l_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'.                        "#EC NOTEXT
        endif.
      endif.
    create tree control
      create object tree1
        exporting
            parent              = l_custom_container
            node_selection_mode = cl_gui_column_tree=>node_sel_mode_single
            item_selection      = 'X'
            no_html_header      = ''
            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.
    create Hierarchy-header
      data l_hierarchy_header type treev_hhdr.
      perform zbuild_hierarchy_header changing l_hierarchy_header.
    create info-table for html-header
      data: lt_list_commentary type slis_t_listheader,
            l_logo             type sdydo_value.
      perform Zbuild_comment using
                     lt_list_commentary
                     l_logo.
    repid for saving variants
      data: ls_variant type disvariant.
      ls_variant-report = sy-repid.
    create emty tree-control
      call method tree1->set_table_for_first_display
        exporting
          is_hierarchy_header = l_hierarchy_header
          it_list_commentary  = lt_list_commentary
          i_logo              = l_logo
          i_background_id     = 'ALV_BACKGROUND'
          i_save              = 'A'
          is_variant          = ls_variant
        changing
          it_outtab           = gt_VBAK "table must be emty !!
          it_fieldcatalog     = gt_fieldcatalog.
    create hierarchy
      perform Zcreate_hierarchy.
    add own functioncodes to the toolbar
      perform zchange_toolbar.
    register events
      perform zregister_events.
    endform.                    " Zinit_tree
    *&      Form  Zbuild_fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    form Zbuild_fieldcatalog .
    get fieldcatalog
      call function 'LVC_FIELDCATALOG_MERGE'
        exporting
          i_structure_name = 'VBAK'
        changing
          ct_fieldcat      = gt_fieldcatalog.
      sort gt_fieldcatalog by scrtext_l.
    change fieldcatalog
      data: ls_fieldcatalog type lvc_s_fcat.
      loop at gt_fieldcatalog into ls_fieldcatalog.
        case ls_fieldcatalog-fieldname.
          when 'AUART' .
            ls_fieldcatalog-no_out = 'X'.
            ls_fieldcatalog-key    = ''.
        endcase.
        modify gt_fieldcatalog from ls_fieldcatalog.
      endloop.
    endform.                    " Zbuild_fieldcatalog
    *&      Form  zbuild_hierarchy_header
          text
         <--P_L_HIERARCHY_HEADER  text
    form zbuild_hierarchy_header changing
                                   p_hierarchy_header type treev_hhdr.
      p_hierarchy_header-heading = 'Hierarchy Header'.          "#EC NOTEXT
      p_hierarchy_header-tooltip =
                             'This is the Hierarchy Header !'.  "#EC NOTEXT
      p_hierarchy_header-width = 30.
      p_hierarchy_header-width_pix = ''.
    endform.                    " zbuild_hierarchy_header
    *&      Form  Zbuild_comment
          text
         -->P_LT_LIST_COMMENTARY  text
         -->P_L_LOGO  text
    form Zbuild_comment   using
                           pt_list_commentary type slis_t_listheader
                           p_logo             type sdydo_value.
    data: ls_line type slis_listheader.
    LIST HEADING LINE: TYPE H
      clear ls_line.
      ls_line-typ  = 'H'.
    LS_LINE-KEY:  NOT USED FOR THIS TYPE
      ls_line-info = 'ALV-tree-demo: flight-overview'.          "#EC NOTEXT
      append ls_line to pt_list_commentary.
    STATUS LINE: TYPE S
      clear ls_line.
      ls_line-typ  = 'S'.
      ls_line-key  = 'valid until'.                             "#EC NOTEXT
      ls_line-info = 'January 29 1999'.                         "#EC NOTEXT
      append ls_line to pt_list_commentary.
      ls_line-key  = 'time'.
      ls_line-info = '2.00 pm'.                                 "#EC NOTEXT
      append ls_line to pt_list_commentary.
    ACTION LINE: TYPE A
      clear ls_line.
      ls_line-typ  = 'A'.
    LS_LINE-KEY:  NOT USED FOR THIS TYPE
      ls_line-info = 'actual data'.                             "#EC NOTEXT
      append ls_line to pt_list_commentary.
      p_logo = 'ENJOYSAP_LOGO'.
    endform.                    " Zbuild_comment
    *&      Form  Zcreate_hierarchy
          text
    -->  p1        text
    <--  p2        text
    form Zcreate_hierarchy .
    data: ls_vbak type vbak,
          lt_vbak  type vbak occurs 0.
    get data
      select * from vbak into table lt_vbak
                            up to 200 rows .                "#EC CI_NOWHERE
      sort lt_vbak by AUART.
    add data to tree
      data: l_AUART_key type lvc_nkey.
    loop at lt_vbak into ls_vbak.
        on change of ls_vbak-AUART.
          perform Zadd_AUART_line using   ls_vbak
                                  changing l_AUART_key.
        endon.
      endloop.
    calculate totals
      call method tree1->update_calculations.
    this method must be called to send the data to the frontend
      call method tree1->frontend_update.
    endform.                    " Zcreate_hierarchy
    *&      Form  Zadd_AUART_line
          text
         -->P_LS_vbak  text
         -->P_0379   text
         <--P_L_AUART_KEY  text
    form Zadd_AUART_line  using    p_ls_vbak type vbak
                                   p_relat_key type lvc_nkey
                         changing  p_node_key type lvc_nkey.
      data: l_node_text type lvc_value,
            ls_vbak type vbak.
    set item-layout
      data: lt_item_layout type lvc_t_layi,
            ls_item_layout type lvc_s_layi.
      ls_item_layout-t_image = '@3P@'.
      ls_item_layout-fieldname = tree1->c_hierarchy_column_name.
      ls_item_layout-style   =
                            cl_gui_column_tree=>style_intensifd_critical.
      append ls_item_layout to lt_item_layout.
    add node
      l_node_text =  p_ls_vbak-AUART.
      data: ls_node type lvc_s_layn.
      ls_node-n_image   = space.
      ls_node-exp_image = space.
      call method tree1->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_vbak
          is_node_layout   = ls_node
          it_item_layout   = lt_item_layout
        importing
          e_new_node_key   = p_node_key .
    endform.                    " Zadd_AUART_line
    *&      Form  zchange_toolbar
          text
    -->  p1        text
    <--  p2        text
    form zchange_toolbar .
    get toolbar control
      call method tree1->get_toolbar_object
        importing
          er_toolbar = mr_toolbar.
      check not mr_toolbar is initial.
    add seperator to toolbar
      call method mr_toolbar->add_button
        exporting
          fcode     = ''
          icon      = ''
          butn_type = cntb_btype_sep
          text      = ''
          quickinfo = 'This is a Seperator'.                    "#EC NOTEXT
    add Standard Button to toolbar (for Delete Subtree)
      call method mr_toolbar->add_button
        exporting
          fcode     = 'DELETE'
          icon      = '@18@'
          butn_type = cntb_btype_button
          text      = ''
          quickinfo = 'Delete subtree'.                         "#EC NOTEXT
    add Dropdown Button to toolbar (for Insert Line)
      call method mr_toolbar->add_button
        exporting
          fcode     = 'INSERT_LC'
          icon      = '@17@'
          butn_type = cntb_btype_dropdown
          text      = ''
          quickinfo = 'Insert Line'.                            "#EC NOTEXT
    set event-handler for toolbar-control
      create object toolbar_event_receiver.
      set handler toolbar_event_receiver->on_function_selected
                                                          for mr_toolbar.
      set handler toolbar_event_receiver->on_toolbar_dropdown
                                                          for mr_toolbar.
    endform.                    " zchange_toolbar
    *&      Form  zregister_events
          text
    -->  p1        text
    <--  p2        text
    form zregister_events .
    define the events which will be passed to the backend
      data: lt_events type cntl_simple_events,
              l_event type cntl_simple_event.
    define the events which will be passed to the backend
      l_event-eventid = cl_gui_column_tree=>eventid_expand_no_children.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_checkbox_change.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_header_context_men_req.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_item_context_menu_req.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_header_click.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_item_keypress.
      append l_event to lt_events.
      call method tree1->set_registered_events
        exporting
          events                    = lt_events
        exceptions
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
      if sy-subrc <> 0.
        message x208(00) with 'ERROR'.                          "#EC NOTEXT
      endif.
    set Handler
      data: l_event_receiver type ref to lcl_tree_event_receiver.
      create object l_event_receiver.
      set handler l_event_receiver->handle_node_ctmenu_request
                                                            for tree1.
      set handler l_event_receiver->handle_node_ctmenu_selected
                                                            for tree1.
      set handler l_event_receiver->handle_item_ctmenu_request
                                                            for tree1.
      set handler l_event_receiver->handle_item_ctmenu_selected
                                                            for tree1.
    endform.                    " zregister_events
    *&      Module  USER_COMMAND_0100  INPUT
          text
    module USER_COMMAND_0100 input.
    ok_code  = sy-ucomm.
    clear sy-ucomm.
    case ok_code.
        when 'EXIT' or 'BACK' or 'CANC'.
          perform Zexit_program.
        when others.
          call method cl_gui_cfw=>dispatch.
      endcase.
      clear ok_code.
      call method cl_gui_cfw=>flush.
    endmodule.                 " USER_COMMAND_0100  INPUT
    *&      Form  Zexit_program
          text
    -->  p1        text
    <--  p2        text
    form Zexit_program .
      call method tree1->free.
      leave program.
    endform.                    " Zexit_program
    <b>Reward if usefull</b>

  • Hierarchical tree Report

    Hello Experts,
    I am creating a Heirarchical tree Report using class CL_GUI_ALV_TREE.
    For getting the Heirarchical data of my requirement , I am using BAPI CL_GUI_ALV_TREE in which table E_WBS_HIERARCHIE_TABLE contain all of data.
    I am stcuk , how to write the logic to use this data to build a tree, ( Data format in the table is : WBS_Elemant , Project Defination, Up , Down , Left , right).
    Please suggest me the logic or any function module ( Or method) which uses this data to buld a tree. I am using ADD_NODE methos to add a node in the tree.
    Thanks & Regards
    Mohit

    Hi,
    What needs to be done is import the data into a local table and then use that one to display your alv tree.
    Try searching on sdn or google for similar code.
    Manish

  • TREE Report for WBS Element

    hi gurus,
             can any one tell me how to generate the hierarchical (tree ) report for a purticular project.
    I should genarate a hierarchical report for all WBS (From top level to lower level WBS ).
    With Regards,
    Raj.

    Hi raj,
    check BCALV_TREE_02 for ALV TREE DISPLAY ( for more clarification debug it )
    * my final table structure
            BEGIN OF gty_fin ,
             posid TYPE ps_posid,
             pspnr TYPE ps_intnr,
             post1 TYPE ps_post1,
             ebeln TYPE ebeln,
             ebelp TYPE ebelp ,
             name1 TYPE name1,
             belnr TYPE mblnr ,
             cplan TYPE wtgxxx ,
             netpr TYPE ekpo-netpr ,
             dmbtr TYPE dmbtr ,
             obligo TYPE dmbtr,
             vefugt TYPE dmbtr,
             verfugbar TYPE dmbtr,
            END OF gty_fin ,
    * Coding starts here in ur PBO
    *do modification accordingly
    MODULE status_0100 OUTPUT.
        PERFORM init_tree.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    FORM init_tree .
    * create container for alv-tree
      DATA: l_tree_container_name(30) TYPE c.
      l_tree_container_name = 'CCONTAINER1'.
      CREATE OBJECT g_custom_container
        EXPORTING
          container_name              = l_tree_container_name
    * create tree control
      CREATE OBJECT g_alv_tree
        EXPORTING
          parent                      = g_custom_container
          node_selection_mode         = cl_gui_column_tree=>node_sel_mode_single
          item_selection              = ' '
          no_html_header              = 'X'.
      DATA l_hierarchy_header TYPE treev_hhdr.
      PERFORM build_hierarchy_header CHANGING l_hierarchy_header.
    * Hide columns and sum up values initially using the fieldcatalog
      PERFORM build_fieldcatalog.
      CALL METHOD g_alv_tree->set_table_for_first_display
        EXPORTING
          is_hierarchy_header = l_hierarchy_header
        CHANGING
          it_fieldcatalog     = git_fieldcatalog
          it_outtab           = git_edit. "table must be empty !
      PERFORM create_hierarchy.
      PERFORM register_events.
      CALL METHOD g_alv_tree->update_calculations.
    * Send data to frontend.
      CALL METHOD g_alv_tree->frontend_update.
    ENDFORM.                    "init_tree
    " INIT_TREE
    *&      Form  BUILD_HIERARCHY_HEADER
    FORM build_hierarchy_header  CHANGING
                                     p_hierarchy_header TYPE treev_hhdr.
      p_hierarchy_header-heading = 'Project Definition'(002).
      p_hierarchy_header-tooltip = 'Project Definition'(002).
      p_hierarchy_header-width = 35.
      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  build_fieldcatalog
    FORM build_fieldcatalog.
      DATA: lwa_fieldcatalog TYPE lvc_s_fcat.
    * The following function module generates a fieldcatalog according
    * to a given structure.
      REFRESH git_fieldcatalog.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'ZDRK'       "  i created a structure same as final itab.
        CHANGING
          ct_fieldcat      = git_fieldcatalog.
      LOOP AT git_fieldcatalog INTO lwa_fieldcatalog.
        CASE lwa_fieldcatalog-fieldname.
    * hide columns which are already displayed in our tree
          WHEN 'POSID' OR 'PSPNR' OR 'EBELN' OR 'EBELP' OR 'POST1'.
            lwa_fieldcatalog-no_out = 'X'.
    ** Do some initial calculations:
    ** ALV Tree uses the field 'do_sum' to declare that a function
    ** for the corresponding column shall be calculated.
    ** Use 'h_ftype' to set the function type (MAX, MIN, SUM, AVG).
          WHEN 'DMBTR' OR 'OBLIGO'  OR 'VEFUGT' OR 'VERFUGBAR'. " 'CPLAN' OR
            lwa_fieldcatalog-do_sum = 'X'.
            lwa_fieldcatalog-h_ftype = 'SUM'.
          WHEN 'BELNR'.
            lwa_fieldcatalog-hotspot = 'X'.
            lwa_fieldcatalog-tooltip = 'Invoice Document Number'(003).
        ENDCASE.
        MODIFY git_fieldcatalog FROM lwa_fieldcatalog.
      ENDLOOP.
    ENDFORM.                               " build_fieldcatalog
    *&      Form  create_hierarchy
    FORM create_hierarchy.
      DATA: ls_fin TYPE gty_fin,
          lt_fin TYPE TABLE OF gty_fin,
          lv_posid1_last TYPE ps_posid,
          lv_ebeln TYPE ebeln,
          lv_post1 TYPE ps_post1,
          lv_ebeln_last TYPE ebeln,
          lv_ebelp TYPE ebelp.
      DATA: lv_ebeln_key TYPE lvc_nkey,
            lv_ebelp_key TYPE lvc_nkey,
            lv_last_key TYPE lvc_nkey,
            lv_top_key TYPE lvc_nkey,
            lv_node_text TYPE lvc_value,
            lv_text_psp TYPE char10 .
      lv_text_psp = 'Project'(004).
    * all my data is in final itab git_fin
      lt_fin[] = git_fin .
      lv_node_text = gv_proj.
      CALL METHOD g_alv_tree->add_node
        EXPORTING
          i_relat_node_key = ''
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = lv_node_text
        IMPORTING
          e_new_node_key   = lv_top_key.
      LOOP AT lt_fin INTO ls_fin.
        lv_posid1 = ls_fin-posid.
        lv_post1  = ls_fin-post1.
        lv_ebeln  = ls_fin-ebeln.
        lv_ebelp  = ls_fin-ebelp.
        IF lv_posid1 <> lv_posid1_last.     " on change of posid
          lv_posid1_last = lv_posid1.
    * PO- ebeln nodes
          PERFORM add_ebeln USING  lv_posid1
                                   lv_post1
                                   lv_top_key
                            CHANGING lv_ebeln_key.
        ENDIF.
        IF lv_ebeln <> lv_ebeln_last.  " On change of lv_ebeln
          lv_ebeln_last = lv_ebeln .
          PERFORM add_ebelp USING ls_fin
                                  lv_ebeln_key
                                  lv_ebeln
                        CHANGING  lv_ebelp_key .
        ENDIF.
    * Leaf:
        PERFORM add_complete_line USING  ls_fin
                                         lv_ebelp_key
                                         lv_ebelp
                              CHANGING   lv_last_key .
      ENDLOOP.
    * expand first node initially
      CALL METHOD g_alv_tree->expand_node
        EXPORTING
          i_node_key = lv_top_key.
    ENDFORM.                               " create_hierarchy
    *&      Form  ADD_EBELN
    FORM add_ebeln  USING    p_lv_posid1 TYPE ps_posid
                             p_lv_post1 TYPE  ps_post1
                             p_lv_top_key TYPE lvc_nkey
                    CHANGING p_lv_ebeln_key TYPE lvc_nkey.
      DATA : ls_fin TYPE gty_fin,
             lv_node_text TYPE lvc_value ,
             lv_text_psp TYPE char11.
      lv_text_psp =  'WBS Element'(005).
      lv_node_text =  p_lv_posid1.
      CONCATENATE p_lv_post1 lv_node_text
             INTO lv_node_text
        SEPARATED BY space.
    * add node
      CALL METHOD g_alv_tree->add_node
        EXPORTING
          i_relat_node_key = p_lv_top_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = lv_node_text  " 'WBS Element'
          is_outtab_line   = ls_fin
        IMPORTING
          e_new_node_key   = p_lv_ebeln_key.
    ENDFORM.                    " ADD_EBELN
    *&      Form  ADD_EBELP
    FORM add_ebelp  USING    p_ls_fin TYPE gty_fin
                             p_lv_ebeln_key TYPE lvc_nkey
                             p_lv_ebeln TYPE ebeln
                    CHANGING p_lv_ebelp_key TYPE lvc_nkey.
      DATA : ls_fin TYPE gty_fin ,
            lv_node_text TYPE lvc_value,
            lv_text_order TYPE char10 .
      lv_text_order = 'ORDER  '(006).
      lv_node_text = p_lv_ebeln  .
      CONCATENATE lv_text_order lv_node_text
             INTO lv_node_text
        SEPARATED BY space.
      CALL METHOD g_alv_tree->add_node
        EXPORTING
          i_relat_node_key = p_lv_ebeln_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = lv_node_text " 'EBELN
          is_outtab_line   = ls_fin
        IMPORTING
          e_new_node_key   = p_lv_ebelp_key.
    ENDFORM.                    " ADD_EBELP
    *&      Form  ADD_COMPLETE_LINE
    *       text
    *      -->P_LS_FIN  text
    *      -->P_LV_EBELP_KEY  text
    *      <--P_LV_LAST_KEY  text
    FORM add_complete_line  USING    p_ls_fin TYPE gty_fin
                                     p_lv_ebelp_key TYPE lvc_nkey
                                     p_lv_ebelp TYPE ebelp
                            CHANGING p_lv_last_key TYPE lvc_nkey.
      DATA :  lv_text_pos TYPE char10,
              lv_node_text TYPE lvc_value,
              lv_node_layn TYPE lvc_s_layn.
      lv_text_pos = 'Position '(007).
      lv_node_text = p_lv_ebelp  .
      IF p_lv_ebelp IS INITIAL .
        lv_node_text = 'PLAN'(008) .
        lv_node_layn-hidden = 'X'.
      ELSE.
        CONCATENATE lv_text_pos lv_node_text
               INTO lv_node_text
          SEPARATED BY space.
      ENDIF.
      CALL METHOD g_alv_tree->add_node
        EXPORTING
          i_relat_node_key = p_lv_ebelp_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          is_outtab_line   = p_ls_fin
          is_node_layout   = lv_node_layn
          i_node_text      = lv_node_text " Position of item
        IMPORTING
          e_new_node_key   = p_lv_last_key.
        CLEAR : lv_node_layn .
    ENDFORM.                    " ADD_COMPLETE_LINE
    Regards,
    Aby
    hope this might be useful.

Maybe you are looking for

  • Disk images not mounting

    Here's the question: how come .dmg files downloaded from apple.com (amongst other places) won't mount? Here's the detail: This has to be a FAQ going by Google searches. I've downloaded the Mac Firefox DMG 3 times, and the Safari DMG from apple.com on

  • Mac OS X 10.5.4 - Problem using Photoshop Elements

    I've loaded Photoshop Elements 6 onto my hard drive and I can open it up, but I can't actually use it. I spent 30 minutes on the phone with Adobe, only to be told that they think it has something to do with my permissions - so they can't help me, I h

  • Intercompany billing for services

    Hi, I need a few details about intercompany billing, and how is thi set in SAP standard way... Is it possible to set that company A create a purchase order for services and another company B creates on this PO sales invoice, and on the company A is t

  • High-units reflect twice the amount with dual JVM's in a distributed cache

    HI all, I have a question - i have a near cache scheme defined - running 4 JVM's with my application deployed to it (localstorage=false) - and 2 JVM's for the distributed cache (localstorage=true) The high-units is set to 2000 - but the cache is allo

  • Apple tv activation problem

    Why is the activation on my apple tv taking over than 45 minutes?   It just doesn't make sense.