Tree type report

Hi all,
       Can anyone give sample code for TREE TYPE REPORT(simple code), like for example: The list should contain 2 main items (parent item) and when i expand each item i should have 1 item(child item) .and when i double click on that it should perform some action say it should go to new list.
like :
+ food
+ tools
(this is in first list , 2 main items) when i expand this
- food
       noodles
- tools
       hammer
(this sub item , when i click on this it should go to new list)
thanks in advance.
kumaran.c

HI Kumaran,
Have a look at the following code of simple tree control ...Its in module pool style.. will copy each include as well..
*& Module Pool       ZKM_SIMPLETREE_CONTROL
REPORT  ZKM_SIMPLETREE_CONTROL.
INCLUDE ZKM_TOP.
INCLUDE ZKM_CL.
INCLUDE ZKM_PBO_100O01.
INCLUDE ZKM_FORM01.
INCLUDE ZKM_PAI_100I01.
START-OF-SELECTION.
create the application object
this object is needed to handle the ABAP Objects Events of
Controls
CREATE OBJECT G_APPLICATION.
SET SCREEN 1000.
*&  Include           ZKM_TOP
*REPORT ZKM_SIMPLETREE_CONTROL MESSAGE-ID TREE_CONTROL_MSG.
CLASS lcl_application  DEFINITION DEFERRED.
CLASS cl_gui_cfw DEFINITION LOAD.
TYPES: node_table_type LIKE STANDARD TABLE OF zkm_treesnode
           WITH DEFAULT KEY.
CAUTION: MTREESNODE is the name of the node structure which must
be defined by the programmer. DO NOT USE MTREESNODE!
*internal table and work area for storing all the nodes that are created
DATA: gt_nodetable TYPE node_table_type,
      gw_nodetable TYPE zkm_treesnode.
*objects refering to the classes used.
DATA: g_application TYPE REF TO lcl_application,
      g_custom_container TYPE REF TO cl_gui_custom_container,
      g_tree TYPE REF TO cl_gui_simple_tree.
Fields on Dynpro 1000
DATA: g_event(30),
      g_key TYPE i,
      g_node_key TYPE tv_nodekey.
Fields on Dynpro 2000
DATA: g_relatship TYPE i,
      g_cb_sub,
      g_cb_same,
      g_cb_under VALUE 'X',
      g_nodename(30).
Structure for preserving the skeleton
TYPES: BEGIN OF ty_flag,
       relatkey TYPE tv_nodekey,
       node_key TYPE tv_nodekey,
       flag TYPE i,                "1  =  skeleton
                                   "2  =  service line
                                   "3  =  levels
       END OF ty_flag.
DATA: gt_flag TYPE TABLE OF ty_flag,
      gw_flag TYPE ty_flag.
*structure storing the hierarchy and the nodes under them.
***INCLUDE ZKM_PBO_100O01 .
*&      Module  PBO_1000  OUTPUT
      text
MODULE pbo_1000 OUTPUT.
  SET PF-STATUS 'ZMAIN'.
  SET TITLEBAR 'ZTITLE'.
  IF g_tree IS INITIAL.
    " The Tree Control has not been created yet.
    " Create a Tree Control and insert nodes into it.
    PERFORM create_and_init_tree.
  ENDIF.
*registering keys which can trigger the event
  PERFORM register_key_strokes.
*checking status of the actions performed
  CASE sy-ucomm.
    WHEN 'ADD'.               "node successfully added
      MESSAGE s002(zkm_class).
    WHEN 'YES'.               "node successfully deleted
      MESSAGE s003(zkm_class).
    WHEN 'NO' OR 'CANCEL'.    "action cancelled
      MESSAGE s007(zkm_class).
  ENDCASE.
ENDMODULE.                 " PBO_1000  OUTPUT
*&      Module  PBO_2000  OUTPUT
      text
MODULE pbo_2000 OUTPUT.
  SET PF-STATUS 'ZDIALOG'.
  SET TITLEBAR  'ZADD'.
*setting the attributes of the screen field depending on node attributes
  READ TABLE gt_flag INTO gw_flag WITH KEY node_key = g_node_key.
  IF gw_flag-flag = 3.
    LOOP AT SCREEN.
      IF screen-name      = 'BRANCH'.
        screen-invisible = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.
ENDMODULE.                 " PBO_2000  OUTPUT
*&      Module  PBO_3000  OUTPUT
      text
MODULE pbo_3000 OUTPUT.
  SET PF-STATUS 'ZDIALOG'.
  SET TITLEBAR  'ZCONFIRM'.
ENDMODULE.                 " PBO_3000  OUTPUT
***INCLUDE ZKM_PAI_100I01 .
*&      Module  PAI_1000  INPUT
      text
MODULE pai_1000 INPUT.
  DATA: return_code TYPE i.
CL_GUI_CFW=>DISPATCH must be called if events are registered
that trigger PAI
this method calls the event handler method of an event
  CALL METHOD cl_gui_cfw=>dispatch
    IMPORTING
      return_code = return_code.
  IF return_code <> cl_gui_cfw=>rc_noevent.
    "a control event occured => exit PAI.
    EXIT.
  ENDIF.
  CASE sy-ucomm.
    WHEN 'ADDND'.
*check whether node has been selected or not
      IF g_event NE 'NODE_DOUBLE_CLICK'. "AND g_node_key EQ ' '.
        MESSAGE e000(zkm_class).
      ELSE.
*whether selected node can have sub-branches or not
        READ TABLE gt_nodetable INTO gw_nodetable WITH KEY node_key = g_node_key.
        IF gw_nodetable-isfolder = ' '.
          MESSAGE e006(zkm_class).
        ELSE.
*call screen for adding the node.
          CALL SCREEN 2000 STARTING AT 20 10.
        ENDIF.
      ENDIF.
      CLEAR g_event.
    WHEN 'DELND'.
*check whether node has been selected or not
      IF g_event NE 'NODE_DOUBLE_CLICK'.
        MESSAGE e000(zkm_class).
      ELSE.
*skeleton should not be deleted.
        IF g_node_key EQ 'Capgemini'   OR
           g_node_key EQ 'TSP-SAP-CRM' OR
           g_node_key EQ 'MANAGERS'    OR
           g_node_key EQ 'TEAM LEAD'.
          MESSAGE e004(zkm_class).
        ENDIF.
