Tree Control Double Click Functionality

Hi All,
I'm trying to get a tree control to operate a case structure, and I cannot seem to get the Double Click invoke node to output my tags from the tree.   Anyone know what I may be doing wrong?!
Thanks,
Derek
Solved!
Go to Solution.
Attachments:
TreeControl.vi ‏9 KB

Identical functionality as an event loop shown for an additional example
Jeff
Attachments:
TreeControl[1] rev 1.vi ‏9 KB

Similar Messages

  • Tree control double click default behavior

    Hi all,
    Tree control have default behavior that expand/ collapse item when double click event occurs on parent item.
    How do I to avoid this behavior to use custom double click event without open close nodes?
    Thanks,
    regards
    Solved!
    Go to Solution.

    Hi,
    I was not able to disable the default event however I realized a VI that could be useful for you.
    I've used a method to force all the tree items to be collapsed.
    Take a look at the attached image.
    Regards,
    Alex
    Attachments:
    treecontrol.png ‏15 KB

  • In Yosemite, Magic Mouse double-click function doesn't work

    On my iMac running Yosemite 10.10.2, the double-click function on the Magic Mouse no longer works. So to open a folder, or anything for that matter, I must always do click-control ---and that doesn't work for everything. For example, I can't double click on a character in Glyphs, so this renders Glyphs useless. And so on... I have gone into preferences to see if anything was amiss in the settings, but everything checked out fine. Is there a fix for this, or do I have to wait for the next upgrade for Yosemite? Help! Thanks... --Royce

    What's the answer to this mouse problem, please? Why does my double-click no longer work on my magic mouse since downloading Yosemite 10.10.2 to my iMac? 
    What's up Apple?
    Mark

  • Drag and hover double click function isn't working

    Hi people, I have been unable to click hold and drag items into folders and use the double click function when it hovers over.
    It just seems to have turned itself off. I have looked at settings and everything is as it usually is. Can't seem to get it working. Didn't occur with any particular software update just stopped working.
    Can anyone help get this working again?
    Cheers
    Olly

    Oliver_ Thompson wrote:
    Hi people, I have been unable to click hold and drag items into folders and use the double click function when it hovers over.
    It just seems to have turned itself off. I have looked at settings and everything is as it usually is. Can't seem to get it working. Didn't occur with any particular software update just stopped working.
    Can anyone help get this working again?
    Cheers
    Olly
    It might be a mouse issue.
    I suggest rebooting, and if that does not help, reset the PRAM
    http://support.apple.com/kb/HT1379

  • ADF:  double click functionality

    I am developing a Fusion Web Application in JDev 11gR1.
    I am trying to call a method in a managed bean if the user double clicks on a node in a tree or a row in a table. The only way I have found to do this is as follows:
    - add the following to the outputText of the tree or table:
    <af:clientListener type="dblClick" method="handleTreeDblClick" />
    <af:serverListener type="doubleClickOnNode" method="#{pageFlowScope.actionBean.treeDoubleClick}" />- add the following to the .jspx page:
    <trh:script>
      handleTreeDblClick = function(event) {
                             var source = event.getSource();
                             AdfCustomEvent.queue( source, "doubleClickOnNode", {}, false);
    </trh:script>This seems very convoluted. Isn't there a simpler way to do this?

    I had a similar problem - I wanted to expand a tree when clicking on its label (not only the + sign). I found some articles that also suggested using af:clientListener. It is not so unusual because dbClick is DOM event handled by javascript. If you want to skip javascript - use command buttons and links :)

  • ALV Grid Control Double click error

    Hi
    In my Editable ALV Grid Control I input the data ,then click save, the program display error msg if any errors , then i double click in any field ,after that I exit from the program , here i dont want this after double click also the control should be on the same field.Pleace help me out this issue.
    THX

    But what you will do with the error data. you tell me that.
    Don't update some error values to DB.
    if you don't want error then check this sample code.
    report  ztest_alv_edit.
    data: it_flight type standard table of sflight.
    data: it_fcat type lvc_t_fcat,
          wa_fcat type lvc_s_fcat.
    data: grid type ref to cl_gui_alv_grid,
          cont type ref to cl_gui_custom_container.
    class lcl_event_receiver definition deferred.
    data: g_handler type ref to lcl_event_receiver.
    *       CLASS lcl_event_receiver DEFINITION
    class lcl_event_receiver definition.
      public section.
        methods:
          handle_data_changed
             for event data_changed of cl_gui_alv_grid
                 importing er_data_changed.
    endclass.                    "lcl_event_receiver DEFINITION
    *       CLASS lcl_event_receiver IMPLEMENTATION
    class lcl_event_receiver implementation.
      method handle_data_changed.
       "this is important
       "this will stop poping the message
       clear er_data_changed->mt_protocol.
      endmethod.                    "handle_data_changed
    endclass.                    "lcl_event_receiver IMPLEMENTATION
    start-of-selection.
      select * from sflight
      into table it_flight
      up to 20 rows.
    end-of-selection.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    module status_0100 output.
      set pf-status 'STATUS'.
      if cont is initial.
        call function 'LVC_FIELDCATALOG_MERGE'
          exporting
            i_structure_name       = 'SFLIGHT'
          changing
            ct_fieldcat            = it_fcat
          exceptions
            inconsistent_interface = 1
            program_error          = 2.
        create object cont
          exporting
            container_name              = 'CONT'
          exceptions
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            others                      = 6
        if sy-subrc ne 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
        wa_fcat-edit = 'X'.
        wa_fcat-checktable = '!'.
        modify it_fcat from wa_fcat transporting edit checktable
        where fieldname = 'FLDATE'
        create object grid
          exporting
            i_parent          = cont
          exceptions
            error_cntl_create = 1
            error_cntl_init   = 2
            error_cntl_link   = 3
            error_dp_create   = 4
            others            = 5
        if sy-subrc ne 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
        call method grid->set_table_for_first_display(
           changing
             it_outtab                     = it_flight
             it_fieldcatalog               = it_fcat
           exceptions
             invalid_parameter_combination = 1
             program_error                 = 2
             too_many_lines                = 3
        if sy-subrc ne 0.
          message id sy-msgid type sy-msgty number sy-msgno
                     with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        endif.
        "Important for editable grid
         call method grid->register_edit_event
                   exporting
                      i_event_id = cl_gui_alv_grid=>mc_evt_enter.
         create object g_handler.
        "setting the handler
        set handler  g_handler->handle_data_changed for grid.
      endif.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    module user_command_0100 input.
      "important method to trigger the DATA_CHANGED event
      call method grid->check_changed_data.
      case sy-ucomm.
        when 'BACK'.
          leave to screen 0.
      endcase.
    endmodule.                 " USER_COMMAND_0100  INPUT

  • Double click functionality in Webdynpro ABAP ALV

    Hello!
    I have web dynpro application with ALV Table.
    I need to reproduce the standard R/3 functionality: after the double clicking on the table row the new window with content of that row's fields should appear in the form layout .
    For example, such functionality we have in the RSDMD transaction.
    So I have two questions:
    1. How to catch double click in the alv table of the  Web dynpro application;
    2. How to represent information from the alv table row in the form layout?
    Could you please help me?
    Thanks,
    Mariya

    Hi Maria,
    Say suppose I am displaying the information from SFLIGHT in an ALV format & when I click on any 1 row's CARRID I would like to fetch the corresponding BOOKING details for that particular combination of CARRID, CONNID & FLDATE then I can proceed as follows:
    1) Make the CARRID cell of your ALV to appear as an LinkToAction
    2) Create an event handler for the ON_CLICK event of the ALV & within this event handler fetch the information about the row's CARRID, CONNID & FLDATE. Call a popup window and display the corresponding information in this row.
    Below is the code to make your CARRID field as an LinkToAction:
    METHOD wddomodifyview .
      wd_this->build_alv( ).
    ENDMETHOD.
    METHOD build_alv .
      DATA:
        lr_alv_usage       TYPE REF TO if_wd_component_usage,
        lr_if_controller   TYPE REF TO iwci_salv_wd_table,
        lr_config          TYPE REF TO cl_salv_wd_config_table,
        lr_column_settings TYPE REF TO if_salv_wd_column_settings,
        lt_columns         TYPE        salv_wd_t_column_ref,
        lr_link            TYPE REF TO cl_salv_wd_uie_link_to_action,
        lr_checkbox        TYPE REF TO cl_salv_wd_uie_checkbox,
        lr_image           TYPE REF TO cl_salv_wd_uie_image.
      FIELD-SYMBOLS
        <fs_column> LIKE LINE OF lt_columns.
    * Instantiate the ALV Component
      lr_alv_usage = wd_this->wd_cpuse_alv( ).
      IF lr_alv_usage->has_active_component( ) IS INITIAL.
        lr_alv_usage->create_component( ).
      ENDIF.
    * Get reference to model
      lr_if_controller = wd_this->wd_cpifc_alv( ).
      lr_config        = lr_if_controller->get_model( ).
    * Set the UI elements.
      lr_column_settings ?= lr_config.
      lt_columns = lr_column_settings->get_columns( ).
      LOOP AT lt_columns ASSIGNING <fs_column>.
        if <fs_column>-id = 'CARRID'.
          CREATE OBJECT lr_link.
          lr_link->set_text_fieldname( <fs_column>-id ).
          <fs_column>-r_column->set_cell_editor( lr_link ).
        ENDif.
      ENDLOOP.
    ENDMETHOD.

  • SQ01 double click functionality

    Hi everybody!
    I have implemented an ABAP query using transactions SQ01/SQ02. Now I would like to enhance its functionality by providing a 'drilldown'capabilty.
    I. e. if the user double clicks on the field MATNR of my query, transaction MM03 should be started showing the details of the corresponding material.
    Is this possible? If it is, how do I do that?
    Regards,
    Joerg

    Hi
    While you're in the query (trx SQ01) go to: GO TO->Report Assignement
    Max

  • Magic Mouse: Double-click function

    I have "secondary-click"(right) activated on the "magic mouse" and it's great if I want to open a drop-down list on a page.
    However, on the "mighty-mouse" which I had before, the "right-click" was set up to act as a "double-click" which was very handy for opening documents and folders etc.
    Is there any way to set up the "magic-mouse" so that a "right-click" will act as a "double-click"?

    You could try a third-party driver like BetterTouchTool (http://blog.boastr.net/?page_id=1722)

  • Double Click Functionality - Help Please

    Hi,
    In ControlPanel >> Mouse Properties >> there is an option for increasing the double click speed.
    Similarly , i need to have a JSlider , getting User Input from the JSilder Object, thereby increasing the double click speed for my Swing Application.
    how to do this one in swing ???
    Help please....
    Thanks,
    Mani

    Windows tells java how fast the clicks were. To change this property in java gets very confusing, because you will need to time the interval between clicks since I don't think you can change this system setting from your program. It is far easier to just stay with the double click speed set by windows.

  • Double Click functionality

    Hi,
       I have a report where material is one of the output field.
    When user double clicks on material number it should call MM03 from the report and it should directly take to Accounting 2 view.
    How can it be done.
    Do let me know.
    Regards,
    SP

    Hi Sandeep,
    when you double click on the list.it triggers AT line-selection.   event.
    so when you double click you write your code in this event in the following manner to stop at MM03 at accounting 2 view
    AT LINE-SELECTION.
    case sy-lsind.
      when 1.
        ( First do the recording of MM03 and get the BDC data table populated with program name and screen number and fields required and also the OKCODE to be executed )
        (  Then call the tansaction using 
         CALL Transaction MM03 using <bdc_table_name> mode 'E'.
    mode E because you want the transaction to be stopped at accounting 2 view. )
    encase.
    Regards,
    Ravi

  • How to control double click seepd?

    hi,
    I downloaded JDK 1.6 for my software, but it seems that the mouse double click does not work properly. You have to double click it really fast or more tan twice for the double click to work. How can I increase the interval between the two mouse clicks?
    The platform is both Windows and Linux/Solaris, but the windows is more urgent.
    Thanks in advance,
    Sean

    Try this method.
    jButton1.setMultiClickThreshhold(long milliseconds);This will work only in action event, will not work in mouse event.

  • Turn off double click function in iOS 7

    I would like to know how to turn off the "double click" feature in iOS 7 that brings up all apps/websites you've been to.  I pre-ordered a Christmas gift for my son &amp; when he double clicked the button he scrolled right by it!  Good thing I noticed before him...but I am not a fan of this feature :)

    Great to hear that you find the iPad useful for online shopping
    There is no way to turn off the screenshot of the app's last state that appears above the app icon after double tapping the home button. If you are done with an app, you might consider closing it by swiping up on the screenshot that appears after double tapping the home button.
    You can leave Apple feedback at http://apple.com/feedback/ipad.html

  • I can't use the double-click function of my trackpad anymore...

    to mark ( and delete) a single word. It works in all the other programs - except WORD (2011, version 14.0.0). What can I do?

    Tools > Options > Content : JavaScript > Advanced > Allow Scripts to: [X] "Disable or replace context menus"

  • Double click in ALV tree output????

    Hi all,
    I am able to display output in tree format. But I want to add the double click functionality to some of the fields in output. Means if I double click on some value in output tree, it should call some transaction. Please help me with this issue of double clicking.
    Please tell how to handle events in this report tree display.
    For the following code its displaying output in tree format and in right way. But i need to add double click functionality to this.
    So provide me some sample program for this one....
    * create hierarchy
      CALL METHOD tree1->set_table_for_first_display
              EXPORTING
                   it_list_commentary   = lt_list_commentary
                   i_background_id      = 'ALV_BACKGROUND'
                   i_save               = 'A'
                   is_variant            = ls_variant
              CHANGING
                   it_sort              = gt_sort[]
                   it_outtab            = itab_outtab
                   it_fieldcatalog      = t_fieldcat. "gt_fieldcatalog.
    * expand first level
      CALL METHOD tree1->expand_tree
             EXPORTING
                 i_level = 1.
    * optimize column-width
      CALL METHOD tree1->column_optimize
               EXPORTING
                   i_start_column = tree1->c_hierarchy_column_name
                   i_end_column   = tree1->c_hierarchy_column_name.
    In grid ALV we can have double cilck functionality using code:
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program       = w_repid
                i_callback_pf_status_set = 'PF_STATUS'
                i_callback_user_command  = 'USER_COMMAND'
                is_layout                = ls_layout
                it_fieldcat              = gt_fc[]
    Here we can write subroutine for USER_COMMAND and handle the double click evenet. But tell me how to provide this in tree ALV.
    <REMOVED BY MODERATOR>
    Regards,
    Sachin
    Edited by: Alvaro Tejada Galindo on Feb 14, 2008 1:47 PM

    Hello Sachin
    The following sample report ZUS_SDN_ALV_TREE_DEMO demonstrates the crucial parts for double-click event handling (nodes & items) in ALV trees.
    *& Report  ZUS_SDN_ALV_TREE_DEMO
    *& Thread: double click in ALV tree output????
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="742412"></a>
    REPORT  zus_sdn_alv_tree_demo.
    CLASS cl_gui_column_tree DEFINITION LOAD.
    CLASS cl_gui_cfw DEFINITION LOAD.
    TYPE-POOLS: abap.
    TYPES: BEGIN OF ty_s_outtab.
    INCLUDE TYPE knvv AS data.
    TYPES: nkey       TYPE lvc_nkey.
    TYPES: parent_key TYPE lvc_nkey.
    TYPES: END OF ty_s_outtab.
    TYPES: ty_t_outtab    TYPE STANDARD TABLE OF ty_s_outtab
                          WITH DEFAULT KEY.
    DATA: gt_outtab    TYPE ty_t_outtab.
    DATA:
      gd_okcode        TYPE ui_func,
      gd_repid         TYPE syst-repid,
      gt_fcat          TYPE lvc_t_fcat,
      gs_layout        TYPE lvc_s_layo,
      gs_variant       TYPE disvariant,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_tree          TYPE REF TO cl_gui_alv_tree.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
        handle_node_double_click
          FOR EVENT node_double_click OF cl_gui_alv_tree
          IMPORTING node_key,
        handle_item_double_click
          FOR EVENT item_double_click OF cl_gui_alv_tree
          IMPORTING node_key
                    fieldname.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_node_double_click.
        message 'Event=Double-Click on Node' type 'I'.
        call transaction 'XD03'.
      ENDMETHOD.                    "handle_node_double_click
      METHOD handle_item_double_click.
        message 'Event=Double-Click on Item' type 'I'.
        call transaction 'VA03'.
      ENDMETHOD.                    "handle_item_double_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
      PERFORM init_controls.
      gd_repid = syst-repid.
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = gd_repid
          dynnr                       = '0100'
    *      container                   =
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          lifetime_dynpro_dynpro_link = 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.
      CALL SCREEN '0100'.
    ** NOTE: no elements on screen
    **  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'.
    *  SET TITLEBAR 'xxx'.
    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
             'EXIT'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
        WHEN 'REFRESH'.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      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 tree control
      CREATE OBJECT go_tree
        EXPORTING
            parent              = go_docking
            node_selection_mode = cl_gui_column_tree=>node_sel_mode_multiple
            item_selection      = 'X'  " required for double-click event on item
            no_html_header      = ''
            no_toolbar          = ''
        EXCEPTIONS
            cntl_error                   = 1
            cntl_system_error            = 2
            create_error                 = 3
            lifetime_error               = 4
            illegal_node_selection_mode  = 5
            failed                       = 6
            illegal_column_name          = 7.
      IF sy-subrc <> 0.
        MESSAGE x208(00) WITH 'ERROR'.                          "#EC NOTEXT
      ENDIF.
    * create Hierarchy-header
      DATA ls_hierarchy_header TYPE treev_hhdr.
      PERFORM build_hierarchy_header CHANGING ls_hierarchy_header.
      PERFORM build_fieldcatalog.
      PERFORM set_layout_and_variant.
    * create emty tree-control
      CALL METHOD go_tree->set_table_for_first_display
        EXPORTING
    **      i_structure_name     = 'KNVV'
          is_variant           = gs_variant
          i_save               = 'A'
    *      i_default            = 'X'
          is_hierarchy_header  = ls_hierarchy_header
    *      is_exception_field   =
    *      it_special_groups    =
    *      it_list_commentary   =
    *      i_logo               =
    *      i_background_id      =
    *      it_toolbar_excluding =
    *      it_except_qinfo      =
        CHANGING
          it_outtab            = gt_outtab
    *      it_filter            =
          it_fieldcatalog      = gt_fcat.
    * create hierarchy
      PERFORM create_hierarchy.
    * register events
      PERFORM register_events.
    * adjust column_width
      CALL METHOD go_tree->column_optimize.
    ENDFORM.                    " init_controls
    *&      Form  build_hierarchy_header
    *       build hierarchy-header-information
    *      -->P_L_HIERARCHY_HEADER  strucxture for hierarchy-header
    FORM build_hierarchy_header CHANGING
                                   p_hierarchy_header TYPE treev_hhdr.
      p_hierarchy_header-heading = 'Hierarchy Header'.          "#EC NOTEXT
      p_hierarchy_header-tooltip =
                             'This is the Hierarchy Header !'.  "#EC NOTEXT
      p_hierarchy_header-width = 30.
      p_hierarchy_header-width_pix = ''.
    ENDFORM.                               " build_hierarchy_header
    *&      Form  BUILD_FIELDCATALOG
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_fieldcatalog .
      REFRESH: gt_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_BUFFER_ACTIVE              =
          i_structure_name             = 'KNVV'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
    *     I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_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.
      DELETE gt_fcat FROM 8.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  SET_LAYOUT_AND_VARIANT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM set_layout_and_variant .
      CLEAR: gs_layout,
             gs_variant.
      gs_variant-report = syst-repid.
      gs_variant-handle = 'TREE'.
    ENDFORM.                    " SET_LAYOUT_AND_VARIANT
    *&      Form  create_hierarchy
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM create_hierarchy .
      DATA: ls_knvv    TYPE sflight,
            ls_outtab  TYPE ty_s_outtab,
            lt_outtab  TYPE ty_t_outtab.
    * get data
      SELECT * FROM knvv INTO CORRESPONDING FIELDS OF TABLE lt_outtab
                            UP TO 200 ROWS .                "#EC CI_NOWHERE
      SORT lt_outtab BY kunnr vkorg.
    * add data to tree
      DATA: ld_kunnr_key TYPE lvc_nkey,
            ld_vkorg_key TYPE lvc_nkey,
            ld_last_key  TYPE lvc_nkey.
      LOOP AT lt_outtab INTO ls_outtab.
        ON CHANGE OF ls_outtab-kunnr.
          PERFORM add_customer_line USING    ls_outtab-data
                                  CHANGING ld_kunnr_key.
        ENDON.
        ON CHANGE OF ls_outtab-vkorg.
          PERFORM add_salesorg_line USING    ls_outtab-data
                                             ld_kunnr_key
                                  CHANGING ld_vkorg_key.
        ENDON.
        PERFORM add_complete_line USING  ls_outtab-data
                                         ld_vkorg_key
                                CHANGING ld_last_key.
      ENDLOOP.
    * calculate totals
      CALL METHOD go_tree->update_calculations.
    * this method must be called to send the data to the frontend
      CALL METHOD go_tree->frontend_update.
    ENDFORM.                    " create_hierarchy
    *&      Form  add_customer_line
    *       add hierarchy-level 1 to tree
    *      -->P_LS_SFLIGHT  sflight
    *      -->P_RELEATKEY   relatkey
    *     <-->p_node_key    new node-key
    FORM add_customer_line USING     us_data TYPE ty_s_outtab-data
                                     ud_relat_key TYPE lvc_nkey
                         CHANGING  cd_node_key TYPE lvc_nkey.
      DATA: l_node_text TYPE lvc_value,
            ls_data TYPE ty_s_outtab-data.
    * set item-layout
      DATA: lt_item_layout TYPE lvc_t_layi,
            ls_item_layout TYPE lvc_s_layi.
      ls_item_layout-t_image = '@A0@'.  " icon_customer.
      ls_item_layout-fieldname = go_tree->c_hierarchy_column_name.
      ls_item_layout-style   =
                            cl_gui_column_tree=>style_intensifd_critical.
      APPEND ls_item_layout TO lt_item_layout.
    * add node
      l_node_text =  us_data-kunnr.
      DATA: ls_node TYPE lvc_s_layn.
      ls_node-n_image   = space.
      ls_node-exp_image = space.
      CALL METHOD go_tree->add_node
        EXPORTING
          i_relat_node_key = ud_relat_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = l_node_text
          is_outtab_line   = ls_data
          is_node_layout   = ls_node
          it_item_layout   = lt_item_layout
        IMPORTING
          e_new_node_key   = cd_node_key.
    ENDFORM.                               " add_customer_line
    *&      Form  add_salesorg_line
    *       add hierarchy-level 1 to tree
    *      -->P_LS_SFLIGHT  sflight
    *      -->P_RELEATKEY   relatkey
    *     <-->p_node_key    new node-key
    FORM add_salesorg_line USING     us_data TYPE ty_s_outtab-data
                                     ud_relat_key TYPE lvc_nkey
                         CHANGING  cd_node_key TYPE lvc_nkey.
      DATA: l_node_text TYPE lvc_value,
            ls_data TYPE ty_s_outtab-data.
    * set item-layout
      DATA: lt_item_layout TYPE lvc_t_layi,
            ls_item_layout TYPE lvc_s_layi.
      ls_item_layout-t_image = '@DS@'.  " ICON_PARTNER_SALES_ACTIVITY
      ls_item_layout-fieldname = go_tree->c_hierarchy_column_name.
      ls_item_layout-style   =
                            cl_gui_column_tree=>style_intensifd_critical.
      APPEND ls_item_layout TO lt_item_layout.
    * add node
      l_node_text =  us_data-vkorg.
      DATA: ls_node TYPE lvc_s_layn.
      ls_node-n_image   = space.
      ls_node-exp_image = space.
      CALL METHOD go_tree->add_node
        EXPORTING
          i_relat_node_key = ud_relat_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = l_node_text
          is_outtab_line   = ls_data
          is_node_layout   = ls_node
          it_item_layout   = lt_item_layout
        IMPORTING
          e_new_node_key   = cd_node_key.
    ENDFORM.                               " add_salesorg_line
    *&      Form  add_cmplete_line
    *       add hierarchy-level 3 to tree
    *      -->P_LS_SFLIGHT  sflight
    *      -->P_RELEATKEY   relatkey
    *     <-->p_node_key    new node-key
    FORM add_complete_line USING     us_data TYPE ty_s_outtab-data
                                     ud_relat_key TYPE lvc_nkey
                         CHANGING  cd_node_key TYPE lvc_nkey.
      DATA: l_node_text TYPE lvc_value.
    * set item-layout
      DATA: lt_item_layout TYPE lvc_t_layi,
            ls_item_layout TYPE lvc_s_layi.
      ls_item_layout-fieldname = go_tree->c_hierarchy_column_name.
      ls_item_layout-class   = cl_gui_column_tree=>item_class_checkbox.
    **  ls_item_layout-editable = 'X'.
      APPEND ls_item_layout TO lt_item_layout.
    **  CLEAR ls_item_layout.
    **  ls_item_layout-fieldname = 'PLANETYPE'.
    **  ls_item_layout-alignment = cl_gui_column_tree=>align_right.
    **  APPEND ls_item_layout TO lt_item_layout.
      l_node_text =  us_data-vtweg.
      DATA: ls_node TYPE lvc_s_layn.
      ls_node-n_image   = space.
      ls_node-exp_image = space.
      CALL METHOD go_tree->add_node
        EXPORTING
          i_relat_node_key = ud_relat_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          is_outtab_line   = us_data
          i_node_text      = l_node_text
          is_node_layout   = ls_node
          it_item_layout   = lt_item_layout
        IMPORTING
          e_new_node_key   = cd_node_key.
    ENDFORM.                               " add_complete_line
    *&      Form  register_events
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM register_events.
    * define the events which will be passed to the backend
      DATA: lt_events TYPE cntl_simple_events,
            l_event TYPE cntl_simple_event.
    * define the events which will be passed to the backend
      l_event-eventid = cl_gui_column_tree=>eventid_expand_no_children.
      APPEND l_event TO lt_events.
    **  l_event-eventid = cl_gui_column_tree=>eventid_checkbox_change.
    **  APPEND l_event TO lt_events.
    **  l_event-eventid = cl_gui_column_tree=>eventid_header_context_men_req.
    **  APPEND l_event TO lt_events.
    **  l_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
    **  APPEND l_event TO lt_events.
    **  l_event-eventid = cl_gui_column_tree=>eventid_item_context_menu_req.
    **  APPEND l_event TO lt_events.
    **  l_event-eventid = cl_gui_column_tree=>eventid_header_click.
    **  APPEND l_event TO lt_events.
    **  l_event-eventid = cl_gui_column_tree=>eventid_item_keypress.
    **  APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_node_double_click.
      APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_item_double_click.
      APPEND l_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 x208(00) WITH 'ERROR'.                          "#EC NOTEXT
      ENDIF.
    * set Handler
      set handler:
        lcl_eventhandler=>handle_node_double_click for go_tree,
        lcl_eventhandler=>handle_item_double_click for go_tree.
    **  DATA: l_event_receiver TYPE REF TO lcl_tree_event_receiver.
    **  CREATE OBJECT l_event_receiver.
    **  SET HANDLER l_event_receiver->handle_node_ctmenu_request
    **                                                        FOR tree1.
    **  SET HANDLER l_event_receiver->handle_node_ctmenu_selected
    **                                                        FOR tree1.
    **  SET HANDLER l_event_receiver->handle_item_ctmenu_request
    **                                                        FOR tree1.
    **  SET HANDLER l_event_receiver->handle_item_ctmenu_selected
    **                                                        FOR tree1.
    **  SET HANDLER l_event_receiver->handle_checkbox_change FOR tree1.
    ENDFORM.                               " register_events
    Regards
      Uwe

Maybe you are looking for

  • Portlets don't refresh sometimes...

    Hi, When I first deployed a new WSRP portlet, it worked. However, when I redeployed it and went to view it on the portal page, it wouldn't refresh. I put that aside to work on something else (it's been almost a week since then), and today, magically,

  • Why won't Adobe X search for hyphens?

    I'm using Adobe X with Windows 7 to proof fiction for a publishing firm.  I would like to be able to search for words at the end of the lines where there is a word break but Adobe X will not let me search for those. For example, I found in the text I

  • Why valueChaged( ) method called twice

    Dear All, I have made a class MyList by extending JList and implements ListSelectionListener and override valueChanged method. When we clicked on the list item this method called twice. Can you please explain the region? I write my code like that: Pu

  • Dreamweaver crashing constantly (Mac OSX)

    Hi Guys, Im having some serious problems with my Dreamweaver CS5 crashing, I have tried reinstalling it, deleting caches, deleting configuation folder but I am still getting the same symptoms. I am running a Mac OSX, (Snow Leopard I think) 10.6.4, I

  • Starting workflow, when importing records

    Hello! Is it possible to start workflow, when records were imported with Import Manager and the import action was set as Update or Replace? Thanks, Vika