Tree Control - Performance

Hi,
Am using a tree control in our web application created using
class - CL_GUI_LIST_TREE with checkbox items.
When a user 'checks' the item , it went to hourglass for 2 to 3 mins.
Can you please let me know, is there any fine tuning is required
at code level or is there any parameter setting at ITS Level.
We are in ITS 620 and R3 4.7.
Thanks in advance,
Srini S

Hi,
At coding level, a solution could be to subgroup the main nodes in your tree control and send the 'children' of a node only when it is clicked.
Kind Regards,
Sükrü

Similar Messages

  • How to get all items under a parent item in a tree control

    Hello,
    I have 2 questions regarding a tree control:
    1) Is there any way to specify a parent item tag and get an array of ALL its sub item tags? For example, in the attached vi, specify the Parent#2 parent tag and get an array containing Item#P21 and Item#P22
    2) Is there a way to specify a range to the ActiveCell property. For example, all items from line#1 to line number#3
    Any ideas?
    Attachments:
    Tree example.vi ‏6 KB

    Mentos wrote:
    1) Is there any way to specify a parent item tag and get an array of ALL its sub item tags? For example, in the attached vi, specify the Parent#2 parent tag and get an array containing Item#P21 and Item#P22
     Did you try a search? There's no direct way of doing this. You have to navigate the tree and build up an array. You can find an example here: http://forums.ni.com/t5/LabVIEW/get-all-children-o​f-a-parent-in-tree/td-p/729548
    2) Is there a way to specify a range to the ActiveCell property. For example, all items from line#1 to line number#3
    No. (It's called ActiveCell, not ActiveCells) Presumably you are trying to perform an operation on multiple items. Unfortunately, you need to use a loop. You should defer panel updates if you're doing this a lot.

  • How to search a tree control.

    Hi all,
    I just started learning Flash Builder not too long ago, quite a learning experience I have to say. I am a little lost and woul like some help from you guys.
    I am trying to build a menu tree that will display and image and information about that image when the corresponding node is selected.
    I also want to have the menu tree searchable, I looked at a few examples of tree controls to get some ideas but I keep hitting brickwalls left and right.
    I started over few times trying to follow some of the examples. Right now, I only have the visual elements, please see the code below.
    Thank you so much in advance.
    Here's the code I have so far:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="960" minHeight="560" backgroundColor="#FFFFFF" width="960" height="560">
    <fx:Declarations>
    </fx:Declarations>
    <mx:HDividedBox y="80" height="415" x="25">
         <s:Panel x="20" y="95" width="240" height="415">
              <s:TextInput x="10" y="-25" height="20" contentBackgroundAlpha="1.0" borderAlpha="1.0" textAlign="left" fontWeight="normal" text="Search" focusColor="#70B2EE" fontSize="10" color="#646464"/>
              <mx:Tree id="tree"
                        x="10" y="5" width="220" height="370" borderVisible="false" color="#787878">
              </mx:Tree>
              <s:Button x="160" y="-25" label="Find" fontWeight="bold" fontSize="10"/>
         </s:Panel>
         <s:Panel x="275" y="95" width="660" height="415">
              <mx:SWFLoader id="swfLoader"
                               scaleContent="true"
                   x="0" y="0" width="660" height="190"/>
              <mx:Text width="639" id="treeSelectedData"
                         height="169" x="9" y="203"/>
         </s:Panel>
    </mx:HDividedBox>
    </mx:Application>

    You should take a look at the help documentation about the tree component. They have an example code at the bottom that shows how to load in data to the tree and how to perform actions when a node in the tree is selected. Below is a link to the help documentation on the tree component.
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/Tree.html?f ilter_flex=4.5.1&filter_flashplayer=10.3&filter_air=2.6

  • Problem while working wwith tree control

    hi all
    i am working with tree control the prolems i have been facing are
    i am not able o get the event for a single click on the tree node .
    i am displaying the purchase order in the tree and once i select on sinlge click a purchase order ,now i want to create the sales order on the another screen and once i click on the button it should call another screen on which i have to create the sales order ,
    please help

    hi gandhivarun,
    i am posting the code which will give idea on Tree display.
    REPORT  ZALVGRID_PG.
    TABLES: SSCRFIELDS.
    DATA: V_BELNR TYPE RBKP-BELNR.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: IRNO FOR V_BELNR.
    PARAMETERS: P_GJAHR TYPE RBKP-GJAHR.
    SELECTION-SCREEN END OF BLOCK B1.
    DATA: WA TYPE ZALVGRID_DISPLAY,
          ITAB TYPE STANDARD TABLE OF ZALVGRID_DISPLAY.
    DATA: IDENTITY TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    DATA: GRID TYPE REF TO CL_GUI_ALV_GRID.
    DATA: L_IDENTITY TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    DATA: L_TREE TYPE REF TO CL_GUI_ALV_TREE_SIMPLE.
    TYPE-POOLS: SLIS,SDYDO.
    DATA: L_LOGO TYPE SDYDO_VALUE,
          L_LIST TYPE SLIS_T_LISTHEADER.
    END-OF-SELECTION.
    CLASS CL_LC DEFINITION.
      PUBLIC SECTION.
        METHODS: DC FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID IMPORTING E_ROW E_COLUMN.
    ENDCLASS.
    CLASS CL_LC IMPLEMENTATION.
      METHOD DC.
        DATA: WA1 TYPE ZALVGRID_DISPLAY.
        READ TABLE ITAB INTO WA1 INDEX E_ROW-INDEX.
        BREAK-POINT.
        SET PARAMETER ID 'BLN' FIELD WA1-BELNR.
        CALL TRANSACTION 'FB02'.
      ENDMETHOD.                    "DC
    ENDCLASS.
    DATA: OBJ_CL TYPE REF TO CL_LC.
    START-OF-SELECTION.
      PERFORM SELECT_DATA.
      IF SY-SUBRC = 0.
        CALL SCREEN 100.
      ELSE.
        MESSAGE E000(0) WITH 'DATA NOT FOUND'.
      ENDIF.
      INCLUDE ZALVGRID_PG_STATUS_0100O01.
      INCLUDE ZALVGRID_PG_LOGOSUBF01.
      INCLUDE ZALVGRID_PG_SELECT_DATAF01.
    INCLUDE ZALVGRID_PG_USER_COMMAND_01I01.
    ***INCLUDE ZALVGRID_PG_STATUS_0100O01 .
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'AB'.
    *  SET TITLEBAR 'xxx'.
      IF IDENTITY IS INITIAL.
        CREATE OBJECT IDENTITY
        EXPORTING
          CONTAINER_NAME = 'ALVCONTROL'.
        CREATE OBJECT GRID
        EXPORTING
          I_PARENT = IDENTITY.
        CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY
          EXPORTING
             I_STRUCTURE_NAME              = 'ZALVGRID_DISPLAY'
          CHANGING
            IT_OUTTAB                     = ITAB.
        CREATE OBJECT OBJ_CL.
        SET HANDLER OBJ_CL->DC FOR GRID.
        ENDIF.
        IF L_IDENTITY IS INITIAL.
          CREATE OBJECT L_IDENTITY
          EXPORTING
            CONTAINER_NAME = 'LOGO'
          CREATE OBJECT L_TREE
          EXPORTING
            I_PARENT = L_IDENTITY.
          PERFORM LOGOSUB USING L_LOGO.
          CALL METHOD L_TREE->CREATE_REPORT_HEADER
            EXPORTING
              IT_LIST_COMMENTARY    = L_LIST
              I_LOGO                = L_LOGO.
         ENDIF    .
    ENDMODULE.                 " STATUS_0100  OUTPUT
    ***INCLUDE ZALVGRID_PG_LOGOSUBF01 .
    FORM LOGOSUB  USING    P_L_LOGO.
      P_L_LOGO = 'ERPLOGO'.
    ENDFORM.                    " LOGOSUB
    ***INCLUDE ZALVGRID_PG_SELECT_DATAF01 .
    FORM SELECT_DATA .
      SELECT RBKP~BELNR
             RBKP~BLDAT
             RSEG~BUZEI
             RSEG~MATNR
             INTO TABLE ITAB
             FROM RBKP INNER JOIN RSEG
        ON RBKP~BELNR = RSEG~BELNR
        WHERE RBKP~BELNR IN IRNO
        AND RBKP~GJAHR = P_GJAHR.
    ENDFORM.                    " SELECT_DATA
    ***INCLUDE ZALVGRID_PG_USER_COMMAND_01I01 .
      CASE SY-UCOMM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
           EXIT.
           ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Warm Ragrds,
    PavanKumar.G
    Edited by: pavankumar.g on Jan 30, 2012 11:02 AM

  • Control Framework tree control event not trigerring

    The event handle_node_double_click is not trigerring on the tree controls . I want to display the contents of the nodes on the text editor on trigerring of this event
    *& Report  ZCONTROLS_TREE_TEDIT_SPITTER
    REPORT  zcontrols_tree_tedit_spitter.
    DATA : editor TYPE REF TO cl_gui_textedit,
           tree   TYPE REF TO cl_gui_simple_tree.
    DATA : container TYPE REF TO cl_gui_custom_container,
           splitter  TYPE REF TO cl_gui_easy_splitter_container,
           right     TYPE REF TO cl_gui_container,
           left      TYPE REF TO cl_gui_container.
    DATA : node_itab LIKE node_str OCCURS 0.
          CLASS EVENT_HANDLER DEFINITION
    CLASS event_handler DEFINITION.
      PUBLIC SECTION.
        METHODS : handle_node_double_click
                  FOR EVENT NODE_DOUBLE_CLICK OF cl_gui_simple_tree
                  IMPORTING node_key.
    ENDCLASS.                    "EVENT_HANDLER DEFINITION
          CLASS EVENT_HANDLER IMPLEMENTATION
    CLASS event_handler IMPLEMENTATION.
      METHOD handle_node_double_click.
      perform node_double_click using node_key.
      ENDMETHOD.                    "HANDLE_NODE_DOUBLE_CLICK
    ENDCLASS.                    "EVENT_HANDLER IMPLEMENTATION
    data : handler1 type ref to event_handler.
    START-OF-SELECTION.
      CALL SCREEN 9001.
    *&      Module  start  OUTPUT
          text
    MODULE start OUTPUT.
      SET PF-STATUS 'ZSTAT1'.
      IF container IS INITIAL.
        CREATE OBJECT container
          EXPORTING
             container_name              = 'CONTAINER_NAME'
          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 OBJECT splitter
          EXPORTING
            parent            = container
            orientation       = 1
            name              = 'Mohit'
          EXCEPTIONS
            cntl_error        = 1
            cntl_system_error = 2
            OTHERS            = 3
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        left  = splitter->top_left_container.
        right = splitter->bottom_right_container.
        CREATE OBJECT editor
          EXPORTING
            parent                 = right
            name                   = 'MohitEditor'
          EXCEPTIONS
            error_cntl_create      = 1
            error_cntl_init        = 2
            error_cntl_link        = 3
            error_dp_create        = 4
            gui_type_not_supported = 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 OBJECT tree
          EXPORTING
            parent                      = left
            node_selection_mode         = tree->node_sel_mode_single
            name                        = 'MohitTree'
          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.
        PERFORM fill_tree.
        CALL METHOD tree->add_nodes
          EXPORTING
            table_structure_name           = 'NODE_STR'
            node_table                     = node_itab
          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.
      create object handler1.
      set handler handler1->handle_node_double_click for tree.
      ENDIF.
    ENDMODULE.                 " start  OUTPUT
    *&      Module  USER_COMMAND_9001  INPUT
          text
    MODULE user_command_9001 INPUT.
      CALL METHOD cl_gui_cfw=>dispatch.
    ENDMODULE.                 " USER_COMMAND_9001  INPUT
    *&      Form  fill_tree
          text
    -->  p1        text
    <--  p2        text
    FORM fill_tree .
      DATA : node LIKE node_str.
      CLEAR node.
      node-node_key = 'head_mohit'.
      node-isfolder = 'X'.
      node-text = 'Mohit'.
      APPEND node TO node_itab.
      CLEAR node.
      node-node_key = 'Child1'.
      node-relatkey = 'head_mohit'.
      node-relatship = cl_gui_simple_tree=>relat_last_child.
      node-text = 'Mohit is the best '.
      APPEND node TO node_itab.
      CLEAR node.
      node-node_key = 'Child2'.
      node-relatkey = 'head_mohit'.
      node-relatship = cl_gui_simple_tree=>relat_last_child.
      node-text = 'Mohit is the bestest '.
      APPEND node TO node_itab.
      CLEAR node.
      node-node_key = 'head_JAIN'.
      node-isfolder = 'X'.
      node-text = 'jAIN'.
      APPEND node TO node_itab.
      CLEAR node.
      node-node_key = 'Child3'.
      node-relatkey = 'head_JAIN'.
      node-relatship = cl_gui_simple_tree=>relat_next_sibling.
      node-text = 'cnh INDIA '.
      APPEND node TO node_itab.
      CLEAR node.
      node-node_key = 'Child4'.
      node-relatkey = 'head_JAIN'.
      node-relatship = cl_gui_simple_tree=>relat_last_child.
      node-text = 'SAP  '.
      APPEND node TO node_itab.
    ENDFORM.                    " fill_tree
    *&      Form  node_double_click
          text
         -->P_NODE_KEY  text
    form node_double_click  using  p_node_key type TV_NODEKEY.
    DATA : node LIKE node_str.
    DATA textline(256).
    DATA text_table LIKE STANDARD TABLE OF textline.
    READ TABLE node_itab WITH KEY node_key = p_node_key
                             INTO node.
    endform.                    " node_double_click
    *&      Module  exit  INPUT
          text
    module exit input.
    CASE sy-ucomm.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
    ENDCASE.
    endmodule.                 " exit  INPUT

    Hello Mohit
    Here is a sample routine (taken from BCALV_TREE_02) which you have to add and adapt for your report. It does two things:
    1. Register events that should be handled (required but not sufficient for event handling)
    2. Set event handler for registered events
    The first step is different from ALV grid controls because here all events are already registered with the control (not the control framework).
    Set the event handler (statement SET HANDLER) registers the event handling with the control framework.
    FORM register_events.
    *§4. Event registration: tell ALV Tree which events shall be passed
    *    from frontend to backend.
      DATA: lt_events TYPE cntl_simple_events,
            l_event TYPE cntl_simple_event,
            l_event_receiver TYPE REF TO lcl_tree_event_receiver.
    *§4a. Frontend registration(i):  get already registered tree events.
    * The following four tree events registers ALV Tree in the constructor
    * method itself.
    *    - cl_gui_column_tree=>eventid_expand_no_children
    * (needed to load data to frontend when a user expands a node)
    *    - cl_gui_column_tree=>eventid_header_context_men_req
    * (needed for header context menu)
    *    - cl_gui_column_tree=>eventid_header_click
    * (allows selection of columns (only when item selection activated))
    *   - cl_gui_column_tree=>eventid_item_keypress
    * (needed for F1-Help (only when item selection activated))
    * Nevertheless you have to provide their IDs again if you register
    * additional events with SET_REGISTERED_EVENTS (see below).
    * To do so, call first method  GET_REGISTERED_EVENTS (this way,
    * all already registered events remain registered, even your own):
    call method g_alv_tree->get_registered_events
          importing events = lt_events.
    * (If you do not these events will be deregistered!!!).
    * You do not have to register events of the toolbar again.
    *§4b. Frontend registration(ii): add additional event ids
      l_event-eventid = cl_gui_column_tree=>eventid_node_double_click.
      APPEND l_event TO lt_events.
    *§4c. Frontend registration(iii):provide new event table to alv tree
      CALL METHOD g_alv_tree->set_registered_events
        EXPORTING
          events = lt_events
        EXCEPTIONS
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
      IF sy-subrc <> 0.
        MESSAGE x208(00) WITH 'ERROR'.     "#EC NOTEXT
      ENDIF.
    *§4d. Register events on backend (ABAP Objects event handling)
      CREATE OBJECT l_event_receiver.
      SET HANDLER l_event_receiver->handle_node_double_click FOR g_alv_tree.
    ENDFORM.                               " register_events
    Regards
      Uwe

  • Single click on tree control navigation

    Hello I have a tree control where I have include the navigation, I know that there is a method
    HANDLE_NODE_DOUBLE_CLICK FOR G_TREE
    but is there an method for only one click, I want to change my alv grid data when I click on several nodes in my tree control

    Hello Muhammet
    I have re-written my sample report ZUS_SDN_TWO_ALV_GRIDS into ZUS_SDN_TREE_AND_GRID_CONTROL which is now display a tree control together with the ALV grid.
    When you analyze this new report you will see that every step of the program logic is as I described in my previous e-mails.
    *& Report  ZUS_SDN_TWO_ALV_GRIDS
    *& Screen '0100' contains no elements.
    *& ok_code -> assigned to GD_OKCODE
    *& Flow logic:
    *  PROCESS BEFORE OUTPUT.
    *    MODULE STATUS_0100.
    *  PROCESS AFTER INPUT.
    *    MODULE USER_COMMAND_0100.
    *& Thread: single click on tree control navigation
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1143770"></a>
    REPORT  zus_sdn_tree_and_grid_control.
    TYPE-POOLS: abap, cntl.
    TYPES: node_table_type LIKE STANDARD TABLE OF mtreesnode
             WITH DEFAULT KEY.
    * CAUTION: MTREESNODE is the name of the node structure which must
    * be defined by the programmer. DO NOT USE MTREESNODE!
    CONSTANTS:
      BEGIN OF c_nodekey,
        root   TYPE tv_nodekey VALUE 'Root',                    "#EC NOTEXT
        child1 TYPE tv_nodekey VALUE 'Child1',                  "#EC NOTEXT
    *    child2 type tv_nodekey value 'Child2',                  "#EC NOTEXT
        new1   TYPE tv_nodekey VALUE 'New1',                    "#EC NOTEXT
        new2   TYPE tv_nodekey VALUE 'New2',                    "#EC NOTEXT
    *    new3   type tv_nodekey value 'New3',                    "#EC NOTEXT
    *    new4   type tv_nodekey value 'New4',                    "#EC NOTEXT
      END OF c_nodekey.
    DATA:
      gd_okcode        TYPE ui_func,
      gd_repid         TYPE syst-repid,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_splitter      TYPE REF TO cl_gui_splitter_container,
      go_cell_left     TYPE REF TO cl_gui_container,
      go_cell_right    TYPE REF TO cl_gui_container,
      go_tree          TYPE REF TO cl_gui_simple_tree,
      go_grid1         TYPE REF TO cl_gui_alv_grid,
    **  go_grid2         TYPE REF TO cl_gui_alv_grid,
      gs_layout        TYPE lvc_s_layo.
    DATA:
      gt_knb1          TYPE STANDARD TABLE OF knb1,
      gt_knvv          TYPE STANDARD TABLE OF knvv.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
          handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
            IMPORTING
              e_row
              e_column
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_double_click.
    *   define local data
        DATA:
          ls_knb1      TYPE knb1.
        CHECK ( sender = go_grid1 ).
        READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
        CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
    **    CALL METHOD go_grid1->set_current_cell_via_id
    **      EXPORTING
    ***        IS_ROW_ID    =
    ***        IS_COLUMN_ID =
    **        is_row_no    = es_row_no.
    *   Triggers PAI of the dynpro with the specified ok-code
        CALL METHOD cl_gui_cfw=>set_new_ok_code( 'DETAIL' ).
      ENDMETHOD.                    "handle_double_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    *       CLASS LCL_APPLICATION DEFINITION
    CLASS lcl_application DEFINITION.
      PUBLIC SECTION.
        CLASS-DATA:
          md_event       TYPE string     READ-ONLY,
          md_node_key    TYPE tv_nodekey READ-ONLY.
        CLASS-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.
    ENDCLASS.                    "LCL_APPLICATION DEFINITION
    *       CLASS LCL_APPLICATION IMPLEMENTATION
    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
        md_event = 'NODE_DOUBLE_CLICK'.
        md_node_key = node_key.
        " Trigger PAI and set ok-code = 'DETAIL'
        CALL METHOD cl_gui_cfw=>set_new_ok_code
          EXPORTING
            new_code = 'DETAIL'
    *      IMPORTING
    *        rc       =
        MESSAGE md_node_key TYPE 'I'.
      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 mtreesnode.
        " show the key of the double clicked node in a dynpro field
        md_event = 'EXPAND_NO_CHILDREN'.
        md_node_key = node_key.
        IF node_key = 'Child1'.
    * add two nodes to the tree control (the children of 'Child1')
    * Node with key 'New1'
          CLEAR node.
          node-node_key = c_nodekey-new1.
          node-relatkey = c_nodekey-child1.
          node-relatship = cl_gui_simple_tree=>relat_last_child.
          node-isfolder = ' '.
          node-text = 'New1'(ne1).
          APPEND node TO node_table.
    * Node with key 'New2'
          CLEAR node.
          node-node_key = c_nodekey-new2.
          node-relatkey = c_nodekey-child1.
          node-relatship = cl_gui_simple_tree=>relat_last_child.
          node-n_image = '@10@'.
          node-expander = ' '.
          node-text = 'New2'(ne2).
          APPEND node TO node_table.
          CALL METHOD go_tree->add_nodes
            EXPORTING
              table_structure_name           = 'MTREESNODE'
              node_table                     = node_table
            EXCEPTIONS
              failed                         = 1
              error_in_node_table            = 2
              dp_error                       = 3
              table_structure_name_not_found = 4
              OTHERS                         = 5.
          IF sy-subrc <> 0.
    **        MESSAGE A000.
          ENDIF.
        ENDIF.
      ENDMETHOD.                    "HANDLE_EXPAND_NO_CHILDREN
    ENDCLASS.                    "LCL_APPLICATION IMPLEMENTATION
    START-OF-SELECTION.
      SELECT        * FROM  knb1 INTO TABLE gt_knb1 UP TO 100 ROWS
             WHERE  bukrs  = '1000'.
      PERFORM init_controls.
    * Display data
      gs_layout-grid_title = 'Customers: Sales Areas'.
      CALL METHOD go_grid1->set_table_for_first_display
        EXPORTING
          i_structure_name = 'KNVV'
          is_layout        = gs_layout
        CHANGING
          it_outtab        = gt_knvv
        EXCEPTIONS
          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.
    * Link the docking container to the target dynpro
      gd_repid = syst-repid.
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = gd_repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          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.
    * NOTE: dynpro does not contain any elements
      CALL SCREEN '0100'.
    * Flow logic of dynpro (does not contain any dynpro elements):
    *PROCESS BEFORE OUTPUT.
    *  MODULE STATUS_0100.
    *PROCESS AFTER INPUT.
    *  MODULE USER_COMMAND_0100.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.  " contains push button "DETAIL"
    *  SET TITLEBAR 'xxx'.
    * Refresh display of detail ALV list
      CALL METHOD go_grid1->refresh_table_display
    *    EXPORTING
    *      IS_STABLE      =
    *      I_SOFT_REFRESH =
        EXCEPTIONS
          OTHERS         = 2.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      TRANSLATE gd_okcode TO UPPER CASE.
      CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
    *   User has pushed button "Display Details"
        WHEN 'DETAIL'.
          MESSAGE gd_okcode TYPE 'I'.
          PERFORM entry_show_details.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  ENTRY_SHOW_DETAILS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM entry_show_details .
    * define local data
      DATA:
        ld_row      TYPE i,
        ls_knb1     TYPE knb1.
      IF ( gt_knvv IS INITIAL ).
        SELECT        * FROM  knvv INTO TABLE gt_knvv
        FOR ALL ENTRIES IN gt_knb1
           WHERE  kunnr  = gt_knb1-kunnr.
      ELSE.
        REFRESH: gt_knvv.
      ENDIF.
    ENDFORM.                    " ENTRY_SHOW_DETAILS
    *&      Form  INIT_CONTROLS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM init_controls .
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent = cl_gui_container=>screen0
          ratio  = 90
        EXCEPTIONS
          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 splitter container
      CREATE OBJECT go_splitter
        EXPORTING
          parent            = go_docking
          rows              = 1
          columns           = 2
    *      NO_AUTODEF_PROGID_DYNNR =
    *      NAME              =
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_error = 2
          OTHERS            = 3.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Get cell container
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 1
          column    = 1
        RECEIVING
          container = go_cell_left.
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 1
          column    = 2
        RECEIVING
          container = go_cell_right.
    * Create ALV grids
      CREATE OBJECT go_grid1
        EXPORTING
          i_parent = go_cell_right
        EXCEPTIONS
          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.
    * Set event handler
      SET HANDLER:
        lcl_eventhandler=>handle_double_click FOR go_grid1.
      PERFORM create_and_init_tree.
    ENDFORM.                    " INIT_CONTROLS
    *&      Form  CREATE_AND_INIT_TREE
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM create_and_init_tree .
      DATA: lt_node_table TYPE node_table_type,
            lt_events TYPE cntl_simple_events,
            ls_event TYPE cntl_simple_event.
    * create a tree control
      CREATE OBJECT go_tree
        EXPORTING
          parent                      = go_cell_left
          node_selection_mode         = cl_gui_simple_tree=>node_sel_mode_single      " single node selection is used
        EXCEPTIONS
          lifetime_error              = 1
          cntl_system_error           = 2
          create_error                = 3
          failed                      = 4
          illegal_node_selection_mode = 5.
      IF sy-subrc <> 0.
    **    MESSAGE a000.
      ENDIF.
    * define the events which will be passed to the backend
      " node double click
      ls_event-eventid = cl_gui_simple_tree=>eventid_node_double_click.
    **  ls_event-appl_event = 'X'. " process PAI if event occurs
      " NOTE: Do NOT register as application event !!!!!
      APPEND ls_event TO lt_events.
      CALL METHOD go_tree->set_registered_events
        EXPORTING
          events                    = lt_events
        EXCEPTIONS
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
      IF sy-subrc <> 0.
    **    MESSAGE a000.
      ENDIF.
      SET HANDLER:
        lcl_application=>handle_node_double_click   FOR go_tree,
        lcl_application=>handle_expand_no_children  FOR go_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 lt_node_table.
    * node_table_structure_name     = 'MTREESNODE'
    *   A programmer using the tree control must create a structure in the
    *   dictionary. This structure must include the structure TREEV_NODE
    *   and must contain a character field with the name 'TEXT'.
      CALL METHOD go_tree->add_nodes
        EXPORTING
          table_structure_name           = 'MTREESNODE'
          node_table                     = lt_node_table
        EXCEPTIONS
          failed                         = 1
          error_in_node_table            = 2
          dp_error                       = 3
          table_structure_name_not_found = 4
          OTHERS                         = 5.
      IF sy-subrc <> 0.
    **    MESSAGE a000.
      ENDIF.
    ENDFORM.                    " CREATE_AND_INIT_TREE
    *&      Form  build_node_table
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_node_table
      USING
        node_table TYPE node_table_type.
      DATA: node LIKE mtreesnode.
    * 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 'Root'
      node-node_key = c_nodekey-root.
      " Key of the node
      CLEAR node-relatkey.      " Special case: A root node has no parent
      CLEAR node-relatship.     " node.
      node-hidden = ' '.        " The node is visible,
      node-disabled = ' '.      " selectable,
      node-isfolder = 'X'.      " a 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.      " see below.
      node-text = 'Root'(roo).
      APPEND node TO node_table.
    * Node with key 'Child1'
      node-node_key = c_nodekey-child1.
      " Key of the node
      " Node is inserted as child of the node with key 'Root'.
      node-relatkey = c_nodekey-root.
      node-relatship = cl_gui_simple_tree=>relat_last_child.
      node-hidden = ' '.
      node-disabled = ' '.
      node-isfolder = 'X'.
      CLEAR node-n_image.
      CLEAR node-exp_image.
      node-expander = 'X'. " The node is marked with a '+', although
      " it has no children. When the user clicks on the
      " + to open the node, the event
      " expand_no_children is fired. The programmer can
      " add the children of the
      " node within the event handler of the
      " expand_no_children event
      " (see method handle_expand_no_children
      " of class lcl_application)
      node-text = 'Child1'(ch1).
      node-style = cl_gui_simple_tree=>style_emphasized_positive.
      APPEND node TO node_table.
    ENDFORM.                    " build_node_table
    Regards
      Uwe

  • SAP GUI hangs up - tree control

    Hi,
    I have written an ABAP program to display a report in tree format. This tree(designed using SAPGUI tree control) has close to 75K nodes. When I exit from this application(report), the SAPGUI hangs up. It takes about 25-30 minutes to exit this report program.
    Further analysis tells me that it is only the front end process and NOT the runtime of the program. I am using Windows.
    I am not sure how much this forum is relevant to this problem. But, any inputs on the reason for a slow performing GUI is appreciated.
    Thanks,
    Hema

    There are some known performance issues with older patchlevels, since you neither mention, what GUI version you use and which patchlevel I would just recommend updating to 7.20 and the latest patchlevel and try again.
    If that doesn't help the only thing left is to decrease the amount of data being sent to the frontend.
    Markus

  • Is a tree control appropriat​e for this applicatio​n?

    I've been playing with the idea of designing a Visio-like application in LabView.  (See my post from a year ago or so...  Playing with the idea for a long time, I guess...)
    My first approach was to use a flat array to hold all the objects that would be drawn.  To draw them, I treated the flat array like a tree, adding new objects to the end, and traversing it carefully when drawing a page.  (This page has this "group" object, which contains these other objects...)
    Would the tree control be appropriate for this type of application?  I don't necessarily need to show the user the tree.  I would use it primarily for behind-the-scenes bookkeeping.  Or is the tree primarily a GUI-oriented control?
    Secondly, how can I relate items in the tree with the information I need to display on the canvas?  For example, If I come across an object titled "panel\group_2\square_5" -- well, how do I use that to access all the properties of "square_5" (size, color, etc.)?  When the tree is used for representing a directory structure, a tag named "c:\dir2\file5" is very convenient -- the computer knows what to do with that, and no massaging is needed.  But what good is "panel\group_2\square_5"?  Do I then perform a string "match pattern" of an array of tags, and use that index to the flat array of objects?  Ugh, that doesn't seem very efficient.
    Thanks!
    Tom

    Someone who's used OOP will undoubtedly jump in here and tell you this is an ideal case for OO, because they can easily have children and you can represent your tree structure in a logical fashion.  Another approach would be to use variants.  Since variants can have named attributes, and attributes are themselves variants, you can easily construct a tree representing all your objects.  Each object might also have a "properties" attribute allowing you to access all the relevant properties of, for example, your square.

  • How can I display and change built-in symbols of a tree control programmatically?

    I want to set the built-in symbols of a tree control during runtime.
    I only found an example to assign custom pictures but not how to select one of the 40 built-in symbol.
    Many Thanks 
    Solved!
    Go to Solution.

    The ActiveItem.SymbolIndex will allow you to select the symbol for the active item. You can use the ListBox Symbol Ring Constant (Dialog and User Interface palette) to select a symbol (or you can just enter the number directly if you know what it is).
    Message Edited by smercurio_fc on 07-10-2008 09:36 AM
    Attachments:
    Example_VI_BD6.png ‏2 KB

  • Not able to get the database data into the Tree Control

    Hi Everybody,
                        I have to populate the tree control with nodes and items, which is to be populated from the database, and the tree control is <b>dynamic</b>. I mean, there is a <b>toolbar</b>, whenever a <b>pushbutton is clicked</b>, depending on that the tree contents has to be changed.
    If anybody had worked with <b>CL_GUI_COLUMN_TREE</b> control to get the data from database, depending upon the <b>pushbutton selected in Toolbar</b>, please paste the seudocode for it.
    Regards,
      Abdul,
    Intelligroup.
    P.S: Helpful answers will be rewarded.

    have you seen this demo program
    SAPCOLUMN_TREE_CONTROL_DEMO
    Regards
    Raja

  • How to binding incoming xml node list to the tree control as dataProvider

    Recently, I faced into one issue: I want to binding incoming xml node (it's not avaliable at start) list to the tree control as a dataProvider.
    Since the incoming xml node list is not avaliable at beginning but I needs to bind it to the tree, so I create one virtual one in the xml, and prepare to remove it before the tree is shown. (ready for the actual node adding). But It did not work.
    Please see the presudo-code here:
    1.  Model layer(CsModel.as)
    public class CsModel
            [Bindable]
            public var treeXML:XML=<nodes><car label="virtualOne" id="1">
                                   </car></nodes>;
            (Here, I want to build binding relationship on the <car/> node,
             one 'virtual/stub' node is set here with lable="virtualOne".
             But this node will be deleted after IdTree
             control is created completely.)      
            [Bindable]
            public var treeData:XMLList =new XMLListCollection(treeXML.car);
    2. view layer(treePage.mxml)
            private var _model:CsModel = new CsModel();
            private function addNode():void
                    var newNode:XML=<car/>;
                    newNode.@label="newOne";
                    newNode.@id=1;
                    _model.treeXML.appendChild(newNode);
                             private function cleanData():void
                                     delete _model.treeXML.car;
            <mx:VBox height="100%" width="100%">
            <mx:Button label="AddNode" click="addNode()" />
            <mx:Tree id="IdTree"  labelField="@label"
              creationComplete="cleanData()"
              dataProvider="{_model}"/>
        </mx:VBox>
    3. Top view layer (App.Mxml)
    <mx:application>
        <treePage />
    </mx:application>
    For method: cleanData(),It's expected that when the treePage is shown, we first delete the virutalOne to provide one 'clear' tree since we don't want show virtualOne to the user. The virutalOne node just for building the relationship between treeData and treeXML at beginning. But the side effect of this method, I found, is that the relationship between treeXML and treeData was cut off. And this leads to that when I added new node (by click the 'addNode' button) to the xmlXML, the xmlData was not affected at all !
    So Is there any other way to solve this issue or bind the incoming xml node list to the xmlListCollection which will be used as Tree control's dataProvider ?

    If u want to display the name : value then u can do like this
    <xsl:eval>this.selectSingleNode("name").nodeName</xsl:eval> : <xsl:value-of select="name" />

  • How can I save the all the values of a tree control ?

    I have a problem, in run time, I adds new items on a tree control, but i don´t know how I can save the values of the child text of each item in a file.
    Thanks.

    I'm no expert on the tree control, but I made a small example to save all items to a textfile, including item tag, item string, and indent level. One drawback of this method is that it fully expands the tree regardless how the user left it. To go the other direction, you'd have to write a routine to go through the text file and programmatically build the tree.
    To master the tree control, I think you have to resort to creating a control reference for it and using the Invoke Node to do some operations. For another approach to traversing and operating on a tree, check out the "Traversing Tree Controls and Setting Custom Symbols" (search the NI Developer Zone site).
    Best of luck,
    John
    Attachments:
    Save Tree Structure to Textfile.vi ‏32 KB

  • How can I drag and drop an item from one Tree control to another in LabVIEW 7.1?

    You can use the mouse up and down event on the two tree controls but the problem is making the correct selection in the second tree control. I want to be able to switch over to the selection bar of the second tree control so that I can place my item in the correct position. I know all possible workarounds with double-clicks and so on... but I really want a windows drag and drop.
    This is what I have for the moment. Please check the library below. I need to activate the selection bar of the second tree control somehow to get the position in the control. The VI below is written in LV 7.1
    Attachments:
    Drag&Drop.llb ‏65 KB

    Hi Jones,
    As far as I know this feature is currently not supported by the Tree control. A workaround, would be to use the vertical position of the mouse in the button up event to determine what line you�re dropping the item.
    If you would like the Tree control to include the drag and drop feature, please submit this as a Product Suggestion under the feedback at www.ni.com/contact.
    Good luck!
    Best regards,
    Philip C.
    Applications Engineer
    National Instruments
    www.ni.com/ask
    - Philip Courtois, Thinkbot Solutions

  • How to use the drop event of the tree control in LabVIEW 8.20?

    Hi,
                I am using the two tree controls in my application to provide a option for the user to drag and drop item from one tree to the other.  I have to validate the user selection. I tried to capture the user drop event  using the event structure. The problem I am facing is, I am not able to drop the item even though i have wired a constant true to the filter(Accepted?) in the event case. I have enable the property(Allow droping) in the right menu of the tree control also.
              While configuring an event case for (drop, drag entered and some thing like this) only I am getting the problem otherwise it is working fine.  
    What do i need to do to caprture the drop event ?
    Is there any way to avoid the item duplication while droping a new item in the tree control ?
    or how can i do this?
    Thanks,
    Pandiarajan R

    Hi Pandiarajan,
    I hope you are doing well today! There is a lengthy discussion on the Tree Control Drag & Drop feature at this forums post including contributions from the developer of the Drag & Drop feature:
    Tree Control Drag & Drop in LabVIEW 8
    By avoiding item duplication, do you mean that you don't want the same item to be in the old tree control or do you not want more than one item in the new tree control?
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • How to get position of a ring in a tree control?

    Ok, this is probably a stupid question, but how does one get the position of a ring inside of a tree control?  I have a tree with two columns, with rings in the second column.  I can set the position using SetTreeCellRingValueFromIndex(), but how does one get the position after the user has modified the control?  I found the functions GetTreeCellRingIndexFromValue() and GetTreeCellRingValueFromIndex() but I haven't found a way to get either the Index or the Value of the ring (what I'm looking for is the index, but if I can obtain the value I can go from there).  Thanks in advance!
    Solved!
    Go to Solution.

    Hi,
    You can use GetTableCellVal function to get the value of the ring.
    There is not special "ring" function for that. Maybe that's what you were searching for
    From the value you can get to the index using the functions you are already aware of.
    Hope this helps,
    S. Eren BALCI
    www.aselsan.com.tr

Maybe you are looking for

  • Moving from Web Dynpro Java timesheet to Web Dynpro ABAP timesheet

    Hi We are in the process of moving from Web Dynpro Java ESS timesheet to Web Dynpro ABAP ESS timesheet.  When using Web Dynpro Java ESS timesheet it is possible to enter time using a daily or weekly view.  When using the Web Dynpro version and ensuri

  • InfoObjects used in Queries

    In BW 3.0B, is there an easy way to determine which InfoObjects are used in queries?  The ‘Where Used’ list for individual objects does not include queries.  I’m really looking for a way of determining which objects are actually used for reporting. T

  • Help with action script please

    hay guys, im having trouble with changing my action script to allow multiple layers of the same thing in order to show a greater sense of depth than the normal application. im using a flash toutorial on making a sort of matrix like falling text ( lin

  • EXIF Info issue with Teleconverters

    Hello everybody, I think I have a problem with EXIF in Aperture (version 3.4.3) on my MacBook Pro (OS 10.8.3). For photos taken with Canon lenses plus 1.4/2.0 Canon teleconverters both Camera Info and EXIF Info are displaing all the information corre

  • 3-column display (or, "I want my WideMail back")

    To me, the biggest short-coming of mail.app is the lack of a 3-column display option. I can't believe that Apple neglected to add this - especially in light of Exchange support (do they think anyone coming over from Entourage might be expecting a sta