*call screen for confirmation
        CALL SCREEN 3000 STARTING AT 20 10.
      ENDIF.
      CLEAR g_event.
    WHEN 'TEST'.
      CALL METHOD g_tree->expand_node
        EXPORTING
          node_key = 'New1'.
    WHEN 'BACK'. " Finish program
      IF NOT g_custom_container IS INITIAL.
destroy tree container (detroys contained tree control, too)
        CALL METHOD g_custom_container->free
          EXCEPTIONS
            cntl_system_error = 1
            cntl_error        = 2.
        IF sy-subrc <> 0.
         MESSAGE a000.
        ENDIF.
        CLEAR g_custom_container.
        CLEAR g_tree.
      ENDIF.
      LEAVE PROGRAM.
  ENDCASE.
ENDMODULE.                 " PAI_1000  INPUT
*&      Module  pai_2000  INPUT
      text
MODULE pai_2000 INPUT.
  DATA: node_table TYPE node_table_type,
        node LIKE zkm_treesnode.
  CASE sy-ucomm.
    WHEN 'BACK'.
      CALL SCREEN 1000.
    WHEN 'ADD'.
      IF g_nodename IS INITIAL. "Has to enter the Node name
        MESSAGE s005(zkm_class).
        CALL SCREEN 2000 STARTING AT 20 10.
      ELSE.
*Checking whether specified node already exists or not
        READ TABLE gt_nodetable INTO gw_nodetable WITH KEY node_key =  g_nodename.
        IF sy-subrc EQ 0.
          CLEAR gw_flag.
          MESSAGE s008(zkm_class).
          CALL SCREEN 2000 STARTING AT 20 10.
        ENDIF.
*assigning attributes to the node
        CLEAR node.
        CLEAR node_table.
        node-node_key = g_nodename.            "Key of the Node.
        node-relatkey  = g_node_key.           "Relationship with the selected node
        node-relatship =  cl_gui_simple_tree=>relat_last_child.
*checking whether the node would be a folder or a leaf
        READ TABLE gt_flag INTO gw_flag WITH KEY node_key = g_node_key.
        IF gw_flag-flag = 1 OR gw_flag-flag = 2.
          node-hidden    = ' '.
          node-disabled  = ' '.
          node-isfolder  = 'X'.
          CLEAR node-n_image.
          CLEAR node-exp_image.
          CLEAR node-expander.
          IF gw_flag-flag EQ 1.
            gw_flag-flag = 2.
          ELSE.
            gw_flag-flag = 3.
          ENDIF.
        ELSEIF gw_flag-flag = 3.
          node-n_image   = '@XY@'.
          node-isfolder  = ' '.
          node-expander  = ' '.
          gw_flag-flag = 3.
        ENDIF.
        CLEAR node-exp_image.
        node-text = g_nodename.
        APPEND node TO node_table.
*keeping records of all the nodes added in the tree
        gw_nodetable = node.
        APPEND gw_nodetable TO gt_nodetable.
        CLEAR gw_nodetable.
*append structure 'FLAG' to group the added node according to position
        gw_flag-relatkey = g_node_key.
        gw_flag-node_key = g_nodename.
        APPEND gw_flag TO gt_flag.
        CLEAR gw_flag.
*adding nodes in the tree
        CALL METHOD g_tree->add_nodes
          EXPORTING
            table_structure_name           = 'ZKM_TREESNODE'
            node_table                     = node_table
          EXCEPTIONS
            error_in_node_table            = 1
            failed                         = 2
            dp_error                       = 3
            table_structure_name_not_found = 4
            OTHERS                         = 5.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        CLEAR g_nodename.    "clearing screen field
        CALL SCREEN 1000.
      ENDIF.
    WHEN 'CANCEL'.
      CALL SCREEN 1000.
  ENDCASE.
ENDMODULE.                 " pai_2000  INPUT
*&      Module  PAI_3000  INPUT
      text
MODULE pai_3000 INPUT.
  CASE sy-ucomm.
    WHEN 'YES'.      "user agrees to delete the node
      CALL METHOD g_tree->delete_node
        EXPORTING
          node_key          = g_node_key
        EXCEPTIONS
          failed            = 1
          node_not_found    = 2
          cntl_system_error = 3
          OTHERS            = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        gw_nodetable-node_key = g_node_key.
        gw_flag-node_key      = g_node_key.
        READ TABLE gt_nodetable INTO gw_nodetable WITH KEY node_key = g_node_key.
        IF sy-subrc EQ 0.
          DELETE gt_nodetable INDEX sy-tabix.
        ENDIF.
        READ TABLE gt_flag INTO gw_flag WITH KEY node_key = g_node_key.
        IF sy-subrc EQ 0.
          DELETE gt_flag INDEX sy-tabix.
        ENDIF.
        CLEAR gw_flag.
        CLEAR gw_nodetable.
        CALL SCREEN 1000.
      ENDIF.
    WHEN 'NO'.       "user clicks the cancel button
      CALL SCREEN 1000.
  ENDCASE.
ENDMODULE.                 " PAI_3000  INPUT
***INCLUDE ZKM_FORM01 .
*&      Form  create_and_init_tree
      text
-->  p1        text
<--  p2        text
FORM create_and_init_tree .
  DATA: node_table TYPE node_table_type,
          events TYPE cntl_simple_events,
          event TYPE cntl_simple_event.
*create a container for the tree control.
  CREATE OBJECT g_custom_container
    EXPORTING
       " the container is linked to the custom control with the
       " name 'TREE_CONTAINER' on the dynpro
      container_name              = 'TREE_CONTAINER'
    EXCEPTIONS
      cntl_error                  = 1
      cntl_system_error           = 2
      create_error                = 3
      lifetime_error              = 4
      lifetime_dynpro_dynpro_link = 5
      OTHERS                      = 6
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
*create tree control.
  CREATE OBJECT g_tree
    EXPORTING
      parent                      = g_custom_container
      node_selection_mode         = cl_gui_simple_tree=>node_sel_mode_single
    EXCEPTIONS
      lifetime_error              = 1
      cntl_system_error           = 2
      create_error                = 3
      failed                      = 4
      illegal_node_selection_mode = 5
      OTHERS                      = 6
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
*define events which will be passed to the backend.
  "node double click.
  event-eventid    = cl_gui_simple_tree=>eventid_node_double_click.
  event-appl_event = 'X'.  "process PAI if event occurs.
  APPEND event TO events.
  "expand no children.
  event-eventid    = cl_gui_simple_tree=>eventid_expand_no_children.
  event-appl_event = 'X'.
  APPEND event TO events.
  "node key press
  event-eventid    = cl_gui_simple_tree=>eventid_node_keypress.
  event-appl_event = 'X'.
  APPEND event TO events.
  "NODE_CONTEXT_MENU_REQUEST
  event-eventid    = cl_gui_simple_tree=>eventid_node_context_menu_req.
  event-appl_event = 'X'.
  APPEND event TO events.
  "event node_context_menu_select is automatically registered on registering
  " the event NODE_CONTEXT_MENU_REQUEST
  " process PAI if context menu select event occurs
  CALL METHOD g_tree->set_ctx_menu_select_event_appl
    EXPORTING
      appl_event = 'X'.
  CALL METHOD g_tree->set_registered_events
    EXPORTING
      events                    = events
    EXCEPTIONS
      cntl_error                = 1
      cntl_system_error         = 2
      illegal_event_combination = 3
      OTHERS                    = 4.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
