Sort table by leading selection column

I have a WD tabe using the class TableSorter.
Is it possible to sort the data at runtime by clicking the header of this "selection"-column (which is only visible at runtime; not at designtime)?

Hi mc
You can implement a trick for that. Each time user clicks the standard selection column we make deselection of the row in a programmatic way.
To implement this add in wdDoBeforeNavigation() event handler of your root component controller the following code:
/Here I suppose that 'isChecked' boolean attribute is bound to check box control/
// uncheck all checked rows (check all unchecked rows) again,
int ls = tableNode.getLeadSelection();
for (int iEl = 0, nEl = tableNode.size(); iEl < nEl; ++iEl) {
  I<TableNode>Element tableEl = tableNode.get<TableNode>ElementAt(iEl);
  if (tableEl.getIsChecked() && (!tableNode.isMultiSelected(iEl) && iEl != ls)) {
     tableNode.setSelected(iEl, true);
} else if (!tableEl.getIsChecked() && (tableNode.isMultiSelected(iEl) || iEl == ls)) {
     tableNode.setSelected(iEl, false);
                tableNode.setLeadSelection(IWDNode.NO_SELECTION);
Each time user clicks some check box you need to set the row as multi-selected or vise versa:
tableNode.getCurrentElement().setSelected(tableNode.getCurrentElement().index(), tableNode.getCurrentElement().getIsChecked());
BR
Sergei

Similar Messages

  • How to show two seperate pivot tables with one select column

    Hi All
    My client wishes to have two pivot tables, one showing positive results and the other showing negative results.
    For Example:
    DIMENSION
    BUSINESS A          1000
    BUSINESS B          500
    BUSINESS C          100
    DIMENSION
    BUSINESS A          -1000
    BUSINESS B          -500
    BUSINESS C          -100
    Is it possible to then select the different DIMENSION with one select column for both?
    Thanks

    Not sure I got it right try this
    for Number column pull twice and set col*-1
    use 2 pivot table for each number type
    cool as ~ http://cool-bi.com

  • Table loses lead selection

    Hello,
    I have a table that contains several lines, one of which is selected. Then I click a button, because I want to do something with the selected line.
    However, somewhere before I can handle the button click, the lead selection is lost. When the handler method is called, get_selected_elements returns nothing.
    Where could this happen?
    Thanks in advance
    Roland

    Hello,
    Found it myself. The selectionMode was set to multiNoLead and the selectionChangeBehaviour was manual. Obviously those values don't work together.
    I changed the selectionChangeBehaviour to auto.
    best regards
    Roland

  • Table Problem -- Lead Selection

    Hi all,
            I have a Table with four Columns.
            First column cell editor is a LinktoAction Ui element and Other columns are TextView.
    the selection cardinality of the table node is 0 to 1.
    By default first row is selected .
    Now when i click the linktoAction , it should navigate to another view where the Details of the Selected link is descriped.
    Now my problem is , if the click the Second row LinkToAction(which is not selected), it is Showing the details of the Selected Row LinkToActrion (Ie details of first row).
    Actually the Details are descriped only on the basis of key which is unique to the particlar Title.
    help me in this issue.
    Thanks and Regards
    Fazal B

    Hi Ayyaparaj,
                       Problem is not with the key .
               I am able to get the key and execute the web services.
    This works fine :
    The first row is selected in the table by default .
    if the select the tile link it opens the details view .
    Now :
    The first row is selected in the table by default .
    if i selct the second row title , it shows me the First row details view (Because the CurrentTableNodeElement is the Selected Row).
    as in the details view , i am getting the key element as :
    String key = wdThis.wdGetCompController().wdGetContext().currentTableNodeElement().getKey();
    here the current context element refers to the Selected table Row and not to the Link element.
    Now if  i make the selection mode to none .then no row is selected by default.
    if i click the Link it throws me null pointer exception in the below line  as the currentContextElement is null.
    String key = wdThis.wdGetCompController().wdGetContext().currentTableNodeElement().getKey();'
    Actually what i need is , whenever i click the title link in any of the rows , then the Selected link row should be the selected row(ie the currentTableNodeElement).
    for eg :
    In the webservices Navigator,
    For the Particular services we are able to see the particular operations .
    Thanks and Regards
    Fazal
    Edited by: Fazal Ahamed on May 21, 2008 11:25 AM

  • Getting the selected index of a table (CL_WD_TABLE) without lead-selection

    Hi
    When I click in a table-UI (not alv-table) on a f4-help, I can search with se11-searchhelp on a field. After I choose something, I should also fill some other fields in the same row.
    In the table I have no lead-selection. So, I am searching for a method that gets me the selected index. The element-class for the table-UI is CL_WD_TABLE.
    Once I have the selected index, I could change the fields in the same row inside the WDDOMODIFYVIEW.
    With activated node-selection it can be, that the user selects one row, but he starts the f4-help on another row (the lead-selection doesn't change).
    I have seen this article, but i hope that for the table-UI it is different than with alv:
    [ON_CELL_ACTION triggered only by ENTER ?]

    Hi Lorenzo,
    I'm trying to do the same thing and came up with this solution. In WDDOMODIFYVIEW, since we cannot know in which table row the user clicked the search help, I simply loop through all the rows of the table. For each row, I delegate to a method in the Component Controller which sets the specified index as the table's lead selection then reads the selected table row from the context. I can then populate fields in the selected row as needed.
    METHOD wddomodifyview .
       DATA lo_componentcontroller TYPE REF TO ig_componentcontroller.
       DATA lo_nd_items TYPE REF TO if_wd_context_node.
       DATA lt_items TYPE wd_this->elements_items.
    * -- Upon return from the search help, populate table row details
       lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
       lo_nd_items = wd_context->get_child_node( name = wd_this->wdctx_items ).
       lo_nd_items->get_static_attributes_table( IMPORTING table = lt_items ).
    * Since we cannot know in which table row the user requested the search help,
    * loop through all table rows, populating table row details as needed.
       DESCRIBE TABLE lt_items LINES sy-tfill.
       DO sy-tfill TIMES.
    *   Delegate to the Component Controller
         lo_componentcontroller->get_table_row_detail( sy-index ).
       ENDDO.
    ENDMETHOD.

  • How to Disable the Lead selection Action on aTable n How to Refreh a Page

    HI....
    1)How to Disable the Lead selection Action on aTable n How to Refreh a Page r web dynpro application.
    In my case i have a table n user enters data on multiple rows in table , n i have some input fields outside of table for those Inputs fields am settiing the data  at the screen initilization(in Init() moethod by hard code).the problem is whenever the is clicking in th 2nd row of a table the Lead Selection is triggerig and the data in the Input Fields outside the table is not displayinig.
    So by removing the lead Selection Action of a table i thought i can reslove this,
    2) How to refresha page(like we click F5 on key board),is it can be done thru code in web dynpro application
    Regards
    Rajesh

    Hi,
    You did not explained what is your functionality or coding in leadselection. Is that action on leadselection is necessary for you?.
    1)If you just want to remove the action then go to table properties and remove the action for leadselection.
    2)If you still want to continue with your leadselect action, then what you can do is.. write the code in leadselection action to again set the input fields which are out from table.  That is what you did in your init method.
    Page Refreshing
    3) What do you mean by page refreshing? is that refreshing your table only or both the table and input fields. 
         What I understood is you are allowing the user to enter values in table and soon after pressing a button the values should be saved and the data in input fields shld be deleted.  For this if you only invalidate the node then the user entered data will be lost. 
    So what you do is after getting the input data from the user add it to a ArrayList and then invalidate the node which clears the data in input field. Finally bind the Arraylist to your node.  see the following code. This is a concept make changes according to your requirement
    ArrayList list1=new ArrayList();
    wdContext.nodeAbc().bind(list1);
    IPrivateExcelviw.IAbcElement ele = wdContext.createAbcElement();
      ele.setNo(wdContext.currentAbcElement().getNo());
      ele.setName(wdContext.currentAbcElement().getName());
      ele.setMarks(wdContext.currentAbcElement().getMarks());
      list1.add(ele);
      wdContext.nodeAbc().invalidate();
    wdContext.nodeAbc().bind(list1);
    Revert me if you have any doubts
    Regards
    Raghu
    Edited by: Raghunandan Madarikuruva on Oct 16, 2008 8:07 AM

  • Table control line selection issue

    HI im facing a problem in table control.
    I have a table control with selection column ( single ).
    First time when i select a row its is marked X in the internal table,
    Now again when i select another row .. The old row still holds the value X and the new row is gettign marked as X.
    The problem here is the old selection is not getting cleared in the internal table.
    This is the statement used in PAI
    MODIFY gt_header INDEX tbl_header-current_line FROM wa_header .
    Here the previous value is not getting cleared.

    KSD,
    During PAI Loop, the screen flow logic loops only through the visible table control lines. In your case, the user has scrolled down and seeing line 30 to 40 (say for example) after selecting a line in first page view. This is very common with any table control.
    Now user is viewing 1 to 10 lines of the TC and have selected 3rd line. User then scrolls down by pressing page-down - now PAI is triggered and the internal table's 3rd line is modified with MARK='X'. User then views lines 30 to 40 and selects 33rd line. Now table control will automatically clear the MARK in 3rd line in the Table Control only. But it is the responsibility of the developer written code to clear the same in the Internal Table.
    So within PAI Table Loop, you have to check the MARK which is coming from Screen to ABAP program every-time and if it is 'X', you have to clear any other line's MARK. Remeber you should not do this for multi-select. There is an attribute of the table control LINE_SEL_MODE. The above logic of clearing other lines' MARK should be implemented only after checking this attribute.
    So incidentally your solution was the appropriate one.
    Cheers,
    Suresh

  • WDABAP: note of change of Lead Selection overall component

    Hi,
    I would like to build a similiar wd-application like wd-component 'wdt_master_detail'. There you will see a table with fly-data and below some details of the actual selected row of the table (by lead selection).
    The difference is that I want to seperate the data retrieval in a model-component(z_model) and for the table / details two seperate wd-components(z_table / z_detail) which mapps the fly-data. The wd-application instantiate a wd-component (z_container) which includes in its view z_table and z_detail.
    When the lead selection changes(by selecting a new row in the table of z_table) the details of z_detail should change to the details of the element with the lead selection. But this does not work! By node->get_lead_selection_index in z_detail I get only the inital lead-selection. node->get_lead_selection_index in z_table provides the right index.
    I tried also following: z_table calls z_model->set_lead_selection and this method set the lead selection of the original node new. But this does not help.
    Has someone an idee what I have to do that the component z_detail receive the information? Has the z_model to raise an event with the information of the new index? I hope not.
    Thanks a lot!
    Regards,
    Marcel
    added 1:
    I have an assumption why it does not work:
    Maybe z_table and z_detail instantiates two separate z_model.
    So a solution would be that z_container instantiates z_model and provide this instance to z_table and z_detail but I have absolutly no idee whether and how this could be working... Please kindly help.
    added 2:
    I thinking further a little bit loud...
    I have the idea that z_container mapps the context from z_model and set this these to input-node.
    z_table and z_detail mapps from z_container. ok, if I would like to create many application then I have to create related components(z_comp_appl_xx) and these components includes z_container. This would be maybe the solution if there is a instance problem(see added1) but I have tested and the details screen gets NOT the lead selection
    Message was edited by: Marcel Schreier

    Hi Marcel,
    to extend Thomas comments, here are some suggestions to turn it into code. Hope it helps.
    option A)
    assuming you name the usages in z_container "usage_z_model", "usage_Z_table", "usage_Z_detail":
    in componentcontroller of z_container methode wddoinit() do the following:
    DATA lr_model_usage    TYPE REF TO    if_wd_component_usage.
    lr_model_usage =   wd_this->wd_cpuse_usage_z_model( ).
    IF lr_model_usage->has_active_component( ) IS INITIAL.
      lr_model_usage->create_component( ).
    ENDIF.
    DATA lr_usage    TYPE REF TO    if_wd_component_usage.
    lr_usage =   wd_this->wd_cpuse_usage_z_table( ).
    IF lr_usage->has_active_component( ) IS INITIAL.
      lr_usage->create_component( model_usage = lr_model_usage ).
    ENDIF.
    lr_usage =   wd_this->wd_cpuse_usage_z_detail( ).
    IF lr_usage->has_active_component( ) IS INITIAL.
      lr_usage->create_component( model_usage = lr_model_usage ).
    ENDIF.
    Following this way, it is required to name the usages of z_model in component z_table and z_detail "MODEL_USAGE".
    option B)
    in componentcontroller of z_table and z_detail create an interface-methode set_usage() with one parameter ir_usage type if_wd_component_usage
      DATA lr_usage  TYPE REF TO  if_wd_component_usage.
      lr_usage = wd_this->wd_cpuse_usage_z_model( ).
      lr_usage->enter_referencing_mode( ir_usage ).
    in component z_container method wddoinit() do the following:
    DATA lr_usage    TYPE REF TO    if_wd_component_usage.
    DATA lr_if_ctr_z_table TYPE REF TO iwci_z_table.
    DATA lr_if_ctr_z_detail TYPE REF TO iwci_z_detail.
    DATA lr_model_usage    TYPE REF TO    if_wd_component_usage.
    *-- create instance of z_model
    lr_model_usage =   wd_this->wd_cpuse_usage_z_model( ).
    IF lr_model_usage->has_active_component( ) IS INITIAL.
      lr_model_usage->create_component( ).
    ENDIF.
    *-- create instance of z_table
    lr_usage =   wd_this->wd_cpuse_usage_z_table( ).
    IF lr_usage->has_active_component( ) IS INITIAL.
      lr_usage->create_component( ).
    ENDIF.
    *-- set usage
    lr_if_ctr_z_table =   wd_this->wd_cpifc_usgae_z_table( ).
    lr_if_ctr_z_table->set_usage( model_usage = lr_usage).
    *-- create instance of z_deatil
    lr_usage =   wd_this->wd_cpuse_usage_z_detail( ).
    IF lr_usage->has_active_component( ) IS INITIAL.
      lr_usage->create_component( model_usage = lr_model_usage ).
    ENDIF.
    *-- set usage
    lr_if_ctr_z_detail =   wd_this->wd_cpifc_usage_z_detail( ).
    lr_if_ctr_z_detail->set_usage( model_usage = lr_usage).
    regards, Ulli

  • Power Query and multi-selection columns

    I have a power query pulling data from a sharepoint list some of the list columns allow multiple selections.
    The power query seems to only be pulling in one value instead of all the selected ones in the columns.
    Thanks,
    Eric

    Hi Eric,
    Just to add a bit more detail to what is going.
    In Power Query, SharePoint List columns with multiple selection choices are represented as nested tables with a single column called "Value". Each row of these nested tables will represent a selected choice for the list item. You can examine this by clicking
    on "Table" under the "Options" column on one of the rows.
    By clicking on the "Expand" icon of a column, you are making use of the Table.ExpandTableColumn function. That function will take each row in the table and do a cross product with the rows of the nested tables of the selected column. This means that each
    row will be duplicated as many times as there rows in the nested columns.
    In this specific case, each item in the SharePoint list will become duplicated as many times as there are selected choices for the item. This can be very useful in some cases, but I think that in your case this is not the operation that you're looking for.
    If you want to simply create a column that combines all the selected choices as a single text value, there's a simpler alternative to Alejandro's solution:
    = Table.AddColumn(RemovedColumns, "Options 2", each Text.Combine([Options][Value], ", "))
    You can simply paste the above as a blank step by clicking on the "Fx" icon next to the formula bar. Here we're creating a new column called "Options 2" that combines the text values in the "Value" column of the nested table of the Options column and separate
    each entry by ", ".
    -Tristan

  • How to write lead selection method for a  tree by nesting table column

    Hi,
    I have implemented a table with TreeByNestingTableColumn(To show the tree structure in the table).I am not able to get the selected row element in lead selection method.(I am able to get parent element.) .
    could anyone please tell me about this code?
    BR,
    Ashish

    Hi,
    Follow the below steps to the solution for your problem
    1. Create Action "LeadSelection" in View with parameter (name : 'seletedItem'
    and type : I<your node>Element
    2. Bind this action to Table property "onLeadSelec"
    3. In wdModify()
         IWDTable table = (IWDTable) view.getElement("Your table id");
         table.mappingOfOnLeadSelect().addSourceMapping("nodeElement", "selectedEle");
    4. In onActionLeadSelection()
         wdComponentAPI.getMessageManager().reportSuccess("Selected Item : "+selectedEle.get<Your Node Attribute>());
    Let me know if you need more clarification
    Thanks

  • How to delete the record in the table without using lead selection?

    hi,
    I have added the separate column "delete" to the table uielement and so for each record or row of the table the appropriate "delete" link to action will be there................the code below works when the particular row is selected through lead selection only.......
    help me how to delete without using lead selection.....
      DATA:
      NODE_MODULE                         TYPE REF TO IF_WD_CONTEXT_NODE,
      ELEM_MODULE                         TYPE REF TO IF_WD_CONTEXT_ELEMENT,
      STRU_MODULE                         TYPE IF_V_MODULE=>ELEMENT_MODULE .
       data itab TYPE TABLE OF zac_modules.
      navigate from <CONTEXT> to <MODULE> via lead selection
      NODE_MODULE = WD_CONTEXT->GET_CHILD_NODE( NAME = `MODULE` ).
      get element via lead selection
      ELEM_MODULE = NODE_MODULE->GET_ELEMENT(  ).
      get all declared attributes
      ELEM_MODULE->GET_STATIC_ATTRIBUTES(
        IMPORTING
          STATIC_ATTRIBUTES = STRU_MODULE ).
    NODE_MODULE->GET_STATIC_ATTRIBUTES_TABLE(
        IMPORTING
         TABLE  = itab )
    DELETE itab WHERE zmodule_id = STRU_MODULE-zmodule_id.
    CALL METHOD NODE_MODULE->BIND_TABLE
        EXPORTING
          NEW_ITEMS            = itab
       SET_INITIAL_ELEMENTS = ABAP_TRUE
       INDEX                =
    ENDMETHOD.

    Hi  ,
    The onclick event provides you with a standard paramater "CONTEXT_ELEMENT" which has the element from which the event is triggered.
    so you can declare this in the handler(if it is not there) and use it as follows.
    CONTEXT_ELEMENT  TYPE REF TO IF_WD_CONTEXT_ELEMENT  an importing paramater.
    DATA:
    NODE_MODULE TYPE REF TO IF_WD_CONTEXT_NODE,
    ELEM_MODULE TYPE REF TO IF_WD_CONTEXT_ELEMENT,
    STRU_MODULE TYPE IF_V_MODULE=>ELEMENT_MODULE .
    data itab TYPE TABLE OF zac_modules.
    CONTEXT_ELEMENT->GET_STATIC_ATTRIBUTES(
    IMPORTING
    STATIC_ATTRIBUTES = STRU_MODULE ). "Using the context_element paramater to get the static attributes.
    NODE_MODULE->GET_STATIC_ATTRIBUTES_TABLE(
    IMPORTING
    TABLE = itab )   "getting all the data.
    DELETE itab WHERE zmodule_id = STRU_MODULE-zmodule_id. "deleting the particular row from the table and binding it.
    CALL METHOD NODE_MODULE->BIND_TABLE
    EXPORTING
    NEW_ITEMS = itab
    * SET_INITIAL_ELEMENTS = ABAP_TRUE
    * INDEX =
    thanks,
    Aditya.

  • Problem with table cell editors - Dropdown by Index, getting lead selection

    Hi experts,
    I have a table editor with 5 columns
    1st column is a Drop Down byIndex.
    My contex looks like this
    AS_DATA(Parent Node cardinality 1.1, selection 0-1)
          HEADER (NODE)
          DETAILS(NODE cardinality 0..n, selection 0-1)
             ACTIVITY_TYPES (NODE cardinality 0..n selection 0-1 ) "node for drop down
             description - attribute
             unit
             quantity
    i have bound details node to table data source.
    i have a tool bar button 'Add Line item' which will add a new line item to the table.
    (i am adding a blank line to the table that is bound to table )
    Its working fine. but when ever i add more than one row, the selection made in the previous rows drop down is lost.
    its initializing. where could be the problem.
    My code
    data LO_ND_INV_TYPE type ref to IF_WD_CONTEXT_NODE.
      data LO_EL_INV_TYPE type ref to IF_WD_CONTEXT_ELEMENT.
      data LS_INV_TYPE type WD_THIS->ELEMENT_INV_TYPE.
      data LV_INV_TYPE type WD_THIS->ELEMENT_INV_TYPE-INV_TYPE.
      data LO_ND_DETAILS type ref to IF_WD_CONTEXT_NODE.
      data LT_DETAILS type WD_THIS->ELEMENTS_DETAILS.
      data LS_DETAILS like line of LT_DETAILS.
      data:  WD_NODE type ref to IF_WD_CONTEXT_NODE,
            LR_ELEMENT type ref to IF_WD_CONTEXT_ELEMENT.
      data LO_ND_INV_PATTERN type ref to IF_WD_CONTEXT_NODE.
      data LO_EL_INV_PATTERN type ref to IF_WD_CONTEXT_ELEMENT.
      data LS_INV_PATTERN type WD_THIS->ELEMENT_INV_PATTERN.
      data LV_INV_PAT type WD_THIS->ELEMENT_INV_PATTERN-INV_TYPE.
      data LO_ND_ACTIVITY_TYPES type ref to IF_WD_CONTEXT_NODE.
      data LT_ACTIVITY_TYPES type WD_THIS->ELEMENTS_ACTIVITY_TYPES.
      data LW_ACTIVITY_TYPES type WD_THIS->ELEMENT_ACTIVITY_TYPES.
        data LO_EL_ACTIVITY_TYPES type ref to IF_WD_CONTEXT_ELEMENT.
    *     navigate from <CONTEXT> to <DETAILS> via lead selection
        LO_ND_DETAILS = WD_CONTEXT->PATH_GET_NODE( PATH = `AS_DATA.DETAILS` ).
        LO_ND_DETAILS->GET_STATIC_ATTRIBUTES_TABLE(
          importing TABLE = LT_DETAILS ).
    * Append an empty row to lt_details
        append LS_DETAILS to LT_DETAILS.
        LO_ND_DETAILS->BIND_TABLE(
        NEW_ITEMS = LT_DETAILS ).
    * Get values for dropdown
    call method WD_ASSIST->GET_ACTIVITY_TYPE
          exporting
            I_INV_CAT_ID     = LV_INV_PAT
          importing
            ET_ACTIVITY_TYPE = LT_ACTIVITY_TYPES.
        LW_ACTIVITY_TYPES-ID = 'Select a Activity type'.
        LW_ACTIVITY_TYPES-TEXT = 'Select a Activity type'.
        insert LW_ACTIVITY_TYPES into LT_ACTIVITY_TYPES index 1.
        loop at LT_DETAILS into LS_DETAILS.
          LV_TABIX = SY-TABIX.
          LR_ELEMENT = LO_ND_DETAILS->GET_ELEMENT( LV_TABIX ).
          WD_NODE = LR_ELEMENT->GET_CHILD_NODE( 'ACTIVITY_TYPES' ).
    *lv_index = wd_node->get_lead_selection_index( ). " it is dumping at this statement when i try to get lead selection
          WD_NODE->BIND_TABLE( NEW_ITEMS =  LT_ACTIVITY_TYPES ). " data for dropdown
        endloop.
    any clue on what am i missing will be appreciated.
    I am getting dump when i try to get the lead selection
    Ajay

    You only have only one option in the DDI to display in the example. when you have multiple values
    i assume that by adding an empty row like this will lose the SELECTION MADE in DDI. (Correct me If i am wrong)
    somehow i believe that we need to bind the DD values using  SET LEAD SELECTION INDEX METHOD FOR THE DDI when they are already selected and trying to BIND.
    *LO_ND_DETAILS->GET_STATIC_ATTRIBUTES_TABLE(*
          *importing TABLE = LT_DETAILS ).*
    ** Append an empty row to lt_details*
        *append LS_DETAILS to LT_DETAILS.*
        *LO_ND_DETAILS->BIND_TABLE(*
        *NEW_ITEMS = LT_DETAILS ).*
    even though the above code will have the selected value, the SELECTIONS MADE will be initialize.
    you need to bind it explicitly.
    you have to create an element and bind the DDI values for adding an row as SARAVANAN said.
    or i guess you can continue with you code but need to use SET LEAD to display the correct SELECTIONS MADE
    loop at LT_DETAILS into LS_DETAILS.
          LV_TABIX = SY-TABIX.
          LR_ELEMENT = LO_ND_DETAILS->GET_ELEMENT( LV_TABIX ).
          WD_NODE = LR_ELEMENT->GET_CHILD_NODE( 'ACTIVITY_TYPES' ).
          WD_NODE->BIND_TABLE( NEW_ITEMS =  LT_ACTIVITY_TYPES ). " data for dropdown
    *" try to set the desired value in the DDI when you have multiple values using SET LEAD*
        endloop.

  • How to display only selected columns in the table on the tableview

    Hi All,
    I am displaying in the below tableview the data from the SFLIGHTS tables in the tableview using flow logic. It displays all the columns in the database table. How can I set in the code to display only selected columns and not all columns.
    Also, in these columns displayed I want to make the key columns of SFLIGHT as non editable and the rest of the columns in SFLIGHT editiable. Can you please kindly share the code to implement this.
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page>
        <htmlb:form>
          <htmlb:tableView id              = "tv1"
                           visibleRowCount = "10"
                           selectionMode   = "lineEdit"
                           table           = "<%= flights %>"
                           filter = "SERVER"
                           sort = "server"
                           iterator        = "<%= iterator %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Thanks
    Karen

    Hi,
       Please try this code.
    <!-- To display Table control on BSP page with table internal table it_hist  --!>
              <htmlb:tableView id              = "TV_HIST"
                               headerText      = "Previous History"
                               headerVisible   = "TRUE"
                               footerVisible   = "TRUE"
                               design          = "ALTERNATING"
                               selectionMode   = "LINEEDIT"
                               visibleRowCount = "5"
                               fillUpEmptyRows = "TRUE"
                               table           = "<%= it_hist %>"
                               width           = "500" >
    <!--  to show selected columns give required field name --!>
    <htmlb:tableViewColumns>
      <htmlb:tableViewColumn columnName          = "FIELD1"
                                         title               = "COLUMN1"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
      <htmlb:tableViewColumn columnName          = "FIELD2"
                                         title               = "COLUMN2"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
      <htmlb:tableViewColumn columnName          = "FIELD3"
                                         title               = "COLUMN3"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
      <htmlb:tableViewColumn columnName          = "FIELD4"
                                         title               = "COLUMN4"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
    <!--  to make column editable set edit property to TRUE --!>
      <htmlb:tableViewColumn columnName          = "FIELD4"
                                         title               = "COLUMN4"
                                         edit = "TRUE"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
                </htmlb:tableViewColumns>
              </htmlb:tableView>

  • Disable Lead selection for table row cloumn

    HI Team,
    I have table with multiple rows and multiple columns.
    Based on the lead selection of the row we are displaying the some form.
    But in table row there are some columns like enter date, when the user is trying to enter the date, it displaying the form because of lead selection and it is not allowing the user to enter the date.
    So, I want disable the lead selection for some columns.
    How can I do this?
    Regards,
    BAla

    Hi
    I think that you can get  the UI Table in the wdDoModifyView method, and then the UI Column and play with his values, is something like this:
    IWDTable table =(IWDTable)view.getElement( ");
    And then play with the "column" methods.
    Josué Cruz

  • Problems sorting larger sets of XMLType columns/tables

    Hi,
    Here's something I tried to wrap my head around:
    I'm using Oracle 11g r1 for Windows Server 2003.
    I've imported a fairly large set of XML files into a temporary XMLType table. Now
    I want to sort the contents of the table and put them into another table which
    uses a sequence to get primary keys (would be a longer story to explain, basically
    sorting by this non-XML primary key is super-fast as opposed to everything else
    I've tried, plus I need something unique):
    INSERT INTO realtable SELECT 0, object_value
    FROM tmptable ORDER BY extractValue(object_value, '/some/*/field');It works fine for a very small number of rows but when I tried with about 30000 rows,
    still not too much, two kinds of things can happen. Either, Oracle gobbles up a huge amount
    of memory (>1,5GB) until the statement breaks:
    ORA-04030: Zu wenig Prozessspeicher fⁿr Versuch 33292 Bytes zuzuweisen
    (callheap,kllcqgf:kllsltba)Or I get something like this:
    ORA-00600: Interner Fehlercode, Argumente: [kqludp2], [0x1F31EC94], [0], [], [], [], [], []I haven't wasted too much time looking into this. I tried storage options clob and binary xml
    for tmptable. Clob seems to induce the latter problem and binary xml the former but I haven't
    made further experiments.
    I can create a workaround from outside Oracle I think, so it's not serious however I'd would
    be interesting to know what happened or if there is a better way to do this.
    Thanks!

    Unfortunately, the problems are not reproducible in a meaningful way. All I can say is that once a statement will result in a kqludp2, it will always fail with the exactly same error message until I reinstall the database from scratch. On the other
    side, when I found a configuration that works, I could delete and rebuild/refill a table multiple times without the thing ever breaking.
    As the most recent example, after the latest trouble I deleted the database and changed my DDL scripts to the last configuration I wanted to try and broke the last time (several tables with two normal columns and an XMLType column each), everything worked like a breeze.
    I can file a TAR when I get a support ID from my employer, however I installed the database on a virtual machine (I should have mentioned that earlier) and Oracle doesn't officially support that configuration from what I know so I'll doubt they'll do anything about it. I've procured a physical computer now and try to reproduce any of the problems when I get to it.

Maybe you are looking for