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

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.

  • Tree-like representation of interdependent hierarchy elements?

    Hi all,
    I'd like to know if anyone has experience/ideas in how to represent/report for instance the operational readiness of a plant and it's production lines as a 'dynamic hierarchy'?
    By dynamic hierarchy I mean that the operational status of the upper nodes, e.g. a plant, would be affected by the lower level nodes statuses i.e. depending on the criticality of a production lines operational status for the plant it self, a operational status
    of lets say 25%(production line or machine) would turn the status of the upper level node(plant) to red or yellow.
    This tree-like representation would look like something similar to this Value Driver Tree with a top-down representation and color coding for each nodes operational status, be it inherited or not:
    http://help.sap.com/saphelp_sem60/helpdata/en/df/a18539826a7333e10000000a114084/content.htm
    Style:
    http://www.businessobjects.com/global/images/products/performance_manager/performance_manager_strategy_maps.jpg
    Could this be accomplished easiest with VDT(?), the usual reporting tools or perhaps Visual Composer?
    This might be easier in xApps(xMII etc) but any help on how to do this with 2004 or 2004s would be much appreciated.
    Best regards,
    Janne

    Yes there is a problem writing tags to the JSP.
    JSPs/Servlets are meant to generate HTML.
    Generating JSP tags at runtime will just print them out as part of the HTML stream - it won't evaluate them.
    Remember that a JSP page gets compiled into a servlet. This process translates the JSP tags into java code. Generating JSP tags at runtime is something that will just not work, because the translation process is already complete.
    Only way to do it (nasty hack) is as you said, is to write the code to a jsp file, and then let the container translate/compile and execute that jsp as a jsp:include in your original one. Not very nice.
    Best solution would be to see if you could modify/adapt your custom tags to java objects.
    good luck,
    evnafets

  • Trees in reports

    Hi all,
    I'm reporting informations that have a tree-like structure. I bet I'm not the first.
    In the datamodel, I've created a (non-portable but I'll see later how I can deal with that) SELECT statement containing CONNECT BY and START WITH clause. And it works well.
    But, now, I wanted my report to display the hierarchy of my tree with indentation. I first used the hint from this guy : http://www.arsdigita.com/books/sql/trees.html
    And it worked well... until I displayed it in HTML/HTMLCSS (PDF was ok). That was because HTML browsers tend to ignore multiple leading spaces.
    So, I created a format trigger. When reporting for PDF or whatever is not HTML, I do the space padding (instead of in the SELECT of my datamodel). When reporting for HTML/HTMLCSS, even if the W3C doesn't approve it, I pad a number of   based on the level in the tree. As you may guess, I need to specify that the field contains HTML tags if I don't want to read lots of   in my fields.
    My problem (finally) is that when I mark the field to contains HTML tags, it looses all its formatting on the HTML display (and that's kind of annoying ;-). Does it mean that I have to add HTML tags for the font face, font size, etc... when I mark as containing HTML tags? How then should I refer to the generated styles when in HTMLCSS? Will I not be too dependent on the way the HTMLCSS is generated? Or maybe, there's something I've missed somewhere and there's a simple way to keep the formatting in the fields... Or maybe that's a bug... Or maybe my computer is drunk...
    Any help would be greatly appreciated :-)
    Frederic

    may be try erasing the message that you have put earlier and check it.

  • 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 to use more than one page to design a form-like report???

    Hi
    I am designing a form-like report. and widening the repeating frame to contain all the page or the window like this page:
    Image: !http://up1.m5zn.com/photo/2008/12/21/07/e728mos12.jpg/jpg!
    Now there is no space at the window to complete designing the report!
    How to make the repeating frame to contain more than one page or one window to complete designing the report?

    change Vertical Panels per Page to 2 (or more as needed) for the Main Section of Layout Model.

  • Access rights in case of a tree-like structure, with inheritance

    Hello,
    the project I've just started to work on should include an easy way (from the user's point of view) to grant/revoke access rights on a tree-like structure with inheritance.
    Basically we are working for several international companies who want to use our application to watch/manage some of their web projects - each project belongs to one company and consisting of several 'campaigns' in several countries (there can be several campaigns per country, but each campaign belongs to exactly one country).
    From our point of view this is a tree-like structure, with a 'root' node at the top level, 'companies' at the first level, 'countries' at the second level, 'campaigns' at the third level, and modules of our application (for example a module to display overall stats of the campaing, and so on) at the fourth level. There could be (and probably will be) some more levels, but that's not important at this point - it will always be a tree-like structure.
    The customer's reqirements are natural - the administrators should be able to grant/revoke access to 'subtrees' of this structure. For example the top managers should be able to see all the data related to their company, the local managers should be able to see all the data related to their company in the country they work in, etc. On the other hand the relular employees should not see some of the modules (with details about clients of the company).
    I wonder whether this can be solved using JAAS in an elegant and flexible manner - from the documents / whitepapers / tutorials I've seen till now it seems to me it seems to me not too suitable.
    All the data will be stored in relational database (Oracle, and in some cases PostgreSQL), and it would be nice to have the access rights stored in the same way (but it's not required). We have some ideas how to solve that using a single table containing paths in the tree, but at this point it's only an idea (not a single line of code written).
    We are sure somebody has already to solve such a problem - maybe using JAAS, maybe some other technology - and we don't want to reinvent a wheel. Do you have an idea how to solve this (using JAAS or something else)?

    Well, I forgot to explain what the 'inheritance' means ...
    We do not want to set the access right on each node of the tree - we prefer (as well as the users) to set/store only as much information as needed. We'd like the nodes to inherit the access rights from their parent nodes. For example we'd like granting access to particular project to mean granting access to all campaigns in all countries (related to the project), without the need to set and store these rights for each of the campaigns/countries.

  • Generation of tree like GUI

    Hey guys,
    I need to create a GUI which looks something like the left side content section of this webpage. If I click on the + sign I can see more topics that are there in that items.
    http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ac00490_.htm
    Can anybody tell me which java API library should I use in order to create that tree like structure.
    Thanks.

    You can do that in Swing with JTree

  • Best way to implement tree like subcategory chooser in GUI on iphone

    I need to let user choose subcategory, from a tree like structure, 3-4 level deep.
    and the list is veeeery long. I was wondering what would be the best way to show it to user, and let him choose one.
    ideas ?

    The right solution here is probably a set of UITableViewController subclasses inside a UINavigationController that your application presents modally. If the lists are long even within a level, sort and group them alphabetically and present an index list along the side, the way Contacts does. You should be able to do all this with just a few UITableViewDelegate/DataSource methods.

  • How to generate profile like report in APEX

    Hi,
    I am trying to create a report similar to Image: !http://www.nomagic.ie/sample_report.jpg! . I thought this will be easy if I create a form and fetch rows for reach section seperately during page rendering. Each each is coming from different table . I am okay with this approach, However there are couple sections that have multiple rows . I am wondering, If there is any better way in APEX to generate profile like report.
    Thanks
    Aali

    Hi Aali
    You could do this using reports rather than forms and you'd just need to have two columns returned by each query and change the alignment to mimic that look.
    Then just create a custom report template that looks the same as that (removing all borders etc).
    >
    I am okay with this approach, However there are couple sections that have multiple rows
    >
    I don't understand what you mean by this?
    Cheers
    Ben

  • Creating INCLUDE, just like REPORT prog.?

    Hi Experts,
    One simple question, pls. clarify ma that,
    In the process of VA01-Sales Order creation, I need to do not allow to create/save that doc. if PO#, MATNR, Batch r already existing in DB! in this case, I need to write logic in SAPMV45A, I found the corresponding User exit, so, I wanna insert my code as INCLUDE my_prog_code.
    So, to write INCLUDE, Is it just like Report prog.? like, SE38>my_name>create--->Type->INCLDE selection?
    Or any other things I hv to consider, to write a INCLUDE?
    thanq

    That is correct way to create an INCLUDE program. Just make sure that you correctly call the routines in the user exit and give reference of this program.
    Here is a pseudo logic.
    FORM USEREXIT_MOVE_FIELD_TO_VBAK.
    perform validate_DATA(<your include program name>).
    ENDFORM.
    Your code for routine VALIDATE_DATA will be placed in the include program.
    Message was edited by:
            Ashish Gundawar

  • Tree Like structures

    Dear All,
    I am working on some tree like structures querys.
    I am strucked up with one tricky concept.
    My Data is like as given below
    EMPNO MGR
    1
    2 1
    3 1
    4 2
    5 4
    Now my requirement states that I should display the date as given below
    1
    1 2
    1 2 4
    1 2 4 5
    Can anyone help me in designing a query.
    Appreciate your help on this.
    Thanks,
    Madhu K.

    If more levels are there then it should populate under different columns like col5 ..... That's fine, that's how it will work.
    There are only 4 levels above because that's just how the sample data is.
    1 2 3 4You'd think people could give suggestions that get you over the hard bit and then you do some work for anything that's not exactly right.
    SQL> ed
    Wrote file afiedt.buf
      1  WITH DATA AS(
      2   SELECT 1 a,0 b FROM dual UNION
      3   SELECT 2,1 FROM dual UNION
      4   SELECT 3,1 FROM dual UNION
      5   SELECT 4,2 FROM dual UNION
      6   SELECT 5,4 FROM dual UNION
      7   SELECT 6,5 FROM dual
      8  )
      9  SELECT SUBSTR(SYS_CONNECT_BY_PATH (a,' '),2) scbp
    10  FROM DATA
    11  CONNECT BY PRIOR a=b
    12  START WITH a=1
    13* ORDER BY 1
    SQL> /
    SCBP
    1
    1 2
    1 2 4
    1 2 4 5
    1 2 4 5 6
    1 3
    6 rows selected.
    SQL>

  • Is there any tool like report writer in JDeveloper

    I want to generate printable(paper) report based on perameters . is there anty tool like report writer.

    No. Many people use Jasper Reports (http://jasperreports.sourceforge.net/) for their reporting. It's free and opensource. You define your reports in xml and you can create text, html and pdf reports.
    You can also try to use html for reporting. I've used it on a project with pretty good results. The benefit is that you probably don't need to learn a new tool/language.
    We generated the html using velocity, layout was done using css. You can remove the default headers, footer and page margins added by internet explorer by setting some registry keys:
    [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup]
    "header"=""
    "footer"=""
    "margin_bottom"="0.1"
    "margin_left"="0.10"
    "margin_right"="0.10"
    "margin_top"="0.1"

  • How to display grouped tracks tree-like?

    I imported lots of classical CDs and I grouped some works using the 'Grouping' field of the song information dialog. The grouping I added appears in the column 'Grouping' , but however, I'd like to have the groupings displayed in a tree-like structure. I know iTunes can do that, because I have seen it in the music store (on some classical CDs).
    Unfortunately, the help files and FAQs don't tell a lot about grouping.
    How can I enable the tree-like display of groupings in my library?
    FYI: I am using iTunes 6.0.1 on Mac OS X 10.0.3
    Thanks for any help
    Michael

    I'd like to have the groupings displayed in a tree-like structure. I know iTunes can do that, because I have seen it in the music store (on some classical CDs).
    Ohh! That would be Folder Structure then. A useful feature in other circumstances of running tracks together while in Party Shuffle or Shuffling a list. iTMS can obviously do it, but apparently not iTunes.
    Suggest you log a request at http://www.apple.com/feedback/itunes.html
    Grouping seems another way of making a regular or smart playlist, but would not affect how those songs get displayed in viewing the library. The word "grouping" gives the impression of doing somethiing more I think.

  • Looking for tree like left navigation

    Has anyone implemented a navigation that would be like the windows file explorer folder tree.
    I want my navigation to be collapsable, indented and tree like
    Example
    Community 1Community 2 page 1 page 2 sub community 1 sub community 2 sub page 1 sub page 2Community 3...

    Thanks Yoav - FYI - we've been working on putting together a full function demo version (with time expiry) of the explorer (and suite)- so, starting from early next week we should have a version that you can install in your own environment and have a play with without having to fork out the dollars!
    Let me know if you'd like a copy.
    On the other hand - it sounds like the question is actually about a nav, rather than a portlet?
    Regards
    Steve HayrCollaborative Technologies+61 2 9409 [email protected]

Maybe you are looking for

  • Is the PCI-232/8 compatible with XP?

    Is the PCI-232/8 compatible with XP? The datasheet doesn't indicate XP compatibility. Thanks, Alan Alan Blankman, Technical Product Marketing Manager and LabVIEW Developer LeCroy Corporation 800-553-2769 x 4412 http://www.lecroy.com [email protected]

  • Implementing MRS 9 missing node /MRSS/IMG Sources of Demand Orders

    Hi, We just install MRS 9 on a ECC 6 system and when I want to do the customizing for PM/CS I can't the in the /MRSS/IMG the node /MRSS/IMG >Sources of Demand> Orders. What did I do wrong here? Thanks

  • Firewire 800 & 400 ports

    HI, I have an iMac 24" which has two Firewire ports in the rear (and 800 & a 400). I have an external LaCie 250gb drive connected to the 400 port. I also have a Panasonic miniDV camera which successfully connects via this port, however at the expense

  • Payment and prices

    I paid for 1 month subscription to call phone in Sri Lanka. After  that it shows 60 mins. credit left. But I could never take any call. The call does not connect. But at the end of the month Skype auto matically recharges and add credit to my account

  • Resource Management on iAS

    I would like to know is iAS implementing Instance Pooling so as to reuseing the EJB instance? I ask this question because my application would use quite a lot of stateless session beans. Once the seesion bean finish it's job and suppose to be destroi