*assign event handlers in the application class to each desired event.
  SET HANDLER g_application->handle_node_double_click     FOR g_tree.
  SET HANDLER g_application->handle_expand_no_children    FOR g_tree.
  SET HANDLER g_application->handle_node_keypress         FOR g_tree.
  SET HANDLER g_application->handle_node_context_menu_req FOR g_tree.
  SET HANDLER g_application->handle_node_context_menu_sel FOR g_tree.
add some nodes to the tree control
NOTE: the tree control does not store data at the backend. If an
application wants to access tree data later, it must store the
tree data itself.
  PERFORM build_node_table USING node_table.
  CALL METHOD g_tree->add_nodes
    EXPORTING
      table_structure_name           = 'ZKM_TREESNODE'
      node_table                     = node_table
    EXCEPTIONS
      error_in_node_table            = 1
      failed                         = 2
      dp_error                       = 3
      table_structure_name_not_found = 4
      OTHERS                         = 5.
  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.                    " create_and_init_tree
*&      Form  BUILD_NODE_TABLE
      text
     -->P_NODE_TABLE  text
FORM build_node_table
USING node_table TYPE node_table_type.
  DATA: node LIKE zkm_treesnode.
Build the node table.
Caution: The nodes are inserted into the tree according to the order
in which they occur in the table. In consequence, a node must not
occur in the node table before its parent node.
*Node with key 'Capgemini'.
  node-node_key = 'Capgemini'.   "Key of the node.
  CLEAR node-relatkey.      "Special case.. A root node has no parent node.
  CLEAR node-relatship.
  node-hidden   = ' '.      "Node is visible.
  node-disabled = ' '.      "Selectable.
  node-isfolder = 'X'.      "folder.
  CLEAR node-n_image.       "Folder-/ Leaf-Symbol in state "closed":
  "use default.
  CLEAR node-exp_image.     "Folder-/ Leaf-Symbol in state "open".
  "use default.
  CLEAR node-expander.
  node-text = 'Capgemini'.
  APPEND node TO node_table.
  gw_nodetable = node.
  APPEND gw_nodetable TO gt_nodetable.
  CLEAR gw_nodetable.
  CLEAR gw_flag-relatkey.
  gw_flag-node_key = 'Capgemini'.
  gw_flag-flag     = 1.              "Skeleton
  APPEND gw_flag TO gt_flag.
  CLEAR gw_flag.
  CLEAR node.
*Node with key 'TSP-SAP-CRM'.
  node-node_key = 'TSP-SAP-CRM'. "Key of the Node.
  "Node is inserted as child of the node with key 'Root'.
  node-relatkey  = 'Capgemini'.
  node-relatship = cl_gui_simple_tree=>relat_last_child.
  node-hidden   = ' '.      "Node is visible.
  node-disabled = ' '.      "Selectable.
  node-isfolder = 'X'.      "folder.
  CLEAR node-n_image.       "Folder-/ Leaf-Symbol in state "closed":
  "use default.
  CLEAR node-exp_image.     "Folder-/ Leaf-Symbol in state "open".
  "use default.
  CLEAR node-expander.
  node-text = 'TSP-SAP-CRM'.
  APPEND node TO node_table.
  gw_nodetable = node.
  APPEND gw_nodetable TO gt_nodetable.
  CLEAR gw_nodetable.
*adding the node for corresponding relatkey
  gw_flag-relatkey = 'Capgemini'.
  gw_flag-node_key = 'TSP-SAP-CRM'.
  gw_flag-flag     = 2.               "Service line
  APPEND gw_flag TO gt_flag.
  CLEAR gw_flag.
*creating new relatkey in gt_flag
  gw_flag-relatkey = 'TSP-SAP-CRM'.
  gw_flag-node_key = ' '.
  gw_flag-flag     = '2'.
  APPEND gw_flag TO gt_flag.
*Node with key 'Managers'
  node-node_key  = 'MANAGERS'.
  node-relatkey  = 'TSP-SAP-CRM'.
  node-relatship =  cl_gui_simple_tree=>relat_last_child.
  CLEAR node-n_image.
  CLEAR node-exp_image.
  CLEAR node-expander.   "  = ' '.
  node-isfolder  = 'X'.
  node-text      = 'Managers'.
  APPEND node TO node_table.
  gw_nodetable = node.
  APPEND gw_nodetable TO gt_nodetable.
  CLEAR gw_nodetable.
  gw_flag-relatkey = 'TSP-SAP-CRM'.
  gw_flag-node_key = 'MANAGERS'.
  gw_flag-flag     = 3.                "Levels
  APPEND gw_flag TO gt_flag.
  CLEAR gw_flag.
  gw_flag-relatkey = 'MANAGERS'.
  gw_flag-node_key = ' '.
  gw_flag-flag     = '2'.
  APPEND gw_flag TO gt_flag.
*Node with key 'Team Lead'.
  node-node_key  = 'TEAM LEAD'.
  node-relatkey  = 'TSP-SAP-CRM'.
  node-relatship =  cl_gui_simple_tree=>relat_last_child.
  CLEAR node-n_image.
  CLEAR node-exp_image.
  CLEAR node-expander.   "  = ' '.
  node-isfolder  = 'X'.
  node-text      = 'TEAM LEAD'.
  APPEND node TO node_table.
  gw_nodetable = node.
  APPEND gw_nodetable TO gt_nodetable.
  CLEAR gw_nodetable.
  gw_flag-relatkey = 'TSP-SAP-CRM'.
  gw_flag-node_key = 'Team_Lead'.
  gw_flag-flag     = 3.               "Levels
  APPEND gw_flag TO gt_flag.
  CLEAR gw_flag.
  gw_flag-relatkey = 'TEAM LEAD'.
  gw_flag-node_key = ' '.
  gw_flag-flag     = '2'.
  APPEND gw_flag TO gt_flag.
