Dynamic tree with checkboxes

hello!
i have seen the same topic here, but i can't find it again!
can anybody help me?

no, i mean a "real" tree..
or is there a possibility to show the data with spaces in front, like
aaaa
bbbb
ccccc
dddd

Similar Messages

  • How to make a prog. Tree with Checkbox in JSF?

    I am facing prob. to how to dev. prog. which contain Tree with Checkbox .
    I want to use checkbox because whatever comes under any directory in Tree is selected if I select perticular folder from Tree?
    Can you guide me guys ?
    Ur help is needed to me.
    Thanks,
    Harshal Joshi

    I have worked whith JSF-s CheckBox components , It has a problem, when I used it with tables and Trees, so I think this components needs to develop.
    enyone has other ideas about it, and knows how to do it?

  • Adf Tree with checkboxes beside..

    Hi All....
    I have a requirement to make an application in adf (in j dev) where in i want a tree structure, beside each node in my tree,there should be 6 coloumns with checkboxes(the checked or unchecked values should get reflected in a DB table).Is it possible?and if yes,can u tell me any tutorial or a direction,as to how to proceed?
    I could make a tree structure,but that doesnt serve my need.:(
    Please help....
    Waiting for your posts...
    Thank you!!!!:)

    Check out SRDemo, there is an example of something similar there.

  • Tree with checkbox for each level

    1. I have a tree an I want to add a check box to every node. I saw this fonctionality with Java and with a lot of programs (install with choises). I don't know if this is possible with FORMS. If not how knows a solution for this problem ?
    2. My tree is based to a SELECT and I want to add a parent for my tree
    and I don't know how to do it. The problem is this : the value for each node from the first level IS NULL.
    Thanks
    Bye

    I need this functionality because I have to select data's from a tree with 3 or 4 levels (like in the install software when we select to install only what we need).
    There is a lot of information and it's difficult to display all of it in the screen.

  • Using dynamic captions with checkboxes

    Hello.
    I want to create a list of checkboxes, according to a table I get from the context, meaning there would be as much checkboxes as the lines in the table, and their caption would be one of the table's fields.
    I turned on Show Dynamic Properties.
    First I tried it with one checkbox, with it's caption related directly to the table's field, and it worked - but with only one checkbox displaying the first line's value, of course.
    Next I put the checkbox in a subform. The subform is related to the table line, and is repeated for every row, and now the caption is only bound to the field's name, relatively.
    So the subform is repeated, but the caption doesn't change at all.
    How can it be done?
    And can I set the checkbox's caption by code? I tried, but it didn't work.
    Best regards,
    Udi.

    Hi,
    try using table control (supported in ALC 8.0) and add the checkboxe in the row.
    You can then map your data node (structure) with the table.
    Ashutosh

  • Flex tree with checkbox

    I'm using a tree to show a filesystem structure.
    I have to let users select which "folders" select and which not inisde the tree.
    I was thinking to add checkboxes to the tree labels. Is it possible?

    something like this?
    http://www.sephiroth.it/test/flex/3/treecheckbox/index.html
    source:
    http://www.sephiroth.it/file_detail.php?id=151#

  • Columns selection on a dynamic ALV (With Checkbox)

    Hello all,
    I have an ALV which display one column per day chosen by the user like that:
    EMPLOYEE u2013   DAY01  u2013  DAY02   u2013 DAY03 u2026
    Pernr/Name u2013 AUFNR1 u2013 AUFNR2 u2013 AUFNR3 u2026
    Pernr/Name u2013 AUFNR1 u2013 AUFNR2 u2013 AUFNR3 u2026
    Pernr/Name u2013 AUFNR1 u2013 AUFNR2 u2013 AUFNR3 u2026
    My need is to allow the user to select several employees (lines) and several days (DAY1 and DAY3) or one period (DAY1 to DAY3).
    After the selection, the user clicks on an ALV button to change the AUFNR data for all employees and days selected.
    I'm trying to add a second u2018header lineu2019 or a first line with check box (only for u2018DAYu2019 columns) but I didnu2019t find the solution.
    Could you help me?
    If needed I can post my code sample.
    Thanks in advance.
    David
    Edited by: David.pac on Dec 12, 2011 3:13 PM

    Thanks for Your help.
    The date is in fact a CHAR display (not really a date) so that is not the error.
    For your information when i select a row in the list (format char YYYYMMDD_HHMM) it seems that Apex do not catch my select in the Session state.
    I've change the item name with P2_DATE_FLOW but the problem remain.
    This is the debug log if can help
    0.03: Application 114, Authentication: CUSTOM2, Page Template: 3644802034190382
    0.06: ...Session ID 1868105032215374 can be used
    0.06: ...Application session: 1868105032215374, user=Neop
    0.06: ...Determine if user "Neop" workspace "2859608277950243" can develop application "114" in workspace "2859608277950243"
    0.06: Session: Fetch session header information
    0.06: ...Metadata: Fetch page attributes for application 114, page 3
    0.06: Fetch session state from database
    0.06: Branch point: BEFORE_HEADER
    0.06: Fetch application meta data
    0.08: Computation point: BEFORE_HEADER
    0.08: Processing point: BEFORE_HEADER
    0.08: Show page template header
    0.08: Computation point: AFTER_HEADER
    0.08: Processing point: AFTER_HEADER
    0.08: Computation point: BEFORE_BOX_BODY
    0.08: Processing point: BEFORE_BOX_BODY
    0.08: Region: Report 1
    Report 1
    0.08: show report
    0.09: determine column headings
    0.09: parse query as: CFM_MDRE
    0.12: binding: ":P2_DATE_FLOW"="P2_DATE_FLOW" value="0"
    0.14: print column headings
    0.14: rows loop: 15 row(s)
    No data found.

  • Dynamic JTree with checkbox

    could anyone tell me how to display the c: drive in Jtree view and add check box for particular folder files

    You might want to take a look here and here as a starting point.

  • CheckBox node tree with two diferent kind of nodes

    Hai ,
    I need to build a check box tree with two different kind of nodes , Child and Parent nodes .
    CheckBox node tree with two diferent kind of nodes.
    HOw will i write the renderer and editor for this ?

    Study the method getTreeCellRendererComponent() of the class DefaultTreeCellRenderer.

  • ALV Tree with editable checkbox

    Hi all,
    I have a ALV Tree with editable checkbox (for all the parent & leaf  nodes) , as one of the column.On clicking of a button in toolbar , i should get the nodes which are checked in checkbox.
    But the problem is i am not able to get the nodes which are checked through checkbox in the PAI of the screen,when the button is clicked.
    I tried using    
    CALL METHOD wf_tree->get_checked_items             
                           IMPORTING
                           et_checked_items = lint_selected_node.
    but the return table is not containing any entries , even if check boxes are checked in ALV tree.I tried the GET_CHECKED_ITEMS method in event handler method of AFTER_USER_COMMAND and also CHECKBOX_CHANGE , but no success.
    lfs_item_layout-fieldname = 'CHECK'.
      lfs_item_layout-class = cl_gui_column_tree=>item_class_checkbox.
      lfs_item_layout-editable = 'X'.
      lfs_item_layout-CHOSEN = 'X'.
      APPEND lfs_item_layout TO lint_item_layout.
    CALL METHOD wf_tree->add_node
        EXPORTING
          i_relat_node_key = p_lfs_final_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = l_node_text
          is_outtab_line   = p_gfs_final
          is_node_layout   = lfs_node
          it_item_layout   = lint_item_layout
        IMPORTING
          e_new_node_key   = p_loc_qmnum_key.
    Friends ,if you can suggest something.
    Thanks
    Abhijeet

    hi ,
    i have written below code for registering the CHECKBOX_CHANGE event of CL_GUI_ALV_TREE.
    APPEND lfs_event TO lint_events.
        lfs_event-eventid = cl_gui_column_tree=>eventid_CHECKBOX_CHANGE.
      APPEND lfs_event TO lint_events.
      CALL METHOD wf_tree->set_registered_events
        EXPORTING
          events                    = lint_events
        EXCEPTIONS
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
      IF sy-subrc EQ 0.
    *    MESSAGE X208(00) WITH 'ERROR'.                          "#EC NOTEXT
      ENDIF.
          SET HANDLER lo_event_receiver->handle_checkbox_change FOR wf_tree.
    *      SET HANDLER lo_event_receiver->handle_button_click FOR wf_tree.
        ENDIF.
    Also according to below code , i have put a break point in the event handler method of CHECKBOX_CHANGE event , so that control shall come here when check box is checked on ALV tree ...
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
    *      handle_checkbox_change FOR EVENT checkbox_change OF cl_gui_alv_tree,
    *              importing fcode.
    *      handle_button_click FOR EVENT AFTER_USER_COMMAND OF cl_gui_alv_tree
    *        IMPORTING ucomm,
          handle_CHECKBOX_CHANGE for event checkbox_change of cl_gui_alv_tree
            importing CHECKED
                      FIELDNAME
                      NODE_KEY.
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    *       CLASS lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_checkbox_change.
        data : lint_selected_node TYPE LVC_T_CHIT.
        BREAK abhijeetg.
    *   CHECKED
    *   FIELDNAME
    *   NODE_KEY
    *    case fcode.
    *      when 'SELALL'.
    *        perform select_all.
    *    CALL METHOD WF_TREE->GET_OUTTAB_LINE
    *      EXPORTING
    *        I_NODE_KEY     =
    **      IMPORTING
    **        e_outtab_line  =
    **        e_node_text    =
    **        et_item_layout =
    **        es_node_layout =
    **      EXCEPTIONS
    **        node_not_found = 1
    **        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.
    *    call method cl_gui_cfw=>dispatch.
        CALL METHOD wf_tree->get_checked_items
          IMPORTING
            et_checked_items = lint_selected_node.
        break abhijeetg.
      ENDMETHOD.         
    ENDCLASS.
    So according to you , I should get the control in the break point , but its not happening with this .. any thing missing ???
    Edited by: abhijeet_7013 on Jun 21, 2011 10:31 PM

  • Dynamic Page with Multiple Checkboxes

    I am trying to get a dynamic page to pass the checked value of multiple checkboxes to the submit proceedure. Can anyone tell me what I am doing wrong?
    Thanks in advance,
    Pam -------------------------------------------------------------------------
    Dynamic Page:
    <HTML>
    <FORM action="scott.brsubmit" method="POST">
    <TABLE border CELLPADDING=0 CELLSPACING=0>
    <ORACLE>begin
    for c1 in (SELECT rowid,ename, job, bonus from scott.bonus_approval where approved is null)
    loop
    htp.p('<tr><td><FONT FACE= ARIAL SIZE=1>');
    htp.p(c1.ename);
    htp.p('</TD><td><FONT FACE= ARIAL SIZE=1>');
    htp.p(c1.job);
    htp.p('</TD><td><FONT FACE= ARIAL SIZE=1>');
    htp.p(c1.bonus);
    htp.p('</TD><td><FONT FACE= ARIAL SIZE=1><B>');
    htp.p('<input type="hidden" name="p_ename" value='||c1.ename||'>');
    htp.p('<input type="checkbox" name="p_cb" value="Y">');
    htp.p('</TD><td><FONT FACE= ARIAL SIZE=1><B>');
    htp.p('<input type="checkbox" name="p_cb2" value="N">');
    htp.p('</td></tr>');
    htp.p('<br>');
    htp.p('
    end loop;
    HTP.P('</table>');
    htp.p('<p>');
    htp.p('<input type=submit value="Save" name="p_action" >');
    end;
    </ORACLE>
    </form>
    </BODY>
    </HTML>
    Procedure:
    (p_ename in portal.wwv_utl_api_types.vc_arr, p_cb in portal.wwv_utl_api_types.vc_arr, p_cb2 in portal.wwv_utl_api_types.vc_arr, p_action varchar2)
    as
    begin
    if p_action = 'Save' then
    for i in 1..p_ename.count loop
    if (p_cb(i) = 'Y') then
    update scott.bonus_approval set approved = p_cb(i) where ename = p_ename(i);
    COMMIT;
    else
    if (p_cb2(i) = 'N') then
    update scott.bonus_approval set approved = p_cb2(i) where ename = p_ename(i);
    COMMIT;
    END IF;
    end if;
    end loop;
    end if;
    htp.print('<script language="JavaScript">');
    htp.print('function display() {
    var msg = "\nRecord Saved Successfully\n";
    alert(msg)');          
    htp.print('}');
    htp.print('display()');
    htp.print('</script>');
    exception
    when others then
    htp.print('<script language="JavaScript">');
    htp.print('function display2() {
    var msg = "\nRecord Not Saved.\n";
    alert(msg)');          
    htp.print('}');
    htp.print('display2()');
    htp.p('Not saved');
    htp.print('</script>');
    end;

    Hi.
    I have a dynamic page, with a bind variable :v_day. On the customization screen the user can select one or more days of the week, or all days. I use this also in a report and then it works ok. In the where clause i use:
    and rtrim((to_char(date_time,'DAY'))) IN :v_day
    Date_time is a tablecolumn (date).
    When i add this line in the select script from the dynamic page, i get error:
    : ORA-06550: line 1, column 2443:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    The symbol "(" was substituted for "" to continue.
    ORA-06550: line 1, column 2606:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    . ( ) , * @ % & - + / at mod rem <an exponent (**)> and or ||
    The symbol ")" was substituted for ";" to continue.
    ORA-06550: line 1, column 3236:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    The symbol (WWV-11230)
    Critical Error in wwerr_api_error.get_errors! SQL Error Message: ORA-06502: PL/SQL: numeric or value error: character string buffer too small (WWV-)
    Thanks.

  • Christmas Tree Table with checkboxes

    I am using the JTable (CTTable, CTTableCellRenderer, and VisibleTableModelEvent) found at http://java.sun.com/products/jfc/tsc/articles/ChristmasTree/.
    The problem that I am having is that I inserted a column with checkboxes. In that column, it shows the text value (true/false) instead of the checkbox. When I click on a cell in the column, it shows the checkbox while the mouse button is depressed. After clicking on the cell, the checkbox disappears and the value changes (example: if it was false before clicking, it becomes true after clicking).
    Also, I have tried using my table with the standard JTable class and the checkboxes work correctly.

    Thanks Frank.
    You are correct I am setting the Bind variable via client method dropped as default activity in TF.
    I tried to utilize ensureVariableManager method in VOImpl and setting the Variable Value but when I try accessing the value of bind variable via get<BindVariableName>
    I end up in stackOverFlow error.
    Then I tried to override execute query by putting this lines before super.executeQuery();
    ensureVariableManager().setVariableValue("BindVariableName", value);
    but I guess this is not setting the Bind Variable too..
    What am I doing wrong ?
    Amit

  • Dynamic Treeview(MyComputer) with checkbox

    could anyone tell me display the Filesystem in treeview with checkbox using Flex. i want to display the Filesystem(c:) in treeview and add checkbox
    for all files and directory is it possible, pls help me

    Actually, P1_region is one item
    But this item comes from a select query which returns more than one result
    So I have 1 item and numerous chekboxes that i can check
    I don't understand what type is your regions_selected item.
    I really think that your post is of help because I saw in the session that p1_region take a value like this: region1:region2:region3 if i select 3 regions
    My problem is now to make it become : 'region1','region2','region3'
    thx
    Jonathan

  • Problem with Checkbox and Listbox

    Hi,
    I have a jsp page named auth_Roles.jsp which has an empty Listbox and a hyperlink,on clicking the hyperlink a popup window opens up,which is a jsp page named roleSelect.jsp.In that jsp page there is a textBox and two buttons named "Search" and "Cancel".By typing something in the checkbox when you press Search button Some checkboxes get generated dynamically matching with the Search criteria in the Textbox.These textboxes are generated in a nother JSP named findRoles.jsp.this findRoles.jsp also contains two buttons of type="submit"
    Which are Save and Cancel buttons.
    Now what i need to do is when i check some of the checkboxes that are generated in findRoles.jsp and click on Save.After that the values that are checked should be there in the listbox of the first JSP page that is auth_Roles.jsp.
    Thing is that the whole thing is working but after selecting and saving some checkBox values in the first attempt(i.e when the checked values are reflecting in the ListBox of auth_Roles.jsp) if you try to select something again using the hyperlink in auth_Roles.jsp(Using the sequence of actions i have allready mentioned) the newly checked values are occupying the ListBox in auth_Roles.jsp excluding the values i have allready selected in the first attempt(i.e values selected in the latest attempts are only getting reflected and the previous values are lost from the ListBox).
    I want to retain the previously selected values,can anyone provide any code or any suggestion,am very new in java.

    Sorry,in the roleselect.jsp page i have to type a string as a search criteria in the textBox not a CheckBox.
    Apologise for the error in information.

  • Dynamic tree UI element in the view

    Dear All,
         Can anyone provide me with the code snippet for Dynamic Tree UI element in the view. I need to show the tree which should be generated dynamically.
    Thanks alot in advance!
    Points will be rewarded, Please its urgent!
    Cheers,
    Darshna.

    Hi ,
    sorry for the late reply... here is the code for onActionLoadchildren .. i am sure you wont understand this.. but lets try...
    DATA:
        element_parent  TYPE REF TO if_wd_context_element,
        lv_object_key1   type string,
        lv_object_type  type string.
    DATA:
           node_root_entry                     TYPE REF TO if_wd_context_node,
           elem_root_entry                     TYPE REF TO if_wd_context_element,
           stru_root_entry                     TYPE if_structure_view_new=>element_root_entry ,
           item_valid_from                     LIKE stru_root_entry-valid_from,
           item_plant                          LIKE stru_root_entry-plant,
           item_equi_key                       LIKE stru_root_entry-equi_key,
           item_object_key                     LIKE stru_root_entry-object_key,
           item_object_type                    TYPE string,
           item_path                           TYPE string,
           item_parent_path                    TYPE string,
          context_node                        TYPE REF TO if_wd_context_node,
           root_entry                          TYPE if_structure_view_new=>element_selected_entry.
          l_ref_componentcontroller           TYPE REF TO ig_componentcontroller.
    DATA:
         node_root_info                    TYPE REF TO if_wd_context_node,
         elem_root_info                    TYPE REF TO if_wd_context_element,
          stru_root_info                    TYPE if_structure_view_new=>element_root_info .
    DATA:
          element                            TYPE REF TO if_wd_context_element,
          node_selected_entry                TYPE REF TO if_wd_context_node,
          elem_selected_entry                TYPE REF TO if_wd_context_element.
    DATA:
          ls_hier_return      TYPE rplm_ts_struc_elements,
          lt_hier_return      TYPE TABLE OF rplm_ts_struc_elements,
          ls_hier_return_temp TYPE rplm_ts_struc_elements,
          lt_hier_return_temp TYPE TABLE OF rplm_ts_struc_elements,
          ls_hier_level       TYPE rplm_ts_hier_level,
          lt_hier_level       TYPE TABLE OF rplm_ts_hier_level,
          ls_hier_return_sort TYPE rplm_mt_ts_hier,
          lt_hier_return_sort TYPE TABLE OF rplm_mt_ts_hier.
      DATA:
           temp_hier_level TYPE if_structure_view_new=>element_hier_level,
           lt_hier_temp    TYPE TABLE OF if_structure_view_new=>element_hier_level,
           lt_temp         TYPE TABLE OF if_structure_view_new=>element_hier_level.
      DATA:
           lc_path       TYPE string,
           lv_object_key TYPE string.
      DATA:
           lv_hier_lines TYPE i.
      DATA:
          node_entries                        TYPE REF TO if_wd_context_node,
           node_sub_entries                    TYPE REF TO if_wd_context_node,
          elem_sub_entries                    TYPE REF TO if_wd_context_element,
           stru_sub_entries                    TYPE if_structure_view_new=>element_sub_entries .
      TYPES: BEGIN OF ls_hier_type,             "structure for Hierarchy table
          object(31)      TYPE c,         "Objectkey
          predecessor(31) TYPE c,         "Objectkey Predecessor
          data(2000)      TYPE c,         "Data container
          level           TYPE i,         "level of object in tree
          successors(1)   TYPE c,         "Object has successors: YES/NO/U
          display(1)      TYPE c,         "Object is displayed: YES/NO
          selected(1)     TYPE c,         "Object is selected/marked: YES/NO
          index_predec    LIKE sy-tabix,  "Index predecessor
          strno           TYPE ilom_strno,"External number for func. loc.
                                         "in BOMs used for top object
       END OF ls_hier_type.
      DATA:
           ls_hier     TYPE ls_hier_type,
           lt_hier     TYPE TABLE OF ls_hier_type WITH DEFAULT KEY,
           lt_mat_hier TYPE TABLE OF ls_hier_type WITH DEFAULT KEY.
      " For retrieving Material Data Heirarchy
      DATA:
           lh_stpo_tab     TYPE TABLE OF rihstpx ,
           lwa_stpo_tab    LIKE LINE OF lh_stpo_tab,
           check_menge     TYPE string ,
           check_meins     TYPE string ,
           lwa_mat_hier    LIKE LINE OF  lt_mat_hier ,
           lt_dup_mat_hier LIKE lt_mat_hier,
           lv_len          TYPE i,
           lv_len_temp     TYPE i .
      DATA:
           lv_equnr TYPE equi-equnr,
           lv_tplnr TYPE iflo-tplnr,
           lv_matnr TYPE mast-matnr.
      DATA:
           lv_cnt   TYPE i,
           lv_index TYPE i.
      DATA:
           lv_path        TYPE string,
           lv_parent_path TYPE string,
           pos            TYPE string,
           separator      TYPE c VALUE '.',
           max_level      TYPE i,
           temp_level     TYPE i,
           counter        TYPE i VALUE 1.
      TYPES: BEGIN OF ls_pred_type,             "structure for Hierarchy table
         parent(31)      TYPE c,         "Objectkey Predecessor
         path(2000)      TYPE c,         "Data container
         index_predec    LIKE sy-tabix,  "Index predecessor
      END OF ls_pred_type.
    DATA:
          ls_pred TYPE ls_pred_type,
          lt_pred TYPE TABLE OF ls_pred_type WITH DEFAULT KEY.
    DATA:
          lv_int_obj_key TYPE string,
          obj_len        TYPE i,
          lv_funcloc_ext TYPE ilom_strno,
          lv_funcloc     TYPE itob-tplnr.
    DATA:
          lv_level        TYPE i,
          lv_temp         TYPE i,
          lt_path_entries TYPE string_table.
    DATA:
          node_general                        TYPE REF TO if_wd_context_node,
          elem_general                        TYPE REF TO if_wd_context_element,
          stru_general                        TYPE if_structure_view_new=>element_general ,
          item_collapse_visibility            LIKE stru_general-collapse_visibility.
    DATA:
          elem_context                        TYPE REF TO if_wd_context_element,
          stru_context                        TYPE if_structure_view_new=>element_context ,
          item_expand_all                     LIKE stru_context-expand_all.
    lv_path = path.
    Get Element whose children shall be loaded
      element_parent = wd_context->path_get_element( lv_path ).
    element_parent->get_attribute(
          EXPORTING
            name =  `OBJECT_KEY`
          IMPORTING
            value = LV_object_key ).
    element_parent->get_attribute(
          EXPORTING
            name =  `OBJECT_TYPE`
          IMPORTING
            value = lv_object_type ).
    node_root_entry = wd_context->get_child_node( name = wd_this->wdctx_root_entry ).
    get element via lead selection
      elem_root_entry = node_root_entry->get_element(  ).
    get single attribute
      elem_root_entry->get_attribute(
        EXPORTING
          name =  `VALID_FROM`
        IMPORTING
          value = item_valid_from ).
      elem_root_entry->get_attribute(
          EXPORTING
            name =  `PLANT`
          IMPORTING
            value = item_plant ).
    item_object_type = lv_object_type.
    if lv_object_type eq 'EQUI'.
      item_object_key = ''.
      item_equi_key = lv_object_key.
    elseif lv_object_type eq 'FUNCLOC'.
      item_object_key = lv_object_key.
      item_equi_key = ''.
    ELSE.
      lv_matnr = lv_object_key.
    For BOM, material and Assembly
    endif.
      IF item_object_type EQ 'EQUI'.
        lv_equnr = lv_object_key.
      ELSEif item_object_type eq 'FUNCLOC'.
        lv_tplnr = lv_object_key.
      ELSE.
        LV_MATNR = lv_object_key.
        exit.
      ENDIF.
      CALL FUNCTION 'PM_HIERARCHY_CALL'
        EXPORTING
          datum             = item_valid_from
          equnr             = lv_equnr
          tplnr             = lv_tplnr
          matnr             = lv_matnr
          levdo             = '99'
          levup             = '00'
          sanin             = 'X'
          select_equi       = 'X'
          select_iflo       = 'X'
          select_stpo       = 'X'
          selmod            = 'D'
          stkkz             = ''
          werks             = item_plant
          with_equi         = 'X'
          with_equi_hier    = 'X'
          with_iflo_hier    = 'X'
          with_btyp         = 'X'
          with_mara         = 'X'
          with_ibase_hier   = ''
          capid             = ''
          emeng             = 0
        IMPORTING
          et_hier           = lt_hier
        EXCEPTIONS
          no_hierarchy      = 1
          no_object_defined = 2
          no_selection      = 3
          no_valid_equnr    = 4
          no_valid_matnr    = 5
          no_valid_selmod   = 6
          no_valid_tplnr    = 7
          OTHERS            = 8.
      LOOP AT lt_hier INTO ls_hier.
        ls_hier_return-object_key = ls_hier-object.
        ls_hier_level-object_key = ls_hier-object.
        ls_hier_level-predecessor = ls_hier-predecessor.
        lv_len = strlen( ls_hier-object ).
        IF lv_len GT 1.
          lv_len_temp = lv_len - 1.
        ELSEIF
        lv_len_temp = lv_len.
        ENDIF.
        ls_hier_level-level = ls_hier-level.
        IF ls_hier-object(1) = 'T'.
          ls_hier_return-icon = 'ICON_TECHNICAL_PLACE'.
          ls_hier_return-object_type = 'FUNCLOC'.
          IF ls_hier-successors = 'Y'.
            ls_hier_return-is_leaf = abap_false.
            ls_hier_return-is_expanded = abap_false.
            ls_hier_return-children_loaded = abap_true.
          ELSE.
            ls_hier_return-is_leaf = abap_true.
            ls_hier_return-is_expanded = abap_true.
            ls_hier_return-children_loaded = abap_true.
          ENDIF.
        ELSEIF ls_hier-object(1) = 'E'.
          ls_hier_return-icon = 'ICON_EQUIPMENT'.
          ls_hier_return-object_type = 'EQUI'.
          IF ls_hier-successors = 'Y'.
            ls_hier_return-is_leaf = abap_false.
            ls_hier_return-is_expanded = abap_false.
            ls_hier_return-children_loaded = abap_true.
          ELSE.
            ls_hier_return-is_leaf = abap_true.
            ls_hier_return-is_expanded = abap_true.
            ls_hier_return-children_loaded = abap_true.
          ENDIF.
        ELSEIF ls_hier-object+lv_len_temp(1) = 'M'.
          ls_hier_return-icon = 'ICON_MATERIAL'.
          ls_hier_return-object_type = 'MATERIAL'.
          IF ls_hier-successors = 'Y'.
            ls_hier_return-is_leaf = abap_false.
            ls_hier_return-is_expanded = abap_false.
            ls_hier_return-children_loaded = abap_false.
          ELSE.
            ls_hier_return-is_leaf = abap_true.
            ls_hier_return-is_expanded = abap_true.
            ls_hier_return-children_loaded = abap_true.
          ENDIF.
        ELSEIF ls_hier-object+lv_len_temp(1) = 'X'.
          ls_hier_return-icon = 'ICON_SUPPLY_AREA'.
          ls_hier_return-object_type = 'MATBOM'.
          IF ls_hier-successors = 'Y'.
            ls_hier_return-is_leaf = abap_false.
            ls_hier_return-is_expanded = abap_false.
            ls_hier_return-children_loaded = abap_false.
          ELSE.
            ls_hier_return-is_leaf = abap_true.
            ls_hier_return-is_expanded = abap_true.
            ls_hier_return-children_loaded = abap_true.
          ENDIF.
        ELSEIF ls_hier-object+lv_len_temp(1) = 'A'.
          ls_hier_return-icon = 'ICON_MATERIAL_REVISION'.
          ls_hier_return-object_type = 'MATERIAL'.
          IF ls_hier-successors = 'Y'.
            ls_hier_return-is_leaf = abap_false.
            ls_hier_return-is_expanded = abap_false.
            ls_hier_return-children_loaded = abap_false.
          ELSE.
            ls_hier_return-is_leaf = abap_true.
            ls_hier_return-is_expanded = abap_true.
            ls_hier_return-children_loaded = abap_true.
          ENDIF.
        ENDIF.
    *IF ls_hier-predecessor EQ item_object_key OR ls_hier-object EQ item_object_key.
        APPEND ls_hier_return TO lt_hier_return.
        APPEND ls_hier_level TO lt_hier_level.
    *ENDIF.
        CLEAR lv_len.
        CLEAR lv_len_temp.
      ENDLOOP.
    lt_hier_return_temp = lt_hier_return.
      DESCRIBE TABLE lt_hier LINES lv_hier_lines.
      IF lv_hier_lines EQ 0.
        elem_selected_entry = wd_context->path_get_element( '1.ENTRIES.1' ).
    Get children node
        elem_selected_entry->set_attribute(
        value = abap_true
        name = 'IS_LEAF' ).
      ENDIF.
    *************************************Deleting Now***********
    SORT lt_hier_level BY level DESCENDING.
      LOOP AT lt_hier_level INTO ls_hier_level.
        max_level = ls_hier_level-level.
        EXIT.
      ENDLOOP.
      SORT lt_hier_level BY level ASCENDING.
      LOOP AT lt_hier_level INTO ls_hier_level WHERE level EQ 0.
        ls_hier_level-path = '1.ENTRIES.1'.
        ls_hier_level-parent_path = '1.ENTRIES.1'.
        MODIFY lt_hier_level FROM ls_hier_level.
      ENDLOOP.
    ************************New design to Generate Path and Parent path
    lv_cnt = 0.
    temp_level = 1.
    SORT lt_hier_level BY object_key ASCENDING.
    LOOP AT lt_hier_level INTO ls_hier_level WHERE level EQ 1.
       lv_cnt = lv_cnt + 1.
       lv_parent_path = '1.ENTRIES.1'.
       ls_hier_level-parent_path = lv_parent_path.
       pos = lv_cnt.
       CONCATENATE lv_parent_path separator 'SUB_ENTRIES' separator pos INTO lv_path.
       ls_hier_level-path = lv_path.
       MODIFY lt_hier_level FROM ls_hier_level.
    ENDLOOP.
    temp_level = 1.
    lv_cnt = 0.
    *********************Need to call this for each level ***************************
    WHILE temp_level LT max_level.
       CLEAR lt_pred.
       CLEAR ls_pred.
       LOOP AT lt_hier_level INTO ls_hier_level WHERE level EQ temp_level.
         ls_pred-parent = ls_hier_level-object_key.
         ls_pred-path = ls_hier_level-path.
         APPEND ls_pred TO lt_pred.
       ENDLOOP.
       SORT lt_pred BY parent.
       DELETE ADJACENT DUPLICATES FROM lt_pred.
       LOOP AT lt_pred INTO ls_pred.
         lv_cnt = 0.
         LOOP AT lt_hier_level INTO ls_hier_level WHERE predecessor EQ ls_pred-parent.
           lv_cnt = lv_cnt + 1.
           lv_parent_path = ls_pred-path.
           ls_hier_level-parent_path = lv_parent_path.
           lv_path = ''.
           pos = lv_cnt.
           CONCATENATE lv_parent_path separator 'SUB_ENTRIES' separator pos INTO lv_path.
           ls_hier_level-path = lv_path.
           MODIFY lt_hier_level FROM ls_hier_level.
         ENDLOOP.
       ENDLOOP.
       temp_level = temp_level + 1.
    ENDWHILE.
    LOOP AT lt_hier_level INTO ls_hier_level.
       LOOP AT lt_hier_return INTO ls_hier_return.
         IF ls_hier_level-object_key = ls_hier_return-object_key.
           MOVE-CORRESPONDING ls_hier_level TO ls_hier_return.
           MODIFY lt_hier_return FROM ls_hier_return.
         ENDIF.
       ENDLOOP.
    ENDLOOP.
    SORT lt_hier_return BY path ASCENDING.
    **************************Delete the extra first character returned by PM_HIERARCHY_CALL******
      LOOP AT lt_hier_return INTO ls_hier_return.
        IF ls_hier_return-object_key(1) = 'T'.
          SHIFT ls_hier_return-object_key BY 1 PLACES.
          lv_object_key = ls_hier_return-object_key.
          lv_funcloc_ext = lv_object_key.
          CALL FUNCTION 'CONVERSION_EXIT_TPLNR_OUTPUT'
            EXPORTING
              input  = lv_funcloc_ext
            IMPORTING
              output = lv_funcloc.
          lv_int_obj_key = lv_funcloc.
          ls_hier_return-object_key = lv_int_obj_key.
        ELSEIF ls_hier_return-object_key(1) = 'E'.
          SHIFT ls_hier_return-object_key BY 1 PLACES.
          lv_object_key = ls_hier_return-object_key.
          obj_len = strlen( lv_object_key ).
          IF obj_len GE 18.
            lv_object_key = lv_object_key+0(18).
          ENDIF.
          wd_comp_controller->conv_ext_2_int(
           EXPORTING
             iv_object_key_ext =  lv_object_key            " String
             iv_object_type =   'EQUI'               " String
           IMPORTING
             ev_object_key =   lv_int_obj_key                " String
          SHIFT lv_int_obj_key LEFT DELETING LEADING '0'.
          ls_hier_return-object_key = lv_int_obj_key.
        ELSE.
          SHIFT ls_hier_return-object_key BY 1 PLACES.
          lv_object_key = ls_hier_return-object_key.
          obj_len = strlen( lv_object_key ).
          IF obj_len GE 18.
            lv_object_key = lv_object_key+0(18).
          ENDIF.
          SHIFT lv_object_key LEFT DELETING LEADING '0'.
          ls_hier_return-object_key = lv_object_key.
        ENDIF.
        MODIFY lt_hier_return FROM ls_hier_return TRANSPORTING object_key object_key.
      ENDLOOP.
    LOOP AT lt_hier_level INTO ls_hier_level.
       IF ls_hier_level-object_key(1) = 'T'.
         SHIFT ls_hier_level-object_key BY 1 PLACES.
         lv_object_key = ls_hier_level-object_key.
         lv_funcloc_ext = lv_object_key.
         CALL FUNCTION 'CONVERSION_EXIT_TPLNR_OUTPUT'
           EXPORTING
             input  = lv_funcloc_ext
           IMPORTING
             output = lv_funcloc.
         lv_int_obj_key = lv_funcloc.
         ls_hier_level-object_key = lv_int_obj_key.
       ELSEIF ls_hier_level-object_key(1) = 'E'.
         SHIFT ls_hier_level-object_key BY 1 PLACES.
         lv_int_obj_key = ls_hier_level-object_key.
         obj_len = strlen( lv_int_obj_key ).
         IF obj_len GE 18.
           lv_int_obj_key = lv_int_obj_key+0(18).
         ENDIF.
         wd_comp_controller->conv_ext_2_int(
          EXPORTING
            iv_object_key_ext =  lv_int_obj_key            " String
            iv_object_type =   'EQUI'               " String
          IMPORTING
            ev_object_key =   lv_int_obj_key                " String
         SHIFT lv_int_obj_key LEFT DELETING LEADING '0'.
         ls_hier_level-object_key = lv_int_obj_key.
       ELSE.
         SHIFT ls_hier_level-object_key BY 1 PLACES.
         lv_int_obj_key = ls_hier_level-object_key.
         obj_len = strlen( lv_int_obj_key ).
         IF obj_len GE 18.
           lv_int_obj_key = lv_int_obj_key+0(18).
         ENDIF.
         SHIFT lv_int_obj_key LEFT DELETING LEADING '0'.
         ls_hier_level-object_key = lv_int_obj_key.
       ENDIF.
       MODIFY lt_hier_level FROM ls_hier_level TRANSPORTING object_key object_key.
    ENDLOOP.
    *********************Getinfo if root node else call Get_Children_Info to generate the structure as well*******
      IF lv_path EQ '1.ENTRIES.1'.
        element = wd_context->path_get_element( lv_path ).
      navigate from <ENTRIES> to <SUB_ENTRIES> via lead selection
        node_sub_entries = element->get_child_node( name = 'SUB_ENTRIES' ).
        element->get_attribute( EXPORTING name = 'OBJECT_KEY'
                                 IMPORTING value = item_object_key ).
        element->get_attribute( EXPORTING name =  `OBJECT_TYPE`
                                IMPORTING value = item_object_type ).
    ****************Get Info of Technical Objects*************
        wd_comp_controller->get_children_info(
          EXPORTING
            iv_lt_list =     lt_hier_return           " Rplm_Tt_Mt_Struc
            iv_path = ''
            iv_hier_level  = lt_hier_level
          IMPORTING
            ev_lt_full =      lt_hier_return                   " Rplm_Tt_Mt_Struc
    Create the strcuture by binding the entries to Node which is bound to the table
    element = wd_context->path_get_element( lc_path ).
    Get children node
            node_sub_entries = element->get_child_node( 'SUB_ENTRIES' ).
            CALL METHOD node_sub_entries->bind_table
              EXPORTING
                new_items            = lt_hier_return
                set_initial_elements = abap_true.
      @TODO handle not set lead selection
       IF ( node_entries IS INITIAL ).
       ENDIF.
       lv_temp = 1.
    ***************Sort the LT_HIER_TABLE appropriately ******
       LOOP AT lt_hier_return INTO ls_hier_return .
         MOVE-CORRESPONDING ls_hier_return TO ls_hier_return_sort.
         ls_hier_return_sort-path_length = strlen( ls_hier_return_sort-path ).
         APPEND ls_hier_return_sort TO lt_hier_return_sort.
       ENDLOOP.
       SORT lt_hier_return_sort BY path_length ASCENDING path ASCENDING.
       CLEAR lt_hier_return.
       LOOP AT lt_hier_return_sort INTO ls_hier_return_sort.
         MOVE-CORRESPONDING ls_hier_return_sort TO ls_hier_return.
         APPEND ls_hier_return TO lt_hier_return.
       ENDLOOP.
    *wd_comp_controller->gv_master_data = lt_hier_return.
       LOOP AT lt_hier_return INTO ls_hier_return.
         lv_path = ls_hier_return-path.
         lc_path = ls_hier_return-parent_path.
         IF lv_path NE '1.ENTRIES.1'.
           element = wd_context->path_get_element( lc_path ).
    Get children node
           node_sub_entries = element->get_child_node( 'SUB_ENTRIES' ).
    Now, create the children elements
           element->get_attribute( EXPORTING name = 'OBJECT_KEY'
                                   IMPORTING value = ls_hier_level-predecessor ).
    Create the strcuture by binding the entries to Node which is bound to the table
           CALL METHOD node_sub_entries->bind_structure
             EXPORTING
               new_item             = ls_hier_return
               set_initial_elements = abap_false.
         ENDIF.
       ENDLOOP.
    Only when a new level is reached we create one more child node
    else we attach our elements to same child node
        element = wd_context->path_get_element( item_path ).
    Get children node
        element->set_attribute(
        value = abap_false
        name = 'IS_EXPANDED' ).
      ENDIF.
      navigate from <CONTEXT> to <GENERAL> via lead selection
      node_general = wd_context->get_child_node( name = wd_this->wdctx_general ).
      get element via lead selection
      elem_general = node_general->get_element(  ).
      get single attribute
      elem_general->set_attribute(
        name =  `COLLAPSE_VISIBILITY`
        value = abap_false ).
      node_selected_entry = wd_context->get_child_node( name = if_structure_view_new=>wdctx_selected_entry ).
      get element via lead selection
      elem_selected_entry = node_selected_entry->get_element(  ).
      get single attribute
      elem_selected_entry->set_attribute(
          name =  `OBJECT_KEY`
          value = '' ).
      elem_selected_entry->set_attribute(
            name =  `OBJECT_TYPE`
            value = '' ).
    get element via lead selection
      elem_context = wd_context->get_element(  ).
    get single attribute
      elem_context->set_attribute(
        name =  `EXPAND_ALL`
        value = abap_false ).
      wd_this->enable_buttons(
    endmethod.

Maybe you are looking for

  • How to get the value from a label and store it in an sql database?

    I have tried all kinds of different ways and I always get the error that it is not a member of string or whatever data type I try. Try scoringlbl.Text.Validate() scoreinglbl.Text.HighScoresBindingSource.EndEdit() scoringlbl.Text.HighScoresTableAdapte

  • Ever since Safari v.4, Safari constantly LOADING, can't get to work

    Installed v.4 of Safari, ever since then, Safari runs incredibly slowly. @ hulu.com, cannot get a video to load, it tells me to check my bandwidth capabilities, I have the most recent Adobe Flash Player, none of this was an issue before I installed v

  • Error occured in bdc(session method)

    hai, i was written one bdc program with session method but unfortunatly it's throwing some error like bdc_group is invalid. this problem happening at when i was going to give the file path through f4 in selection screen it's showing like  BDC_OPEN_GR

  • 0FC_ACCNTBP_ATTR delta problems

    Hi! I have some problems with 0FC_ACCNTBP_ATTR datasource, when I want to do delta extraction I got an error SAPSQL_INVALID_FIELDNAME "The SELECT clause was specified in an internal table at runtime. It contains the field name "GUID_C", but this does

  • Double NATting ASA 5510 8.4 how to ?

    Hi, I have a situation that creates a bit of a headache for me. The task is to use SMB / NetBIOS (Win Server 2008 R2) to open a connection and transfer a file from host 2 to host 1. Sounds easy, I know. Here's the setup: Host 1: 192.168.10.34 (on 192