Sorting a node and table

can any one tell, How to sort a dynamically generated table and dynamically generated node?

Thanks Anja,
I am custamizing MSS Approve/Review timesheets iview.
in that i need to sort the table based on attendence type(meal period hours , attendence hours,etc are att types) and
display subtotals for each attendence type. That is in webdynpro java.

Similar Messages

  • Sort the Nodes and remove duplicate nodes

    Hello Experts,
    I have a requirement to sort the nodes based on a key value.
    e.g.
    <Node>
        <Key>2<Key>
        <Value1>name1<Value1>
        <Value2>email1<Value2>
    </Node>
    <Node>
         <Key>1<Key>
         <Value1>name2<Value1>
        <Value2>email2<Value2>
    </Node>
    <Node>
         <Key>2<Key>
         <Value1>name3<Value1>
        <Value2>email3<Value2>
    </Node>
    and the Output should be
    <TNode>
         <Key>1<Key>
         <Value1>name2<Value1>
        <Value2>email2<Value2>
    </TNode>
    <TNode>
         <Key>2<Key>
         <Value1>name3<Value1>
        <Value2>email3<Value2>
    </TNode>
    I tried using SortByKey function for Node i.e.
    Key --> SortByKey , Node --> TNode
    But I dont get sorted value for Value1 and Value2.
    Can anybody give solution for this?
    I have around 25000 records as input and there are around 25 values in structure.
    Please help.
    Thanks in advance,
    Beena.

    Beena,
    Here you go. If it doesn't helps then let me know.
    Mapping.
    http://www.flickr.com/photo_zoom.gne?id=2185600055&size=o
    http://www.flickr.com/photo_zoom.gne?id=2185600049&size=o
    http://www.flickr.com/photo_zoom.gne?id=2185600063&size=o
    http://www.flickr.com/photo_zoom.gne?id=2185600067&size=o
    Results
    http://www.flickr.com/photo_zoom.gne?id=2185600075&size=o

  • Dynamic creation of context nodes and ui elements

    Hi,
    I have created context nodes dynamically. And i also want to create UI elements dynamically wherein i want to bind the attribute from the context node to it. For example i want to create a drop down by index and bind one of the attributes in the context nodes that i have earlier created dynamically to it.  I do not know how to get the path to the attribute as i get IF_WD_CONTEXTNODE_INFO when i say get_child_node(). And the IF_WD_CONTEXTNODE_INFO does not have any method where in i can get IF_WD_CONTEXT_NODE from where i can get the path by get_meta_path( )
    Here is the code. The problem is to get the path which is the i/p to cl_wd_dropdown_by_idx=>new_dropdown_by_idx( ) method.
    DATA:
            lo_root_ui_elmnt              TYPE REF TO cl_wd_uielement_container,
            lo_drpdwn_by_idx              TYPE REF TO cl_wd_dropdown_by_idx,
            lo_txt_vw                     TYPE REF TO cl_wd_text_view,
            lo_qstn_node                  TYPE REF TO if_wd_context_node,
            lo_optn_node_info             TYPE REF TO if_wd_context_node_info,
            lv_optn_data_source_name      TYPE string,
            lt_child_nodes                TYPE wdr_context_child_map,
            lo_qstn_el                    TYPE REF TO if_wd_context_element,
            lo_optn_el                    TYPE REF TO if_wd_context_element,
            lv_text                       TYPE string,
            lo_qstn_node_info             TYPE REF TO if_wd_context_node_info.
      FIELD-SYMBOLS:
    *                 <ls_qstn>    LIKE LINE OF wd_this->mt_questions.
                    <ls_child_node>         LIKE LINE OF lt_child_nodes.
      lo_root_ui_elmnt ?= io_view->get_root_element( ).
      lt_child_nodes = wd_context->get_child_nodes( ).
    LOOP AT lt_child_nodes ASSIGNING <ls_child_node>.
       lo_qstn_node = <ls_child_node>-node.
        lo_qstn_el = lo_qstn_node->get_element( index = 1 ).
        lo_qstn_el->get_attribute(
              EXPORTING
                name = 'QUESTION_TEXT'
               IMPORTING
                 value = lv_text ).
        lo_txt_vw =   cl_wd_text_view=>new_text_view( view = io_view ).
        lo_txt_vw->set_text( value = lv_text  ).
        lo_qstn_node_info = lo_qstn_node->get_node_info( ).
        lo_optn_node_info = lo_qstn_node_info->get_child_node( 'OPTIONS' ).
    *    lv_optn_data_source_name = lo_optn_node_info->get_meta_path( withoutcontroller = abap_true ).
    *    CONCATENATE lv_optn_data_source_name '.' 'OPTION_TEXT' INTO lv_optn_data_source_name.
        lo_drpdwn_by_idx = cl_wd_dropdown_by_idx=>new_dropdown_by_idx(
                              bind_texts = lv_optn_data_source_name
                              view       = io_view ).
        lo_root_ui_elmnt->add_child( lo_txt_vw ).
        lo_root_ui_elmnt->add_child( lo_drpdwn_by_idx ).
      ENDLOOP.
    Regards,
    Madhura Lobo
    Edited by: Suhas Saha on Aug 2, 2011 11:04 AM

    Hi Madhura,
    Please check this thread and find Baskaran answer...
    create new child-node in supply-function
    Re: Creating Dynamic Node and Table
    Cheers,
    Kris.

  • Reading XML file into Dynamic Node and Display its output as Table.

    Hi All,
    Following is the output of XML file:
       <Company>
         <Employee>
              <Name>John</Name>
              <Age>23</Age>
              <***>Male</***>
              <Location>Frankfurt</Location>
         </Employee>
         <Employee>
              <Name>Tina</Name>
              <Age>21</Age>
              <***>Female</***>
              <Location>Boston</Location>
         </Employee>
         <Department>
              <Name>Sales</Name>
              <HQ>Chicago</HQ>
              <Emplyoees>2300</Employees>
         </Department>     
    I'm able to read the output through DOM parser. But How do I convert this into dynamic node and display this in Web dynpro as Table?
    Any pointers in this regard will be great help?
    Thanks
    Srikant

    Hi Maksim,
    I've used your example and its now helping as there is kind of agreement on that I'll be knowing the structure of Xml and I can fill the nodes.
    But suppose if you have Xml has following structure :
    <?xml version="1.0" encoding="utf-8"?><DATA>
    <item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">CONTRACT</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
    <item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">CREDIT</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
    <item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">EMPRESS</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
    <item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">PAYMENT</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
    <item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">PRICE</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
    </DATA>
    How we will do in this case?
    Can we have something similar using DOM? Also what is the best method for displaying data being sent in form of XML. And generalize it for cases like this.
    Thanks
    Srikant

  • Dynamic Table control with context nodes and attributes?

    Hi all
    I have node and attributes in context. i want to create table dynamically using this node and attributes, can anyone give code how to do this???
    Thanks
    Madhan.

    Hi
    Go through this [link|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80a3de18-ee00-2d10-bfb3-946d7e00fd91?quicklink=index&overridelayout=true].
    Regards
    Arun.P

  • Problem when filling Node and Item tables for the metho add_nodes_and_items

    Hi Experts,
    I am facing problem when filling  Node and Item internal tables for the method add_nodes_and_items.
    as i have written the below logic:
      LOOP AT gt_partner INTO wa_partner.
        CLEAR lvs_tc_root.
        l_key = l_key + 1.
        lvs_tc_root-node_key   = l_key. "wa_partner-sndprn.
    *  lvs_tc_root-relatkey  = lvf_tc_node_key.
    *  lvs_tc_root-relatship = cl_gui_column_tree=>relat_last_child.
        lvs_tc_root-last_hitem = wa_partner-sndprn.
        lvs_tc_root-hidden     = ' '.
        lvs_tc_root-disabled   = ' '.
        lvs_tc_root-isfolder   = 'X'.
        lvs_tc_root-n_image    = icon_folder.
        lvs_tc_root-exp_image  = icon_folder.
        lvs_tc_root-expander   = 'X'.
        APPEND lvs_tc_root TO gvt_tc_node_table.
        CLEAR lvs_tc_root.
        lvs_tc_root-node_key   = 'A'.  "Successfull
        lvs_tc_root-relatkey   = l_key.
        lvs_tc_root-relatship  = cl_gui_column_tree=>relat_last_child.
        lvs_tc_root-last_hitem = wa_partner-sndprn.
        lvs_tc_root-hidden     = ' '.
        lvs_tc_root-disabled   = ' '.
        lvs_tc_root-n_image    = icon_green_light.
        APPEND lvs_tc_root TO gvt_tc_node_table.
        CLEAR lvs_tc_root.
        lvs_tc_root-node_key   = 'B'.  "Errors
        lvs_tc_root-relatkey   = l_key    .
        lvs_tc_root-last_hitem = wa_partner-sndprn.
        lvs_tc_root-hidden     = ' '.
        lvs_tc_root-disabled   = ' '.
        lvs_tc_root-n_image    = icon_red_light.
        APPEND lvs_tc_root TO gvt_tc_node_table.
        CLEAR lvs_tc_root.
        lvs_tc_root-node_key  = 'C'.  "Deleted
        lvs_tc_root-relatkey  = l_key .
        lvs_tc_root-last_hitem = wa_partner-sndprn.
        lvs_tc_root-hidden    = ' '.
        lvs_tc_root-disabled  = ' '.
        lvs_tc_root-n_image   = icon_yellow_light.
        APPEND lvs_tc_root TO gvt_tc_node_table.
    *   LOOP AT gt_partner_item INTO wa_partner_item WHERE sndprn = wa_partner-sndprn
        LOOP AT gt_partner INTO wa_partner_item WHERE sndprn = wa_partner-sndprn.
          CLEAR lvs_item.
          lvs_item-node_key   = l_key.
          lvs_item-item_name  = 'Column1'.
          lvs_item-text       = wa_partner-sndprn.
          lvs_item-class      = cl_gui_column_tree=>item_class_text.
          APPEND lvs_item TO gvt_tc_item_table. CLEAR lvs_item.
          lvs_item-node_key   = 'A'.
          lvs_item-item_name  = 'Column1'.
          lvs_item-text       = 'Successful'.
          lvs_item-class      = cl_gui_column_tree=>item_class_text.
          APPEND lvs_item TO gvt_tc_item_table. CLEAR lvs_item.
          lvs_item-node_key   = 'B'.
          lvs_item-item_name  = 'Column1'.
          lvs_item-text       = 'Errors'.
          lvs_item-class      = cl_gui_column_tree=>item_class_text.
          APPEND lvs_item TO gvt_tc_item_table. CLEAR lvs_item.
          lvs_item-node_key   = 'C'.
          lvs_item-item_name  = 'Column1'.
          lvs_item-text       = 'Deleted'.
          lvs_item-class      = cl_gui_column_tree=>item_class_text.
          APPEND lvs_item TO gvt_tc_item_table. CLEAR lvs_item.
        ENDLOOP.
      ENDLOOP.
      CALL METHOD go_tree->add_nodes_and_items
        EXPORTING
          node_table                     = gvt_tc_node_table
          item_table                     = gvt_tc_item_table
          item_table_structure_name      = 'MTREEITM'
        EXCEPTIONS
          failed                         = 1
          cntl_system_error              = 3
          error_in_tables                = 4
          dp_error                       = 5
          table_structure_name_not_found = 6.
    If the internal table has more than 1 record getting dump...Runtime Errors         MESSAGE_TYPE_X
    Plase let me know how to overcome the problem..
    Thanks,
    Rajasekhar
    Edited by: RajasekharReddy Nevali on Nov 29, 2010 3:43 PM
    Edited by: Neil Gardiner on Nov 30, 2010 12:41 PM

    Hi ,
    U can undestand the code and one more thing dynamically display record for automcally here i am using root nodes please look at that one Same requiremtn i done previously.
    cLEAR item.
      item-node_key = c_nodekey-root.    "partner1
      item-item_name = c_column-column1.
      item-class = cl_gui_column_tree=>item_class_text.
      item-alignment = cl_gui_column_tree=>align_at_top.
      item-font = cl_gui_column_tree=>item_font_prop.
      item-text = 'APPLICATION'.
      item-length = 30.
      APPEND item TO item_table.
      DATA:lv_name TYPE tv_itmname VALUE '1',
           lv_nkey TYPE i,
           lv_nkey2 TYPE i,
           lv_nkey_c TYPE string,
           lv_nkey_c2 TYPE string,
           lv_nkey_c3 TYPE string,
           lv_nkey_c4 TYPE string,
           LV_NKEY_C5 TYPE STRING,
           lv_itmkey TYPE i,
           lv_itmkey_c TYPE string,
           LV_INDEX TYPE I.
    ************************************************LOOP FOR APPLICATION*********
      LOOP AT i_otypes INTO wa_otypes.
        read table it_appl into wa_appl with key appl = wa_otypes-applic." BINARY SEARCH.
              if sy-subrc = 0.
                lv_apdes = wa_appl-text1.
              endif.
        CLEAR:item,lv_nkey_c.
        lv_nkey_c = sy-tabix.
        LV_INDEX = SY-TABIX.
        CONDENSE lv_nkey_c.
        CONCATENATE 'N' lv_nkey_c INTO lv_nkey_c.
        node-node_key = lv_nkey_c.
        node-relatkey = c_nodekey-root.
        node-relatship = cl_gui_list_tree=>relat_last_child.
        node-isfolder = 'X'.
        APPEND node TO node_table.
        CLEAR item.
        item-node_key = lv_nkey_c.
        item-item_name = c_column-column1.
        item-class = cl_gui_column_tree=>item_class_text.
        item-font = cl_gui_column_tree=>item_font_prop.
        item-text = wa_otypes-APPLIC.
        item-length = 30.
        APPEND item TO item_table.
         CLEAR item.
          item-node_key = lv_nkey_c.
          item-item_name = c_column-column2.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = lv_apdes.
          item-length = 30.
          APPEND item TO item_table.
         v_acount = v_acount + 1.
         v_acount1 = v_acount1 + 1.
    clear lv_apdes.
    *****************************************LOOP FOR ARCHIV OBJECTS***************************
        loop at it_obj into wa_obj where applic = wa_otypes-applic.
          CLEAR:item,lv_nkey_c2.
          lv_nkey_c2 = SY-TABIX.
          CONDENSE lv_nkey_c2.
          CONCATENATE 'SN' lv_nkey_c2 INTO lv_nkey_c2.
          node-node_key = lv_nkey_c2.
          node-relatkey = lv_nkey_c.
          node-relatship = cl_gui_list_tree=>relat_last_child.
          node-isfolder = 'X'.
          APPEND node TO node_table.
          CLEAR item.
          item-node_key = lv_nkey_c2.
          item-item_name = c_column-column1.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = wa_obj-object.
          item-length = 30.
          APPEND item TO item_table.
          CLEAR item.
          item-node_key = lv_nkey_c2.
          item-item_name = c_column-column2.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = wa_obj-objtext.
          item-length = 30.
          APPEND item TO item_table.
    ****count all object for final displaying*******
         v_ocount1 = v_ocount1 + 1.
          LV_STR = LV_STR + 1.
         ENDLOOP.
    *********************LOOP FOR ARCH OBJECT ALL PROGRAMS*******************************************
       LOOP AT IT_PRG INTO WA_PRG WHERE OBJECT = WA_OBJ-OBJECT.
    ****************1PRG**********************
    IF wa_PRG-REORGA_PRG IS NOT INITIAL.
      read table it_trdirt into wa_trdirt with key name = wa_prg-reorga_prg BINARY SEARCH.
                  if sy-subrc = 0.
                  lv_text = wa_trdirt-text.
                  endif.
         CLEAR:item,lv_nkey_c3.
          data : v_no type sy-tabix.
          v_no = v_no + 1.
          lv_nkey_c3  =  v_no.
          CONDENSE lv_nkey_c3.
          CONCATENATE 'SSN' lv_nkey_c3 INTO lv_nkey_c3.
          node-node_key = lv_nkey_c3.
          node-relatkey = lv_nkey_c2.
          node-relatship = cl_gui_list_tree=>relat_last_child.
          node-isfolder = 'X'.
          NODE-N_image =' '.
          APPEND node TO node_table.
           CLEAR NODE.
          CLEAR item.
          item-node_key = lv_nkey_c3.
          item-item_name = c_column-column1.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = 'WRIT'."wa_PRG-REORGA_PRG.
          item-length = 30.
          APPEND item TO item_table.
          CLEAR item.
          item-node_key = lv_nkey_c3.
          item-item_name = c_column-column2.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = 'WRITE PROGRAM'."lv_text."'WRITE PROGRAM'.
          item-length = 30.
          APPEND item TO item_table.
           clear lv_text.
    ************************SSSN NODE***********************
            CLEAR:item,lv_nkey_c4.
          data : v_no1 type sy-tabix.
          v_no1 = v_no1 + 1.
          lv_nkey_c4  =  v_no1.
          CONDENSE lv_nkey_c4.
          CONCATENATE 'SSSN' lv_nkey_c4 INTO lv_nkey_c4.
          node-node_key = lv_nkey_c4.
          node-relatkey = lv_nkey_c3.
          node-relatship = cl_gui_list_tree=>relat_last_child.
         node-isfolder = 'X'.
          NODE-N_image =' '.
          APPEND node TO node_table.
           CLEAR NODE.
          CLEAR item.
          item-node_key = lv_nkey_c4.
          item-item_name = c_column-column1.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = wa_PRG-REORGA_PRG.
          item-length = 30.
          APPEND item TO item_table.
          CLEAR item.
          item-node_key = lv_nkey_c4.
          item-item_name = c_column-column2.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = lv_text."'WRITE PROGRAM'.
          item-length = 30.
          APPEND item TO item_table.
            clear lv_text.
    *******COUNT TYPE WRITE PROGRAMS****************
          V_WCOUNT = V_WCOUNT + 1.
    CLEAR item.
    V_WCOUNT = V_WCOUNT.
          item-node_key = lv_nkey_c3.
          item-item_name = c_column-column3.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = V_WCOUNT."lv_text."'WRITE PROGRAM'.
          item-length = 30.
          APPEND item TO item_table.
          CLEAR V_WCOUNT.
    ENDIF.
    *endif.
    *****************2PRG*****************
    IF wa_PRG-RETRIE_PRG IS NOT INITIAL.
    read table it_trdirt into wa_trdirt with key name = wa_prg-retrie_prg.
                  if sy-subrc = 0.
                  lv_text = wa_trdirt-text.
                  endif.
         CLEAR:item, NODE, lv_nkey_c3.
          v_no = v_no + 1.
          lv_nkey_c3  =  v_no.
          CONDENSE lv_nkey_c3.
          CONCATENATE 'SSN' lv_nkey_c3 INTO lv_nkey_c3.
          node-node_key = lv_nkey_c3.
          node-relatkey = lv_nkey_c2.
          node-relatship = cl_gui_list_tree=>relat_last_child.
          node-isfolder = 'X'.
          APPEND node TO node_table.
          CLEAR item.
          item-node_key = lv_nkey_c3.
          item-item_name = c_column-column1.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = 'successful'."wa_PRG-RETRIE_PRG.
          item-length = 30.
          APPEND item TO item_table.
          CLEAR item.
          item-node_key = lv_nkey_c3.
          item-item_name = c_column-column2.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = 'sucessful PROGRAM'.
          item-length = 60.
          APPEND item TO item_table.
    *********************************SSSN NODE*******************************
           CLEAR:item,lv_nkey_c4,node.
         data : v_no1 type sy-tabix.
          v_no1 = v_no1 + 1.
          lv_nkey_c4  =  v_no1.
          CONDENSE lv_nkey_c4.
          CONCATENATE 'SSSN' lv_nkey_c4 INTO lv_nkey_c4.
          node-node_key = lv_nkey_c4.
          node-relatkey = lv_nkey_c3.
          node-relatship = cl_gui_list_tree=>relat_last_child.
         node-isfolder = 'X'.
          NODE-N_image =' '.
          APPEND node TO node_table.
           CLEAR NODE.
          CLEAR item.
          item-node_key = lv_nkey_c4.
          item-item_name = c_column-column1.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = wa_PRG-RETRIE_PRG.
          item-length = 30.
          APPEND item TO item_table.
          CLEAR item.
          item-node_key = lv_nkey_c4.
          item-item_name = c_column-column2.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = lv_text."'WRITE PROGRAM'.
          item-length = 30.
          APPEND item TO item_table.
            clear lv_text.
    **********COUNT THE RELOADPR*******************
              V_WCOUNT = V_WCOUNT + 1.
    CLEAR item.
    V_WCOUNT = V_WCOUNT.
          item-node_key = lv_nkey_c3.
          item-item_name = c_column-column3.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = V_WCOUNT."lv_text."'WRITE PROGRAM'.
          item-length = 30.
          APPEND item TO item_table.
          CLEAR V_WCOUNT.
    ENDIF.
    ENDIF.
    ****************3PRG**********************
    IF wa_PRG-DELETE_PRG IS NOT INITIAL.
    read table it_trdirt into wa_trdirt with key name = wa_prg-delete_prg.
                  if sy-subrc = 0.
                  lv_text = wa_trdirt-text.
                  endif.
         CLEAR:item, NODE, lv_nkey_c3.
          v_no = v_no + 1.
          lv_nkey_c3  =  v_no.
          CONDENSE lv_nkey_c3.
          CONCATENATE 'SSN' lv_nkey_c3 INTO lv_nkey_c3.
          node-node_key = lv_nkey_c3.
          node-relatkey = lv_nkey_c2.
          node-relatship = cl_gui_list_tree=>relat_last_child.
          node-isfolder = 'X'.
          APPEND node TO node_table.
          CLEAR item.
          item-node_key = lv_nkey_c3.
          item-item_name = c_column-column1.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = 'DELETE'."wa_PRG-DELETE_PRG.
          item-length = 30.
          APPEND item TO item_table.
          CLEAR item.
          item-node_key = lv_nkey_c3.
          item-item_name = c_column-column2.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = 'NAME OF DELETE PROGRAM'.
          item-length = 60.
          APPEND item TO item_table.
           CLEAR:item,lv_nkey_c4,node.
         data : v_no1 type sy-tabix.
          v_no1 = v_no1 + 1.
          lv_nkey_c4  =  v_no1.
          endloop.

  • How to create Node, Attributes and Table Dynamically?

    Hi All,
    How to create node and attributes dynamically, and with this node i want to create table dynamically?? Any related code please?
    Thanks
    Venkat.

    HI
    I guess you are asking the same thing in some other post also .
    use the code as mentioned there also.
    data: wd_node_info type ref to if_wd_context_node_info,
    wd_node type ref to if_wd_context_node,
    lr_container type ref to cl_wd_uielement_container,
    lv_tablename type string,
    lt_db_data type ref to data,
    lr_table type ref to cl_wd_table,
    ls_attribute type wdr_context_attribute_info.
    field-symbols: <lt_data> type any table.
    wd_node_info = wd_context->get_node_info( ).
    CALL METHOD WD_NODE_INFO->ADD_NEW_CHILD_NODE
    EXPORTING
    *STATIC_ELEMENT_TYPE = 'ZDEALER'
    NAME = 'NODE'
    IS_MULTIPLE = ABAP_TRUE
    IS_INITIALIZE_LEAD_SELECTION = ABAP_FALSE
    RECEIVING
    CHILD_NODE_INFO = wd_node_info.
    wd_node = wd_context->get_child_node( name = 'NODE' ).
    wd_node_info = WD_node->GET_NODE_INFO( ).
    data dyn_attr_info type wdr_context_attribute_info.
    DYN_ATTR_INFO-NAME = 'X1'. "Attribute Name
    DYN_ATTR_INFO-TYPE_NAME = 'STRING' ." Data Element(CHAR20) ( Type Of Attribute )
    DYN_ATTR_INFO-NODE_INFO = wd_node_info.
    CALL METHOD wd_node_info->ADD_ATTRIBUTE
    EXPORTING
    ATTRIBUTE_INFO = DYN_ATTR_INFO.
    DYN_ATTR_INFO-NAME = 'X2'. "Attribute Name
    DYN_ATTR_INFO-TYPE_NAME = 'STRING' ." Data Element(CHAR20) ( Type Of Attribute )
    DYN_ATTR_INFO-NODE_INFO = wd_node_info.
    CALL METHOD wd_node_info->ADD_ATTRIBUTE
    EXPORTING
    ATTRIBUTE_INFO = DYN_ATTR_INFO.
    lr_container ?= view->get_root_element( ).
    cl_wd_matrix_layout=>new_matrix_layout( container = lr_container ).
    " Creating internal table with the same structure as our dynamic context node
    CALL METHOD CL_WD_table=>new_table
    EXPORTING
    bind_data_source = 'NODE'
    ID = 'TABLE'
    RECEIVING
    control = lr_table.
    cl_wd_matrix_head_data=>new_matrix_head_data( element = lr_table ).
    *lr_table->bind_data_source( path = 'NODE' ).
    data lr_table_col type ref to cl_wd_table_column.
    data lr_table_col1 type ref to cl_wd_table_column.
    data lr_text_view type ref to cl_wd_text_view.
    data lr_input_field type ref to cl_wd_input_field.
    DATA lr_column_name_header TYPE REF TO cl_wd_caption.
    lr_input_field = cl_wd_input_field=>new_input_field(
    bind_value = 'NODE.X1' ID = 'INP' ).
    LR_TABLE_COL = cl_wd_table_column=>new_table_column( id = 'COL1' ).
    lr_table->add_column( the_column = lr_table_col ).
    lr_column_name_header ?= cl_wd_caption=>new_caption( text = 'X1').
    lr_table_col->set_table_cell_editor(
    THE_TABLE_CELL_EDITOR = lr_input_field ).
    lr_table_col->set_header( lr_column_name_header ).
    lr_text_view = cl_wd_text_view=>new_text_view(
    bind_text = 'NODE.X2' ID = 'TXT' ).
    LR_TABLE_COL1 = cl_wd_table_column=>new_table_column( id = 'COL2' ).
    lr_table->add_column( lr_table_col1 ).
    lr_column_name_header ?= cl_wd_caption=>new_caption( text = 'X2').
    lr_table_col1->set_table_cell_editor(
    THE_TABLE_CELL_EDITOR = lr_text_view ).
    lr_table_col1->set_header( lr_column_name_header ).
    lr_container->add_child( lr_table ).
    cl_wd_matrix_head_data=>new_matrix_head_data( element = lr_table ).
    thanks
    sarbjeet singh

  • Is there a way to "mix" the nodes and leaves of the tree so if they are at the same level, they will display in a specified order.

    Is there a way to "mix" the nodes and leaves of the tree so that even if they are at the same level (1,2,3...), they will display in a specified order (via sort sequence, alphabetical, etc.).
    History:
    We are using the Tree UI element to display/manage a material bom interface. We seem to be running into an issue with displaying the nodes/leaves of the tree.. regardless of the order that the context is built (which is currently the order of the exploded BOM from from CS_BOM_EXPL_MAT_V2), the bom is displayed with the nested boms at the top of each level and the single materials below them. For example. If  TK1 contains Material1, Material2, Material3, Kit1(containing component1, comp2, comp3), Material4, Kit2(containing comp4, comp5, comp6), and Material5 (in this order), the tree will display with the A level node as TK1, the next node as Kit1 (with its subleaves of comp1,comp2,comp3), Kit2(with subleaves of comp4,comp5,comp6), THEN Material1, material2, material3, material4, material5.  Our users are adamant about the items displaying in the correct order (which should be alphabetical based on the description for one report and by location for purposes of inventory for another). I've searched but not been able to locate a similar question. If I've missed it, please point me in the right direction. The users want the tree,  not a "tree" table.  This is our first attempt at the tree, so maybe we're missing something basic?
    TK1
    -Mat1
    -Mat2
    -Mat3
    -Kit1
    --Comp1
    --Comp2
    --Comp3
    -Mat4
    -Kit2
    --Comp4
    --comp5
    --comp6
    -Material5
    displays as
    TK1
    -Kit1
    --Comp1
    --Comp2
    --Comp3
    -Kit2
    --Comp4
    --Comp5
    --Comp6
    -Mat1
    -Mat2
    -Mat3
    -Mat4
    -Mat5

    co-workers said example picture is misleading.. we can make the order work if everything is a "folder" but not a mix of "folders" and "files" (if making a visual reference to the windows browser). i.e - a file is represented as an empty folder.
    TK1    
    . Mat1
    . Mat2
    . mat3
    > kit1   
    .. comp1
    .. comp2
    .. comp3
    . mat4
    > kit2
    .. comp4
    .. comp5
    .. comp6
    . mat5
    displays at
    TK1
    > kit1
    .. comp1
    .. comp2
    .. comp3
    > kit2
    .. comp4
    .. comp5
    .. comp6
    . mat1
    . mat2
    . mat3
    . mat4
    . mat5
    we can make it work if everything is a folder. This is our current workaround.
    TK1
    > mat1
    > mat2
    > mat3
    v kit1 (when expanded)
    .. comp1
    .. comp2
    .. comp3
    > mat4
    > kit2 (when not expanded)
    > mat5

  • Replication between 130 nodes and 1 Data Center

    Hi everyone.
    I have 130 database nodes (Oracle Standard Edition One) with a big distance of separation, and 1 Data Center with 3 nodes (Oracle Real Application Cluster 10g R2). The connection between nodes and datacenter is through various ISP ( WAN).
    I have exactly the same model design of database in nodes and datacenter.
    DataCenter is a repository of data for reporting to directors and dictate the business rules to guide all nodes.
    Each node have approximately 15 machines connected with desktop application.
    In other words Desktop Application with a Backend Database (node).
    My idea of replication is not instantly, when a transaction commit in a node then replicate to datacenter. Also over nigth replicate images because is heavy, approximately 1 mg per image. Each image correspond to one transaction.
    On the orher hand i have to replicate some data from datacenter to nodes, business rule, for example: new company names, new persons, new prohibitions, etc.
    My problem is to determine th best way to replicate data through nodes to datacenter.
    Please somebody could suggest me the best solution.
    Thanks in advanced.

    Last I checked, Streams and multi-master replication require enterprise edition databases at both ends, which rules them out for the sort of deployment you're envisioning.
    If a given table will only ever be modified on nodes or on the master site, never both, you can build everything as read-only materialized views. This would probably require, though, that the server at the data center have 130 copies of each table, 1 per node. For schemas of any size, this obviously gets complicated very quickly. For asynchronous replcation to work, you'd need to schedule periodic refreshes, which assumes that you have relatively stable internet connections between the nodes and the data center.
    I guess I would tend to question the utility of having so many nodes. Is it really necessary to have so many? Or could you just beef up the master and have everyone connect directly?
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How could I retrieve metadata about Array Type and Table Type?

    I use DatabaseMetaData.getUDTs() method for obtain metadata about Object Types, but this method doesn't work with Array Type and Table Type.

    JJ,
    Go into the diagrams of the DBTools List Columns and DBTools Get Properties respectively. When you inspect this diagram, you will see the raw ActiveX properties and methods called to get the size information. The value of -1 means the requested recordset is already closed. This is the sort of thing that is controled by the driver (ODBC, OLE DB, Jet, etc) you are using. Notice that you can right click on the property and invoke nodes and get more information about these specific items directly from the ADO online help.
    Crystal

  • Strange behaviour with ActiveX invoke node and Excel

    I want to send a table of numbers from LV50.1f to Excel97. After getting a
    reg to Excel8.Application I retrieve the Workbooks property, Invoke Item to
    select a certain Workbook reference, retrieve the Worksheets collection
    reference, Invoke Item and then get a reference to WORKBOOKS again.
    Strangely, there is an example code from the NI web site that does exactly
    the same, but in the last step a variant is returned in stead of a
    reference, which is converted using Variant to G to a Worksheet reference.
    when I copied that last invoke node to my VI I also had a variant returned,
    so on one diagram I had to invoke nodes connected to the same sources, one
    returning a ref, the other returning a variant!
    Disco
    nnecting the sources to my Invoke node and rewiring gave no change.
    Also type casting the ref to workbooks to a worksheets ref, didn't work - I
    get errors in the following property node that retrieves a Range - which
    exists in Worksheet, but not in Workbooks.
    Appearantly, LV gets the returned type mixed up sometimes, and there is no
    way to fix it other then copying a invoke node from another diagram?
    Finally I got it working though, but this behaviour puzzles me. Contrary to
    the example from NI, I now managed to send a table (2d array of strings) in
    one call to Excel (don;t need to loop over cells or columns).
    PS
    I used to do the same using DDE but ranges are different for each language
    version of Excel (i.e. R1C1 for English and R1K1 for Dutch), so my VI's need
    to know the language of Excel. Also with NT and Win98, getting a DDE
    connection often hangs LV. But a big progress has been made - now I need
    different VI's for each version of Excel!!!
    Ferry Toth
    Enraf BV, The Netherlan
    ds

    Hi Enric,
    Can you try your queries again using the new release of DB XML? It contains some improvements in this area.
    http://www.oracle.com/technology/software/products/berkeley-db/xml/index.html
    John

  • Sorting not working if table linked to another table

    Got a table with student marks:
    Table 1 student
    mark
    A
    98
    B
    79
    C
    82
    if I copy/paste the marks to another table then sort (ascending, sort by B entire table), it is sorting as expected:
    Table 2 student
    Mark
    B
    79
    C
    82
    A
    98
    if instead I go in Table 2 and enter a formula in B2 to get the mark from table 1 (=Table1::B2), fill down the cells, Table 2 will not sort correctly and output this instead!!!!:
    Table 2 student
    Mark
    B
    98
    C
    79
    A
    82
    Yet another bug and it got submitted to Apple but if more users complain as well (using Provide Numbers Feedback), we might finally get Apple to release a bug-free version of Numbers that works as well as Excel for such basic tasks.

    squarebox is styled in three different places
    http://mljdesigns.com.au/Beaumaris%20North_2-2013/index-beaunps4.css line#513
    http://mljdesigns.com.au/Beaumaris%20North_2-2013/index-beaunps4.css line#623
    In the main document line#10
    I do noy know if this has anything to do with your problem as I cannot fault the position of the image.
    You may also want to have a look at line#104 of the main document where there is a stray ending division tag.

  • Adding a 'sort by' option to table data in webhelp output

    RH8 HTML
    Hi all,
    Just wondering (again) if its possible to add a sort feature to a table?
    currently, I've got multiple topics that look like the following. They are a breakdown of all fields/buttons and their functions
    field name
    description
    example
    customer id
    description of field
    example data to be entered
    name
    description of field
    example data to be entered
    customer order no
    description of field
    example data to be entered
    job title
    description of field
    example data to be entered
    this is the order that the fields appear on the user form, I'm wondering if I could add a 'Sort By A-Z' and 'Sort by Appearance' options so the user can view the fields, descriptions, and examples either by the order it appears, or in alphabetical order - all the while the description and example fields moving with the sort.
    Just gives a bit more functionality for users so they can find a field quickly if the list is a bit bigger by using an alpha sort
    Thanks for any help.

    Hi,
    Normally, the browser shows a pointer over a hyperlink. You might have the script set up slightly different than Peter.
    A quick fix is as following:
    Identify the element you want to see a pointer, probably something like TableHeading. In your css, add:
    P.TableHeading
    Be carefull with this, it may confuse people if they see a mouse cursor they don't expect. Your best bet is still to figure out if you have set the script up exactly as described on Peter's page.
    Greet,
    Willam
    This e-mail is personal. For our full disclaimer, please visit www.centric.eu/disclaimer.

  • How to sort data in  results table(advanced table) based on some conditons

    I have a requirement like below I have 3 search columns and 3 sort columns in the page. when user enter values in the search columns I will get results into advanced table. After I got results into results table. User will enter values in sort columns and hit sort submit button, Now the final results data should first display the selected sort values first and remaining data in alphabetical order.
    ex: select a,b,c form table1 where a = nvl(:1,a) and b = nvl(:2,b)
    results from main query
    a , b,c,d,e,f
    now user selects a value a1 in column a then results from main query data should display the a1 records first and remaining all records in alphabetical order.
    Please let me know how can we approach to solve this problem.
    Thanks,
    KC.

    Hi
    Use the following method :
    Set the OrderByClause in your voImpl():
    the following is the description of OrderByClause method :
    setOrderByClause
    public void setOrderByClause(java.lang.String expr)
    Sets the ORDER BY clause of the View Object's query statement. Bind variables can be specified using '?' as a place-holder for the value. The new ORDER BY clause does not take effect until ViewObjectImpl.executeQuery() is called.
    regards
    sridhar

  • Sorting Order for SAP Tables in DB2 database

    Dear Experts -
    ISSUE: When an ABAP program selects data from the DB into an internal
    table, it is changing the way the data is sorted. In other words, the
    internal table data is in a different sort order than what is in the
    DB. It is not working this way in all other non-production systems
    (DEV, QAS, SAX, etc).
    Temporary solution for the programs that have been identified as
    impacted: Use the ABAP Command 'sort' on the internal table.
    Permanent solution needed : Since it is impossible to identify all
    of the programs that will be impacted, we need PRD to work like DEV,
    QAS, SAX, etc. when selecting data into internal tables. The data
    should be in the same order as it is in the DB (sorted by the key).
    ADDITIONAL INFO: DB2 storage disks crashed a day before. H/W team recovered everything. We are facing this only after the recovery.
    Thanks,
    Dinesh

    can you please check in your code if the sql that is being sent has an order by clause .
    Please let us know the SQL statements that is basically used to fill up the internal table.
    When data is fetched from the database, it is not sorted always. Probably you had a clustered index on the tables and the clustering is not there now.
    Edited by: Ratnajit Dey on Dec 16, 2011 1:56 PM

Maybe you are looking for

  • How to populate form data in jsf

    Hi I have 2 questions about how to do things in jsf, i have been working with struts and so will give example of what i would do in struts I have a jsf page for login, when i authenticate the next screen is a table with bunch of data, Where do i popu

  • Not able to do anything after i sign in

    anytime i sign in so i can join it sends me to a page that says this section is currently unavailable. when i check the status all areas have green check marks. i need help please. thanks,

  • [SOLVED] wlan0: unknown interface: No such device

    Got this error today while trying to sudo ifconfig wlan0 up It's probably because of some package update... reinstalling didn't work, and it's not a hardware problem (it works with a livecd). Someone managed to fix this problem with rfkill, but it di

  • MM/dd/yy SimpleDateFormat accepts 55/99/00

    Hi, I found out that MM/dd/yy would accept 55/22/80 instead of just allowing MM to be in the range of 01 to 12 same is the case with dd. If i specify aa/bb/cc it goes to the catch block. If I can make it to go to the catch block if the range of month

  • Sending CRM survey templates to Mobile handheld using Mobile infrastructure

    Hi, I have a a requirement to send survey templates to handheld client using mobile infrastructure. Also the survey results have to be send from handheld client to CRM using the mobile infrastructure. Has anybody send CRM objects using mobile infratr