ENDFORM.                    " BUILD_NODE_TABLE
*&      Form  register_key_strokes
      text
-->  p1        text
<--  p2        text
FORM register_key_strokes .
  g_key = cl_tree_control_base=>key_delete.
  "process PAI if node key press occurs
  CALL METHOD g_tree->add_key_stroke
    EXPORTING
      key               = g_key
    EXCEPTIONS
      failed            = 1
      illegal_key       = 2
      cntl_system_error = 3
      OTHERS            = 4.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  g_key = cl_tree_control_base=>key_enter.
  "process PAI if node key press occurs
  CALL METHOD g_tree->add_key_stroke
    EXPORTING
      key               = g_key
    EXCEPTIONS
      failed            = 1
      illegal_key       = 2
      cntl_system_error = 3
      OTHERS            = 4.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  g_key = cl_tree_control_base=>key_insert.
  CALL METHOD g_tree->add_key_stroke
    EXPORTING
      key               = g_key
    EXCEPTIONS
      failed            = 1
      illegal_key       = 2
      cntl_system_error = 3
      OTHERS            = 4.
  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.                    " register_key_strokes
***INCLUDE ZKM_CL .
*&       Class LCL_APPLICATION
       Text
CLASS lcl_application DEFINITION.
  PUBLIC SECTION.
    METHODS:
    handle_node_double_click
     FOR EVENT node_double_click
     OF cl_gui_simple_tree
     IMPORTING node_key,
    handle_expand_no_children
     FOR EVENT expand_no_children
     OF cl_gui_simple_tree
     IMPORTING node_key,
    handle_node_keypress
     FOR EVENT node_keypress
     OF cl_gui_simple_tree
     IMPORTING node_key key,
    handle_node_context_menu_req
     FOR EVENT node_context_menu_request
     OF cl_gui_simple_tree
     IMPORTING node_key menu,
    handle_node_context_menu_sel
     FOR EVENT node_context_menu_select
     OF cl_gui_simple_tree
     IMPORTING node_key fcode.
ENDCLASS.               "LCL_APPLICATION
*&       Class (Implementation)  LCL_APPLICATION
       Text
CLASS lcl_application IMPLEMENTATION.
  METHOD handle_node_double_click.
    " this method handles the node double click event of the tree
    " control instance
    " show the key of the double clicked node in a dynpro field
    g_event = 'NODE_DOUBLE_CLICK'.
    g_node_key = node_key.
  ENDMETHOD.                    "HANDLE_NODE_DOUBLE_CLICK
  METHOD handle_expand_no_children.
    " this method handles the expand no children event of the tree
    " control instance
    DATA: node_table TYPE node_table_type,
          node TYPE zkm_treesnode.
    "show the key of the double clicked node on the dynpro field.
    g_event = 'EXPAND_NO_CHILDREN'.
    g_node_key = node_key.
    IF node_key = 'TSP-SAP-CRM'.
*add two nodes to the tree control (The children of Child1).
*Node with key 'New1'.
      CLEAR node.
      node-node_key  = 'Managers'.
      node-relatkey  = 'TSP-SAP-CRM'.
      node-relatship =  cl_gui_simple_tree=>relat_last_child.
      node-n_image   = '@XY@'.
      CLEAR node-exp_image.
      node-expander  = ' '.
      node-isfolder  = ' '.
      node-text      = 'Managers'.
      APPEND node TO node_table.
*Node with key 'New2'.
      CLEAR node.
      node-node_key  = 'Team_Lead'.
      node-relatkey  = 'TSP-SAP-CRM'.
      node-relatship =  cl_gui_simple_tree=>relat_last_child.
      node-n_image   = '10'.
      CLEAR node-exp_image.
      node-expander  = ' '.
      node-isfolder  = ' '.
      node-text      = 'Team Lead'.
      APPEND node TO node_table.
    ENDIF.
    CALL METHOD g_tree->add_nodes
      EXPORTING
        table_structure_name           = 'MTREESNODE'
        node_table                     = node_table
      EXCEPTIONS
        error_in_node_table            = 1
        failed                         = 2
        dp_error                       = 3
        table_structure_name_not_found = 4
        OTHERS                         = 5.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
  ENDMETHOD.                    "HANDLE_EXPAND_NO_CHILDREN
  METHOD handle_node_keypress.
    g_node_key =  node_key.
    CASE key.
      WHEN 2.
        g_event = 'DELETE KEY PRESSED'.
        READ TABLE gt_flag INTO gw_flag WITH KEY node_key = g_node_key.
        IF gw_flag-flag EQ 1.
          MESSAGE e004(zkm_class).
        ENDIF.
        CALL SCREEN 3000 STARTING AT 20 10.
        CLEAR g_event.
      WHEN 3.
        g_event = 'INSERT KEY PRESSED'.
        READ TABLE gt_nodetable INTO gw_nodetable WITH KEY node_key = g_node_key.
        IF gw_nodetable-isfolder = ' '.
          MESSAGE e006(zkm_class).
        ELSE.
          CALL SCREEN 2000 STARTING AT 20 10.
          MESSAGE s001(zkm_class).
        ENDIF.
        CLEAR g_event.
      WHEN 5.
        g_event = 'ENTER KEY PRESSED'.
        READ TABLE gt_nodetable INTO gw_nodetable WITH KEY node_key =  node_key.
        IF gw_nodetable-isfolder = ' '.
          MESSAGE e009(zkm_class).
        ELSE.
          CALL METHOD g_tree->expand_node
            EXPORTING
              node_key            = node_key
            EXCEPTIONS
              failed              = 1
              illegal_level_count = 2
              cntl_system_error   = 3
              node_not_found      = 4
              cannot_expand_leaf  = 5
              OTHERS              = 6.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
        ENDIF.
    ENDCASE.
    CALL METHOD g_tree->remove_all_key_strokes
      EXCEPTIONS
        failed            = 1
        cntl_system_error = 2.
  ENDMETHOD.                    "HANDLE_NODE_KEYPRESS.
  METHOD handle_node_context_menu_req.
    g_event    = 'NODE_CONTEXT_MENU_REQ'.
    g_node_key = node_key.
    CALL METHOD menu->add_function
      EXPORTING
        fcode = 'ADD'
        text  = 'Add Node'.
    CALL METHOD menu->add_function
      EXPORTING
        fcode = 'DELETE'
        text  = 'Delete Node'.
  ENDMETHOD.                    "handle_node_context_menu_req
  METHOD handle_node_context_menu_sel.
    g_event = 'NODE_CONTEXT_MENU_SELECT'.
    CASE fcode.
      WHEN 'ADD'.
        READ TABLE gt_nodetable INTO gw_nodetable WITH KEY node_key = g_node_key.
        IF gw_nodetable-isfolder = ' '.
          MESSAGE e006(zkm_class).
        ELSE.
          CALL SCREEN 2000 STARTING AT 20 10.
          MESSAGE s001(zkm_class).
        ENDIF.
        CLEAR g_event.
      WHEN 'DELETE'.
        IF g_node_key EQ 'Capgemini'   OR
           g_node_key EQ 'TSP-SAP-CRM' OR
           g_node_key EQ 'MANAGERS'    OR
           g_node_key EQ 'TEAM LEAD'.
          MESSAGE e004(zkm_class).
        ENDIF.
        CALL SCREEN 3000 STARTING AT 20 10.
        CLEAR g_event.
    ENDCASE.
  ENDMETHOD.                    "handle_node_context_menu_sel
