Tree type expandable collapsible menu in JSP.

Hi,
I am looking for an expandable collapsible menu which can be integrated into a jsp as a tile. I googled it but only came up with handful and even those are not free to use.
Regards,

Try, Yahoo! UI Library: TreeView
http://developer.yahoo.com/yui/treeview/

Similar Messages

  • 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

  • How can I add more than one same spry menu (eg. collapsible menu)  with in different styles (font size, color, background, etc) on current page?

    How can I add more than one same spry menu (eg. collapsible menu)  with in different styles (font size, color, background, etc) on current page?

    Hi Nancy,
    This screenshot was only for imagination. A part of the code (not all) is below.  In the code there are some background images but they are not seem in live mode.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="css/my_site.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css"/>
    <link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
    <style>
    #CollapsiblePanel1 .CollapsiblePanelOpen .CollapsiblePanelTab {
        background-color: #003366;
        font-size: 18px;
        line-height: 52px;
        color: #FFF;
    #CollapsiblePanel1 .CollapsiblePanelTabHover .CollapsiblePanelTab {
        background-color: #003366;
        color: #FFF;
        text-shadow: 1px 1px #000;
        font-weight: bold;
        line-height: 52px;
    #CollapsiblePanel1 .CollapsiblePanelClosed .CollapsiblePanelTab  {
        background-color: #C3CFDF;
        border-radius: 5px 5px 0px 0px;
        color: #999
        text-shadow: 1px 1px #000;
        font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
        font-size: 18px;
        font-weight: bold;
        line-height: 52px;
    #CollapsiblePanel2 .CollapsiblePanelOpen .CollapsiblePanelTab {
        background-image: url(images/international.jpg);
        background-repeat: no-repeat;
        font-size: 18px;
        line-height: 52px;
        color: #FFF;
    #CollapsiblePanel2 .CollapsiblePanelTabHover .CollapsiblePanelTab {
        background-color: #003366;
        color: #FFF;
        text-shadow: 1px 1px #000;
        font-weight: bold;
        background-image: url(images/TR_Col-WEB.png);
        background-repeat: no-repeat;
        line-height: 52px;
    #CollapsiblePanel2 .CollapsiblePanelClosed .CollapsiblePanelTab  {
        background-color: #C3CFDF;
        border-radius: 5px 5px 0px 0px;
        color: #999
        text-shadow: 1px 1px #000;
        font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
        font-size: 18px;
        font-weight: bold;
        background-image: url(images/TR_Gray2-WEB.png);
        background-repeat: no-repeat;
        line-height: 52px;
    #CollapsiblePanel2 .CollapsiblePanelContent {
        background-color: blue;
    #CollapsiblePanel3 .CollapsiblePanelOpen .CollapsiblePanelTab {
        background-image: url(images/TR_Col-WEB.png);
        background-repeat: no-repeat;
        font-size: 18px;
        line-height: 52px;
        color: #FFF;
    #CollapsiblePanel3 .CollapsiblePanelTabHover .CollapsiblePanelTab {
        background-color: #003366;
        color: #FFF;
        text-shadow: 1px 1px #000;
        font-weight: bold;
        background-image: url(images/TR_Col-WEB.png);
        background-repeat: no-repeat;
        line-height: 52px;
    #CollapsiblePanel3 .CollapsiblePanelClosed .CollapsiblePanelTab  {
        background-color: #C3CFDF;
        border-radius: 5px 5px 0px 0px;
        color: #999
        text-shadow: 1px 1px #000;
        font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
        font-size: 18px;
        font-weight: bold;
        background-image: url(images/TR_Gray2-WEB.png);
        background-repeat: no-repeat;
        line-height: 52px;
    #CollapsiblePanel4 .CollapsiblePanelOpen .CollapsiblePanelTab {
        background-image: url(images/TR_Col-WEB.png);
        background-repeat: no-repeat;
        font-size: 18px;
        line-height: 52px;
        color: #FFF;
    #CollapsiblePanel4 .CollapsiblePanelTabHover .CollapsiblePanelTab {
        background-color: #003366;
        color: #FFF;
        text-shadow: 1px 1px #000;
        font-weight: bold;
        background-image: url(images/TR_Col-WEB.png);
        background-repeat: no-repeat;
        line-height: 52px;
    #CollapsiblePanel4 .CollapsiblePanelClosed .CollapsiblePanelTab  {
        background-color: #C3CFDF;
        border-radius: 5px 5px 0px 0px;
        color: #999
        text-shadow: 1px 1px #000;
        font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
        font-size: 18px;
        font-weight: bold;
        background-image: url(images/TR_Gray2-WEB.png);
        background-repeat: no-repeat;
        line-height: 52px;
    #CollapsiblePanel5 .CollapsiblePanelOpen .CollapsiblePanelTab {
        background-image: url(images/TR_Col-WEB.png);
        background-repeat: no-repeat;
        font-size: 18px;
        line-height: 52px;
        color: #FFF;
    #CollapsiblePanel5 .CollapsiblePanelTabHover .CollapsiblePanelTab {
        background-color: #003366;
        color: #FFF;
        text-shadow: 1px 1px #000;
        font-weight: bold;
        background-image: url(images/TR_Col-WEB.png);
        background-repeat: no-repeat;
        line-height: 52px;
    #CollapsiblePanel5 .CollapsiblePanelClosed .CollapsiblePanelTab  {
        background-color: #C3CFDF;
        border-radius: 5px 5px 0px 0px;
        color: #999
        text-shadow: 1px 1px #000;
        font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
        font-size: 18px;
        font-weight: bold;
        background-image: url(images/TR_Gray2-WEB.png);
        background-repeat: no-repeat;
        line-height: 52px;
    </style>

  • Htmlb:tree differentiate between nodeclick and tree node expander click

    Hi,
    how can i differentiate between nodeclick and tree node expander (to get to its children) click in my event processing in htmlb:tree element.
    <u><b>What i am trying to achieve?</b></u>
    Onload just load root node and its immediate children.
    On node expand get the children of the current node and modify htmlb:tree table2 with additional node inofs.
    on node click  call some client function.
    But my issue is that i am not able to differentiate between node expander click and node click in my event handling. Any help on this is appreciated.
    (I am not using MVC)
    Thanks in advance.
    Regards
    Raja
    Message was edited by: Durairaj Athavan Raja

    After reading your weblog I think I understand better. I did some testing with my example.  I am using the toggle = "true", so that the page returns to the server each time an expander is selected.
    <htmlb:tree id          = "myTree1"
                  height      = "75%"
                  toggle      = "true"
                  title       = "<b><otr>EQI Reporting Tree</otr></b>"
                  width       = "90%"
                  onTreeClick = "myTreeClick"
                  table       = "<%= application->selection_model->itview                             %>" >
      </htmlb:tree>
    However I have not added any coding in my event handler to respond to the expander event.  I only respond to myTreeClick (which loads some data for the given selection).  The BSP tree element itself must be doing the hard work for me. 
      if event_id cs 'tr_myTree1'.
        data: tree_event type ref to cl_htmlb_event_tree.
        tree_event ?= htmlb_event.
        if tree_event->server_event = 'myTreeClick'.
          clear appl->message1.
          appl->selection_model->get_chart_data( appl = appl
                                                 node = tree_event->node ).
        endif.
      endif.
    I pass my entire tree defintion to the element.  It appears that it only sends visible nodes to be rendered. When the expander is selected, I don't have to do anything, the tree re-renders with only the newly visible rows. 
    I tested and turned off the toggle (toggle = "false") and my page took forever to load because it was sending all the nodes to the frontend on the first load.

  • Collapsible menu question

    Instead of the  accordion, I decieded to use the collapsible menu. But I want to have  one little button to the left of each Tab to open and close the menu.  How would I do that? I've found this :
    <input type="button"  onclick="CollapsiblePanel1.open();" >open panel</input>
    <input  type="button" onclick="CollapsiblePanel1.close();">close  panel</input>
    But that just gives me two standard buttons which say open  and close. With having just one button to the left for open and closing the menu, I can hyperlink the Tab, and have the button to  open and close.
    Thanks

    Sure.
    Take a look back at this page that I referred to before: I've done it here:http://www.atonementfriars.org/masses_and_prayers/in_loving_memory_donation.html (see the "click to view" under the card image). I have 'concealed' the collapsible panel tab by styling it the same as the page itself.
    Here's the html for that collapsible panel:
    <div id="CollapsiblePanel1" class="CollapsiblePanel">
        <div class="CollapsiblePanelTab" >
          <div class="caption floatleft"><img src="flip/loving_memory_donation_flip/lovingmemorydonation0001sm.jpg" width="116" height="200" alt="In Loving Memory Donation Card" /><br />
            In Loving Memory<br />
            Donation Card<br />
            click to view<br />
    <br />
    </div>
          <p><br />
    With this special, beautiful card, you can honor the memory of a loved one through a donation to the Franciscan Friars of the Atonement. </p>
          <p class="caption"><a href="https://www.atonementfriars.org/eforms/enrollmentForm/spiritual_union_enrollment_form.html" onclick="window.location = this.href;">Click here to make an Enrollment in the Graymoor Spiritual Union</a></p>
          </div>
        <div class="CollapsiblePanelContent">
          <iframe frameborder="0" src="flip/loving_memory_donation_flip/loving_memory_donation_flip.html" style="overflow: hidden; width: 100%; height: 520px;">
            </iframe><br />
          </div>
      </div>
    The "tab" is what I have made bold in the quoted code...look at the page to see...
    This bit here is a link to another page:
    <a href="https://www.atonementfriars.org/eforms/enrollmentForm/spiritual_union_enrollment_form.html"onclick="window.location = this.href;">Click here to make an Enrollment in the Graymoor Spiritual Union</a>
    Beth

  • Collapsible menu

    I came across this site which has the sort of collapsible menu i'm after...
    http://www.mathachew.com/sandbox/collapsible-menu/
    I've since attempted to customise one of them, to suit my own needs. I desire the width of the 'panel' to be bigger, however it seems to cause an issue.
    If you download the file from the link below (which is how the menu stands currently) you'll see that when you click the menu to drop down it has a slight glitch, where it flickers before the dropdown panels align with the initial panel.
    Can anyone help stop this? Also how do I set it so that the menu is already closed when the page first loads?
    http://www.rapidspread.com/file.jsp?id=6srbstvfmn
    - I suspect there is also alot of excess code in this file... if anyone wants to helps clear it up i'd appreciate it

    I suspect your problem can easily be solved by filling out the form at the following link and giving as much info as possible:
    <http://www.mathachew.com/contact/>
    Good luck.

  • All type in my menu bar and under icons has disappeared how do I get it back?

    I lost all type in my menu bar and in drop down menus as well as under icons and next to icons in the hard drive menu. The dashboard also doesn't pop up when the curser goes over it. How do I get the type back?

    Do any fonts work or show up at all in any application?
    Have you installed any new Fonts or Adobe/MS Apps?
    See if you can run Font Book in Applications, verify Fonts & check for duplicates.

  • How do you increase type size in menu bars and panels?

    I recently abandoned my Mac Pro 1,1 for a shiny new Mac Pro cylinder running Mavericks 10.9.5. I have paired it with an LG 27" IPS display. The reason I am using the LG is because I was frustrated that Apple pays absolutely no attention to the pleas of their pro users for a non-reflective display.
    And now I find that the type in the menu bars and panels is so small that it literally causes me eyestrain - and that I can't increase the type size. I am older (62), but I still need to use my Mac to survive. Unfortunately, though, it appears that Apple designers have again ignored the needs of their pro users -  in this case, older ones.
    I have been a graphic designer and a producer of technical and marketing publications for over 35 years, and I appreciate good-looking design -  but the real measure of design is usability. Even great-looking design must be user friendly.
    So now I am wondering if Apple interface designers are amateurs, or if they just don't give a @#$% about their users.
    Did I miss it? Is their a way to increase type size in menu bars, etc.?

    Did I miss it?
    Yes.
    System preferences > Displays > Resolution ...
    choose "Scaled" and pick an alternate resolution.
    When you do this, text will be drawn as if your screen were actually set to that revolution, but graphics will be drawn full-scale at the native resolution.
    This feature was invented for Retina Displays, and has finally been made available for additional displays.

  • 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

  • How to make menu in jsp ?  urgent

    how can i make a menu in jsp? i have made one js file and one css file and included them in my jsp file. but its not giving any results . please help me out
    its urgent

    And exactly what do you want to achieve?
    A menu with dynamic content generated from a database table or something like that?
    If it's static just use static HTML or JS code as part of the JSP, if dynamic generate that HTML or JS on the fly.

  • WHEN-TREE-NODE-EXPANDED not fire with keyboard in FORMS 10G

    I have a Hierarchical Tree. When i click in any node with mouse, works fine.
    When i use the key rigth and left of the keyboard, the tree expanded, but not fire the WHEN-TREE-NODE-EXPANDED.
    In FORMS 6i works fine.

    It's a bug 4509399. There is a oneoff patch on Metalink:
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:4034066994841324251::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,331369.1,1,1,1,helvetica

  • How can I get rid of the blue border in Spry collapsible menu

    How can I get rid of the blue border that displays in Safari when I click on the Spry collapsible menu?  Also want to get rid of dotted border that displays in Firefox.  Any suggestions?  Thanks.

    Please take a look here http://webaim.org/blog/plague-of-outline-0/
    If, after reading the above, you still want the outline removed the add the following style rule to your document.
    ul.MenuBarHorizontal a {
        outline: none;

  • Implementation of type-ahead functionality in Endeca JSP Ref application

    Hi all,
    I am trying to implement the type-ahead functionality in Endeca jsp reference application which Oracle is shipping with it's products. The type-ahead functionality is not present by default. Can anyone help me to implement the same thing or provide sample code/strategy to achieve the desired results ?
    Basically typeahead functionality is present in Endeca Information's quick start's search box (EID) but not it JSP reference application .
    Waiting for the replies...
    Regards,
    Hoque

    Type-ahead functionality can mean different things and be implemented in different ways. It is usually based on what behavior your user-space would benefit from.
    In the commerce space, one popular use-case is to return Category matches based on what a user has started typing. Within Endeca, this boils down to doing a dimension search and having the Category dimension enabled for dimension search. If a user starts typing "cam", the type-ahead would then recommend:
    Category: Cameras
    You can match on multiple dimensions though, so long as they are enabled for dimension search. For example, if a user starts typing "ca", the type-ahead could return:
    Category: Cameras
    Brand: Canon
    Furthermore, this behavior can be extended by enabling Compound Dimension Search. Compound Dimension Search is enabled via a flag on the dgidx process and on your ENEQuery. It provides the following behavior. If a user searches for "canon cam", it would suggest:
    Category: Cameras + Brand: Canon
    Clicking on the type-ahead would return the intersection of Category = Cameras and Brand = Canon, eliminating a click if the user is after Canon brand Cameras.
    With regards to implementation, it basically boils down to an AJAX call to a service/URL that responds with dimension search results. Then populate an empty &lt;div&gt; with links.
    Other scenarios involve returning Product/Record matches instead of Dimension matches.
    Edited by: gose on Sep 11, 2012 8:31 AM

  • How we can generate dynamic menu in jsp page

    Hi all,
    how we can generate dynamic menu in jsp page.
    Thanks
    Manjinder

    by reading more about them on the web or in a good book, OR BY HIRING SOMEBODY TO DO SO. ;)

  • 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

Maybe you are looking for