ENDCLASS.               "LCL_APPLICATION
This is a complete tree control application..  I am sure it will solve all your problems.
Pls pls reward points if useful.
Regards,
Karan

Similar Messages

  • Web Service Error - No Result Tree to Report On

    After successfully creating a web service reference and then using the 'Form and Report on Web Service' wizard I get an error, after defining the input items, at the 'Web Service results' Stage.
    It states :
    "No Result Tree to Report On
    This Web service does not have a result tree in its definition that is appropriate for a report. You may wish to run the Form on Web Service wizard instead."
    This web service returns an array of records and runs successfully outside of HTML_DB. Has anyone else had this problem ? I cannot find any information about this so far. I am using App Ex v2, 10g App Server and 9i (9.2.0.4.0) DB. The WSDL file for the web service is below.
    Thanks
    <?xml version="1.0" encoding="UTF-8" ?>
    - <!-- Generated by the Oracle JDeveloper 10g Web Services WSDL Generator
    -->
    - <!-- Date Created: Wed Jun 21 10:10:07 BST 2006
    -->
    - <definitions name="18_WS" targetNamespace="http://TESTDB/18_WS.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://TESTDB/18_WS.wsdl" xmlns:ns1="http://TESTDB/_WS.xsd">
    - <types>
    - <schema targetNamespace="http://TESTDB/_WS.xsd" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    - <complexType name="TESTDB_CollectCountTable" jdev:packageName="TESTDB" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
    - <all>
    <element name="array" type="ns1:ArrayOfTESTDB_CollectCountRecordUser" />
    </all>
    </complexType>
    - <complexType name="TESTDB_CollectCountRecordUser" jdev:packageName="TESTDB" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
    - <all>
    <element name="code" type="string" />
    <element name="category" type="string" />
    <element name="total" type="decimal" />
    </all>
    </complexType>
    - <complexType name="ArrayOfTESTDB_CollectCountRecordUser" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    - <complexContent>
    - <restriction base="SOAP-ENC:Array">
    <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="ns1:TESTDB_CollectCountRecordUser[]" />
    </restriction>
    </complexContent>
    </complexType>
    </schema>
    </types>
    - <message name="getCollectionCount0Request">
    <part name="pNumlink" type="xsd:decimal" />
    </message>
    - <message name="getCollectionCount0Response">
    <part name="return" type="ns1:TESTDB_CollectCountTable" />
    </message>
    - <portType name="_WSPortType">
    - <operation name="getCollectionCount">
    <input name="getCollectionCount0Request" message="tns:getCollectionCount0Request" />
    <output name="getCollectionCount0Response" message="tns:getCollectionCount0Response" />
    </operation>
    </portType>
    - <binding name="_WSBinding" type="tns:_WSPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    - <operation name="getCollectionCount">
    <soap:operation soapAction="" style="rpc" />
    - <input name="getCollectionCount0Request">
    <soap:body use="encoded" namespace="18_WS" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    </input>
    - <output name="getCollectionCount0Response">
    <soap:body use="encoded" namespace="18_WS" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    </output>
    </operation>
    </binding>
    - <service name="18_WS">
    - <port name="_WSPort" binding="tns:_WSBinding">
    <soap:address location="http://testserver:7778/RCAHMS_WebServices-NMRSPK18_WS-context-root/_WS" />
    </port>
    </service>
    </definitions>

    This has been the subject of bug 5394491 for several weeks now without any resolution. It looks like this error will prevent the use of Jdeveloper web services that use array parameters in the current versions of Application Express. We are not planning to use Application Express for this purpose any more as there is no information about the bug (or fix) forthcoming.

  • BI Publisher report ends with Warning Message for Pivot  type reports..

    Hi,
    I had used BI reporting(xml publisher) to develop our all reports and registered in R12 and works fine for all the tabular/forms type reports but it fails with the warning message(colored in yellow) for Pivot type reports. The output comes in xml..
    When I changed the pivot table type report to tabular it comes with pdf. No issues.I do not know how to solve this issue...
    Please help me on this..
    Thanks
    Imran

    Welcome to the forums !
    Pl post details of OS, database and EBS versions, along with the complete error message.
    HTH
    Srini

  • How to create multiple Tree Type Region In Tabular Form ?

    Dear Friends,
    i have to design tabular form to Distribute User Rioght to emp to access application
    eg if i have Three module in application
    1.Administration
    2.Attendance
    3.Accounts
    Module
    1 Administration have 5 Pages A,B,C,D,E.
    Module
    2 Attendance HAVE 4 Pages F,G,H,I
    Module
    3 Accounts HAVE 7 Pages J,K,L,M,N,O,P
    I need these three module divided into three section in tabular form as a tree Type like
    Module 1 Tree Open in Tabular Form like
    - (Tree Mark Open )
    =======================================================
    PAGE_ID-------------SUBPAGE_ID-------VIEW-------------------MODIFY-------------------CREATE----------------------------TABLE COLUMN NAME
    ========================================================          
    Administration-----------A------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Administration-----------B------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Administration-----------C------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Administration-----------D------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Administration-----------E------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    - (Tree Mark Open )
    Module 2 Tree Open in Tabular Form like
    Attendance-----------F------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Attendance-----------G------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Attendance-----------H------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Attendance-----------I------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    - (Tree Mark Open )
    Module 3 Tree Open in Tabular Form like
    Accounts-------------J------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------K------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------L------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------M------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------N------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------O------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------P------------------CHECK bOX------------CHECK BOX-------------CHECK BOXi need divided these three Module in Tabular form in three region as tree.
    Table APPLICATION_PAGE_DETAILS
    ID                   NUMBER
    PAGE_ID             NUMBER
    SUB_PAGE_ID          NUMBER
    ========================
    TABLE USER_RIGHT
    ======================
    ID                  NUMBER
    EMP_ID            NUMBER
    PAGE_ID            NUMBER
    SUB_PAGE_ID        NUMBER
    VIEW                    VARCHAR2(1)
    MODIFY                VARCHAR2(1)
    CREATE                VARCHAR2(1)How to create multiple Tree Type Region In Tabular Form ?
    How can i do this ?
    Thanks
    Edited by: Vedant on Oct 4, 2011 3:21 AM
    Edited by: Vedant on Oct 4, 2011 9:09 PM
    Edited by: Vedant on Oct 13, 2011 8:57 PM

    Well think of it I believe the scenario is too bird viewed hence the solution can't be exact.
    But thinking of a possible solution every time a child operation fails have a catch block where you you go back to system if the parent needs to be deleted if yes, call Delete Method on the parent.
    Note: Make sure that the decision on whether or not the parent record needs to be deleted will depends on the question "Does Parent Record already has several other children associated to it or not"
    Hope this clarifies.
    Regards,
    Messer

  • Creation of customized Wage Type Reporter

    Hi,
    My client were using the Standard Wage Type reporter i.e.PC00_M11_WTK. Now beacuse of security of not viewing the amounts of the employees , Client has taken away the authorization from the users the standard Tcode.
    They want me to preapare the report for wage type -196E,9IPI,9IPC,9IP3,9IP5,9IP6,9IP7,9IP8,/3F1,/3F2,/3F3 AND /3F4. They dnot want the standard report. They want to customized a new report with above mention wage types?
    I have already defined the FS to my ABAP HR,
    I required your help to know the table from where the amount of the above wage type will pick up?
    Please help.
    Regards
    Sanjib

    Payroll results are kept in cluster. You have to access and read the cluster.
    But instead of creating a report with abap I can suggest you trying this solution.
    Create a payroll infotype by using system standart for the wage types to be reported.
    Assign authorization for this infotype to only related employee
    Put payroll infotype in info group.
    After that employee can have the report by using ad-hoc query.
    About payroll clusters this link will help you:
    http://wiki.sdn.sap.com/wiki/display/ERPHCM/HRPayrollClusters
    Regards;
    Okan
    Edited by: Okan Caliskan on Sep 16, 2011 12:07 PM

  • How to call a Include type Report Program in Executable Program. ?

    Hi experts,
    I have created a Include type report program and I want to run this include program in other report program. Which abap statement should i use ?
    Thanks
    Saurabh

    Hi Saurabh,
    We can make use of programs of Type - Include(I) in other type of ABAP Programs.
    These Include programs cannot be executed directly but can be used as a part of the main program i.e Executable program - Type E.
    So after creating your main program of type executable program then use the below line
    REPORT ZM_SAMPLE_PROGRAM.
    INCLUDE INC_PRG_NAME.
    Now the code as availablein INC_PRG_NAME becomes part of the  main program ZM_SAMPLE_PROGRAM.le
    Also you can make use of this Include program in other executable/include programs too...
    Regards,
    Rafi

  • How do I display a MS RDL type Report within a Coldfusion Application

    I have a Coldfusion application that exist already, but would like to display a MS Report Builder Report within the application.  How can I display the RDL type report within Coldfusion?

    Are you talking about an SSRS report?  I looked into that a while back, looked to be a real pain because the report viewer web app is built to be part of an ASP page.  I would just write the ASP.NET page to handle the report, and maybe put it inside of an I-FRAME on the CF page.  You're probably going to have a mess on your hands for managing the access security to the reports.
    Would be a nice idea for CF11, if the CF guys wanted to add a really useful piece of Microsoft integration that act as a nice replacement for the never-loved CFREPORT facility.  Works really nice in ASP.NET.
    -reed

  • SSRS Header Image extension for Cross Tab type Reports to full page width

    Hi All,
    I'm trying  to adjust  a Image  on Header ,the problem I'm facing is the image doesnt extend with the page full width  when there is cross tab type reports.
    Many thanks

    Solved
    There  is a property for background repeat setting  when set to Repaet X has worked for me

  • Urgent : how I get tree type group total result

    hi master
    sir now system give me this type for result
    PARENT ACCID DRBAL CRBAL
    K1
    K11
    11 K1101 46291132
    11 K1102 13182173
    11 K1103 23784045
    11 K1104
    11 K1105
    11 K1106
    11 K1107 10001795
    11 K1108 9083529
    11 K1109
    11 K1110 4224350
    11 K1111
    11 K1112 6696832
    11 K1113 7963381
    11 K1114 742766
    1 K12
    12 K1201 1486082
    12 K1202
    12 K1203
    1 K13
    13 K1301
    1301 K130101
    1301 K130102
    1301 K130103
    1301 K130104 1977616
    1301 K130105
    1301 K130106 736266
    1301 K130107 396673
    1301 K130108 42751
    1301 K130109 298362
    1301 K130110 187696
    1301 K130111 537
    1301 K130112 942
    1301 K130113 987
    1301 K130114 1272
    1301 K130115 40000
    13 K1302
    1302 K130201
    1302 K130202
    1302 K130203
    1302 K130204
    1302 K130205 259941
    13 K1303
    1303 K130301
    1303 K130302
    1303 K130303 177716
    13 K1304
    1304 K130401
    1304 K130402
    1304 K130403
    1304 K130404
    1304 K130405
    1304 K130406 809719
    1304 K130407
    1304 K130408 1786091
    13 K1305
    1305 K130501
    1305 K130502
    13 K1306
    1306 K130601
    13 K1311
    1311 K131101 788780
    K2
    2 K21
    21 K2101
    2101 K210101
    2101 K210104
    21 K2102
    2102 K210201
    2102 K210202
    22 K2205
    2205 K220501
    2205 K220502
    220502 K22050201
    220502 K22050202
    220502 K22050203
    220502 K22050204
    22 K2206
    2206 K220601
    2206 K220602
    but sir i need this type of result
    PARENT ACCID DRBAL CRBAL
    GROUP NAME K1
    GROUP NAME K11
    11 K1101 46291132
    11 K1102 13182173
    11 K1103 23784045
    11 K1104
    11 K1105
    11 K1106
    11 K1107 10001795
    11 K1108 9083529
    11 K1109
    11 K1110 4224350
    11 K1111
    11 K1112 6696832
    11 K1113 7963381
    11 K1114 742766
    TOTAL
    1 K12
    TOTAL
    GROUP NAME
    12 K1201 1486082
    12 K1202
    12 K1203
    TOTAL
    1 K13
    13 K1301
    1301 K130101
    1301 K130102
    1301 K130103
    1301 K130104 1977616
    1301 K130105
    1301 K130106 736266
    1301 K130107 396673
    1301 K130108 42751
    1301 K130109 298362
    1301 K130110 187696
    1301 K130111 537
    1301 K130112 942
    1301 K130113 987
    1301 K130114 1272
    1301 K130115 40000
    13 K1302
    1302 K130201
    1302 K130202
    1302 K130203
    1302 K130204
    1302 K130205 259941
    13 K1303
    1303 K130301
    1303 K130302
    1303 K130303 177716
    13 K1304
    1304 K130401
    1304 K130402
    1304 K130403
    1304 K130404
    1304 K130405
    1304 K130406 809719
    1304 K130407
    1304 K130408 1786091
    13 K1305
    1305 K130501
    1305 K130502
    13 K1306
    Sir I need total group by group father group total and child group total
    Please help me how I get tree type group total result

    Hi master
    thankyou for your reply
    Sir,
    i know and you see my working i get code form master table and get detal amount form other table
    I have two table see table
    Acctab               Baltab
    PARENT           PCID
    CHILD           title
    PCID           amount
    I need heretical result use this type of query but not success
    please see my query and give me idea how I get here full tree
    select test.child,test.pcid,baltab.pcid from (select acctab.child,acctab.parent,acctab.pcid
    from acctab
    start with acctab.parent is null
    connect by prior acctab.child= acctab.parent) test,baltab
    where test.pcid=baltab.pcid ;
    CHILD PCID PCID
    1 1 1
    2 2 2
    3 3 3
    11 111 111
    12 112 112
    13 113 113
    21 221 221
    22 222 222
    23 223 223
    31 331 331
    32 332 332
    33 333 333
    but I need this type result
    CHILD PCID
    1 1
    11 111
    12 112
    13 113
    2 2
    21 221
    22 222
    23 223
    3 3
    31 331
    32 332
    33 333

  • Tree like report

    I have a view which returns holding data in a parent-child hierarchy.
    holding
    instrument_id
    parent_instrument id
    level
    I looked at creating hierarchy and go through “Connect By” example from the Admin manual, but it seems like I already have parent/child structure returned from my DB View.
    How can I create a tree like report? Is it possible?
    Deepak

    Hi,
    If you have the tree level in your report you can create a tree like report by using the LPAD function to add spaces in front of your data. eg.
    LPAD('   ', '   ', (level-1)*3)||instrument_idHope that helps,
    Rod West

  • Lucene Bottom N type report

    I have a requirement to write a report which shows the least occurances
    of some events. I have found example of Top N type reports, but is it
    possible to reverse the order to get Bottom N report in lucene?
    For Top N we have following:
    GROUP BY $P{EventTag} TOP $P{TopN}, sev TOP 6
    Changing TOP to BOTTOM in this query doesn't work. Also, I can change
    TOP to WHATEVER and it still does not complain about syntax.
    Could you help?
    Adam
    admroz
    admroz's Profile: https://forums.netiq.com/member.php?userid=3440
    View this thread: https://forums.netiq.com/showthread.php?t=46307

    Hi Adam,
    you could try to use a PrintWhen expression based on the build-in
    REPORT_COUNT variable:
    http://jasperreports.sourceforge.net...engine/JRVaria
    ble.html#REPORT_COUNT
    Norbert
    >>> On 12.12.2012 at 14:14, admroz<[email protected]> wrote:
    > Norbert,
    >
    > Thanks for your reply. We are trying to go a way you described, but we
    > still have some problems ‑ let me explain.
    >
    > The Top 10 Report (which is our base for Bottom 10 Report) uses
    > following lucene query:
    > SELECT
    > $P{EventTag} AS event_tag_value,
    > sev AS severity
    > WHERE
    > sev:[$P{MinSevStr} TO $P{MaxSevStr}] AND notnull:$P{EventTag}
    > $P{VendorProduct_Query} $P{SEARCH_QUERY_USE}
    > GROUP BY $P{EventTag} TOP $P{TopN},sev TOP 6
    > OVER $P{FromDtQry}, $P{ToDtQry}
    > $P{MaximumResultsStr}
    >
    > and there is also:
    > <field name="count" class="java.lang.Integer"/>
    >
    > Now, I don't know how the magic "TOP" clause is implemented, but I
    > assume that it does its job. Important thing is that there is grouping
    > on both on EventTag (eg. sip) and severity. Which means that "count"
    > columns contain amout of occurances of sip/sev pairs rather than sum of
    > sip occurances with any sev.
    >
    > So the first question is ‑ is the Top 10 Report working correctly? Does
    > it take biggest values in regards of sums for sip with any sev?
    >
    > As you advised, to have Bottom 10 we've removed TOP clause for EventTag
    > from lucene query. We also have to add sorting on count:
    > <sortField name="count" order="Ascending"/>
    >
    > and filter to limit results on a chart:
    > <filterExpression><![CDATA[new Boolean($V{SumOfCNT}.intValue() <=
    > Integer.parseInt($P{TopN}))]]></filterExpression>
    >
    > With an assumption that $P{TopN} is 10 then it should show 5 bars on a
    > chart. However, let's consider following data:
    >
    > sip | sev | count
    > 10.0.0.1 | 1 | 1
    > 10.0.0.1 | 2 | 1
    > 10.0.0.1 | 3 | 1
    > 10.0.0.2 | 1 | 2
    > 10.0.0.3 | 1 | 2
    > 10.0.0.4 | 1 | 2
    > 10.0.0.5 | 1 | 2
    > 10.0.0.6 | 1 | 2
    > 10.0.0.7 | 1 | 2
    >
    > Because data is ordered by "count" then it takes three times 10.0.0.1
    > and puts it on a first bar with a value of 3 (which is a sum for each
    > severity). It also increases counter by 3, so it shows only two more
    > bars on a chart for 10.0.0.2 and 10.0.0.3. Of cours the value for
    > 10.0.0.1 should not appear at all, because its sum is bigger than values
    > for other IPs.
    >
    > The only solution which we have for now is removing "sev" from group by
    > clause, but that way we are loosing some functionality of original Top
    > 10 Report.
    >
    > Is it possible to solve it in any other way? Even if it was normal sql
    > query I would doubt if it was possible to be done with one query only.
    >
    > Thanks
    > Adam

  • ALV  OOPS TREE TYPE STRUCTURE

    How can I make tree type display in ALV Grid oops concept ..eg.For one company code when we click all line items shld display
    Moderator message: please search for available information/documentation.
    Edited by: Thomas Zloch on Oct 24, 2011 3:00 PM

    For your example you might want lists (ordered children). Otherwise you could use it pretty much as-is:
    final Node root = new Node("Pyramids");
    final Node node2 = new Node("Built");
    final Node node3 = new Node("Giza");
    final Node node4 = new Node("3000 years ago");
    root.getChildren().add(node2);
    node2.getChildren().add(node3);
    node2.getChildren().add(node4);(Edit)
    Just to clarify, you would build the above tree however you want to, but would only need to retain the reference to the "root" node in order to pass it into search methods.
    I should also point out that if you're planning to do a lot of this sort of thing and you're not committed to using Java, you should probably consider using LISP for which this sort of problem is pretty much its raison d'etre.
    This online text is good: http://gigamonkeys.com/book/ and for learning how to do tree searches the Peter Norvig book is excellent: http://norvig.com/paip.html

  • Call type Report, Return Value

    Hello,
    I need a understanding description for the Return column in the call type report, i need a description other than what is already described in the webview template reference .
    Thanks.
    Amer

    Hello Ahmed,
    So you meant to say that for the whole day the Call Type Report is starting only from 15:30 ?  And you are not able to find 10:30 Interval ?
    Have you checked for any other Call Types ? Was there any failure happened in any of the components ? The RouterCallKey's doesn't look normal.
    Regards,
    Senthil

  • Webview call type report missing a completed call

    i have a call handled by an agent in my call center but i cannot find it in the webview call type report but in the webview database route_call_detail table i find it ? hope for your help
    call is received at 10:34 but the call type first period start from 15:30  !!
    and i have attached the SQL query results.

    Hello Ahmed,
    So you meant to say that for the whole day the Call Type Report is starting only from 15:30 ?  And you are not able to find 10:30 Interval ?
    Have you checked for any other Call Types ? Was there any failure happened in any of the components ? The RouterCallKey's doesn't look normal.
    Regards,
    Senthil

  • Organization/Tree structure report in BOBJ

    Hello All,
    Recently received a requirement for a "report" which to me initially did not look like a report, but rather a model of an organization chart/tree.   I am trying to figure out if something like this is possible to do in any of the BOBJ tools (WEBI/Crystal/Dashboards).  The Level0, Level1 and Level2 objects are all dynamic and there would be multiple Overall Processes - Level 0s (let's say 15).  Each process is then broken down into the respective Level1 and then further into Level 2.  All these levels are dynamic (there could be 2 level1s, 5, etc) and would come from a database (I'm not sure exactly what the data structure would look like, but it can be modeled specifically for this reason).   I see it as a type of hierarchy (but vertical) , but I am having trouble reproducing it in WEBI / Crystal.  I tried a CrossTable report in WEBI, and it almost gets me there but it shows all the Level 2s for each level 1 - can't do that type of breakdown where it compresses the rows dynamically.  What it looks like we are trying to do here is create a horizontal table for Level 0 and Level 1, but then a vertical table for Level 2.  I'm just looking for any ideas on how this may be possible as this is not your typical report.

    The issue we seem to be having is the fact that we need to create multiple vertical tables (level 2s) for each column (Level1). 
    The data looks as such
    Level 0              Level 1       System
    Overall Process Create        System1
    Overall Process Create        System2
    Overall Process Create        System3
    Overall Process Create        System4
    Overall Process Create        System5
    Overall Process Create        System6
    Overall Process Create        System7
    Overall Process Create        System8
    Overall Process Develop      System1
    Overall Process Develop      System2
    Overall Process Develop      System3
    Overall Process Develop      System4
    Overall Process Develop      System5
    Overall Process Develop      System6
    Overall Process Develop      System7
    Overall Process Award        System7
    Overall Process Award        System1
    Overall Process Award        System2
    So the Level 1s (Create/Develop/Award...) are rows and have a relation to the systems. But the systems are required to be shown as columns, each related to level 1.  But the level 0/1s are dynamic..there could be 1 to 15 Level 0s and 1 to 16 Level 1s.  I can make this relationship show as a cross table, but having a hard time (without doing some Excel Magic in Dasboards) to make it show as a "chart"

Maybe you are looking for

  • Unable to open RAW files after reinstalling Photoshop CS4

    I recently did a system recovery to my computer due to downgrading to Windows 7; however, after I installed Design Premium back to my PC, I am not able to open RAW files in Photoshop. It prompted "Could not complete your request because it is not the

  • Finder not working

    I have a problem with finder under my main user account, no icons are appearing on the desktop and I am constantly getting the spinning beach ball. If I click on the Finder dock icon the pop up box says application not responding and relanching or fo

  • RFC problem: could not get functionname from XML requst (sic)

    I'm developing an interface that attempts to call a receiver RFC on an SAP 4.6c system.  It's a very small simple interface, and it's all working until it tries to call the RFC.  The error is Exception caught by adapter framework: error while process

  • How to disable the complete block on the selection screen

    Hi, I want to disable the complete block of selection screen when user checks on box...how shall i go about this? I tried using block name as screen name and then modify screen but of no use.. Any Pointers... Regards Gunjan

  • I can't find the iCloud

    I am self-taught on computers and have limited knowledge.  In trying to work with iCloud, I downloaded Mountain Lion.  But I am unable to find iCloud in my System Preferences.  I was able to pull it up on my iPhone appropriately.  Am I missing someth