Problem sorting the table .

hi
iam trying to sort the table in ascending
and descending order ,
but  iam not able to sort my model node  table .
below is the code i have written
and other thing i have created a class called Tablesorter.java
and  copied the code of the TableSorter present in
  IDE\eclipse\examples   as  i was not able to copy and
paste the TableSorter Class  ,  in the 
  src\pkg.
import com.sap.tc.webdynpro.tests.utils.TableSorter;
if(firstTime)
           view.nowCreateAllCustomExtensionFields();
      IWDTable tab= (IWDTable)view.getElement("Table");
      wdContext.currentContextElement().setCustomerTableSorter(new TableSorter(tab,wdThis.wdGetTableSortAction(),null,new String[] {"Customers") ));     
in the above coding i am getting error as  Constructor TableSorter  is undefined.
wdContext.currentContextElement().getCustomerTableSorter().sort(wdEvent,wdContext.nodeCustomers());
can any one help me out ?

hi
thanks for the response 
    i cannot copy the model node data to the value node 
   as  i am performing some operations in the itemlistbox
  and then populating the model node  table  
and there will be  thousands of  data  , so copying
the data to the value node will affect the performance
  and other thing is i have one more table of model node
where i have to perform sorting  , so is there a way
that TABLESORTING  can be directly performed on the
model node ,  i have to perform ascending and descending order  sorting on the two tables w.r.t the columns 
can any one help me out ?

Similar Messages

  • How To Sort the Table Through Push Buttons (ASC & Desc)???

    Hi,
    I am facing a problem with regard to 'Push Buttons' that I have created on
    my Form. I want the 'Push Button' to sort the table with respect to a
    specific column in 'Ascending order' on first push and then in 'Descending
    order' on second push and then again in 'Ascending order' on third push and so
    on...
    please help me to achieve this
    regards,
    .

    Hello,
    You could try something like this:
    Declare
         LC$Order Varchar2(128) := Get_Block_Property( 'EMP', ORDER_BY ) ;
    Begin
         If Instr( LC$Order, 'DESC' ) > 1 Then
               Set_Block_Property( 'EMP', ORDER_BY, 'EMPNO ASC' ) ;
         Else
               Set_Block_Property( 'EMP', ORDER_BY, 'EMPNO DESC' ) ;
         End if ;
         Execute_Query ;
    End ;     Francois

  • Problem with the table control BDC in FV60 transaction

    Hi All,
    I got the problem with the table control in FV60 transaction.
    This is working for 900 line items.After 900 line items it is giving the problem like it is 1000th line item.You can post only 999 line items.
    I know we can post only 999 line items,but in my file only 920 line items.
    Please give me solution,if anybody come across this situation.
    Thanks & regards,
    rakesh.

    Hello Rakesh ,
    your file may have only 920 line items , but based on those line items, SAP may create few more  new lines ( based on the clearing recon accounts , inter company transaction ...etc )...
    regards
    Prabhu

  • Sorting the table

    Dear Guru's
      Can you please advice me how I can sort the table data in Adobe Interactive form.
    Thanks!
    Surya.

    Hi,
    In the context area , Double click on the table.
    In the bottom area u can see the properties tab....
    In that go to control levels tab where u cna set the sorting on the basis of a particular field.
    Please let me know if you find any issue.
    Regards,
    sasi

  • Problem with the table view's _visibleBounds when used on a scroll view

    I've had numerous problems with getting a table view to work on a scroll view since the table view keeps resizing (http://discussions.apple.com/thread.jspa?threadID=2618816&tstart=0)
    I have created the views in IB. The scroll view is attached to the controller's view, and is assigned as the controller's view. The frame size of the scroll view is 320x436. I am manually setting the content size in code:
    UIScrollView* tempScrollView = (UIScrollView*) self.view;
    tempScrollView.contentSize = CGSizeMake(320, 720);
    The table view's frame's width/height is set to 280x88 in IB (i.e the size of two cells), and the header and footer are set to size 0.
    However, when I run the code, the table view is smaller, it is only 280x68. I have looked in the debugger, and the table view's _contentSize (of its scroll view) is 280x88; however, the _visibleBounds property is 280x68.
    I've tried looking into the documentation for the UITableView class, but can't find anything on the _visibleBounds property, or where it is being set and how to force it to the correct size.
    If anybody has any advice, I'd appreciate it.

    I can get around this problem by going to the scrollview which the tableview belongs to, and unchecking the Autoresize Subviews box.
    But if anybody knows about the _visibleBounds property, or the rules which are applied when resizing subviews, I'd be interested.

  • Problem getting the Table Data with the selection listener

    Hi All,
    I am working on a tree and table components. I wrote a logic in the backing bean in such a way that when I expand a node the child nodes for the tree are getting added dynamically and also getting the data in the table for the node expanded in the tree using the same Toplink Query . I added the selection listener for the table and when I am selecting a row in the table I am getting the Null Pointer Exception as the RowKeySet Value for the row selected is coming null.
    Can any one please help me out with this problem
    I will be very thankful
    Regards,
    Madhavi.

    Hi All,
    I am working on a tree and table components. I wrote a logic in the backing bean in such a way that when I expand a node the child nodes for the tree are getting added dynamically and also getting the data in the table for the node expanded in the tree using the same Toplink Query . I added the selection listener for the table and when I am selecting a row in the table I am getting the Null Pointer Exception as the RowKeySet Value for the row selected is coming null.
    Can any one please help me out with this problem
    I will be very thankful
    Regards,
    Madhavi.

  • Problems with the table of lock is fills

    Hello all
    In my system in occasions repeated, the table of lock it is fills
    Per this problem, I did open the message with SAP and in this message the sap support, I replied that increase the  parameter value  "enque/table_size" at 200 MB, this is the value for 200 MB (202752)
    With the parameters implemented in my system, the table of lock to a is fills, this is not resolved my problem and continuos.
    Other comment is that the value maximun is 200 MB for this lock table.
    I think the problem is in the programs that executed this lock, when is executed some programs that sent the information at my stores, is when the lock table fills.

    Thaks for you answer
    Already enters in the transaction SM12 and see the registers in this table
    with this information, I found the users that added lock in the system and the system table the which is locked.
    But with this information, how can know few registers are locked per users in the SM12 and top file and history alone display this information
    300  PRODUCCION1  30.11.2010  U 11/30  Nr_of_Locks:    4960  Scope:  2   0     4,960
    300  PRODUCCION    30.11.2010  U 11/30 Nr_of_Locks:     5000  Scope:  2   0     5,000
    300  PRODUCCION1   30.11.2010  U 11/30 Nr_of_Locks:     4918  Scope:  2   0     4,918
    300  PRODUCCION1   30.11.2010  U 11/30 Nr_of_Locks:     4956  Scope:  2   0     4,956
    300  PRODUCCION     30.11.2010  U 11/30 Nr_of_Locks:     5020  Scope:  2   0     5,020
    300  PRODUCCION1   01.12.2010  U  12/01 Nr_of_Locks:     4911  Scope:  2  0     4,911
    300  PRODUCCION1  01.12.2010  U  12/01 Nr_of_Locks:     5014  Scope:  2  0     5,014
    300  PRODUCCION1   01.12.2010  U  12/01 Nr_of_Locks:     4939  Scope:  2 0     4,939
    300  PRODUCCION1   01.12.2010  U  12/01 Nr_of_Locks:      190  Scope:  1 0      190     
    300  PRODUCCION1   01.12.2010   U  12/01 Nr_of_Locks:      191  Scope:  2 0     191
    300  PRODUCCION1   01.12.2010   U  12/01 Nr_of_Locks:     4775  Scope:  2 0     4,775
    300  PRODUCCION1   01.12.2010   U  12/01 Nr_of_Locks:     5022  Scope:  2 0     5,022
    For my is important know which is the number of locks of this user,this I would give me an idea more clear the problem.

  • Problem in the table maintainance generator of View J_3RFV_F4VERS

    Hi All,
    I have a problem with View J_3RFV_F4VERS (SAP standard table for Russia).
    Currently i am not able to change the entries in this View through SM30. Currently in the Table maintainance generator of this view "Standard recording Routine" is selected as Recording Routine.
    But when i change this to "no, or user, recording Routine", i am able to change the entries of this view through SM30.
    I would like to know the impact of selecting the alternative Recording Routine. Will it have any adverse impact?
    Please throw some light on this issue.
    Regards,
    Navin.

    Use Events in Table Maintainence Generator.
    Environment-->Modification --> Events
    U can write a subroutine which can be called to increment the numbers .

  • Sorting the table records based on date (stored as string in the database)

    Iam storing the date as string(varchar2) in the database.
    Date format: DD-MMM-YYYY hh:mm:ss am/pm
    example: 12-MAY-1984 11:12:45 AM
    now i have to sort the records in such a way that recent records should be displayed first, then past records.
    i need help reagrding

    Step one: Select from the table
    Step two: Convert the string to a date
    Step three. Order on this converted date descending (= recenct records first)

  • Problem in the Table view of VC model

    Hi all,
    We have a created a table view using the BI query as source.
    the table view has say 4 fields (Serial NO., Plant key, Material and Quantity) initially before submitting the parameters, once we enter some parameters and press submit button some extra fields are getting added at the end of the existing fields.
    i.e the final result is Serial NO., Plant key, Material and Quantity, Plant, Material, Quantity. last 3 fields are undesired.
    This is happening only when we select few fields in the define / Test Query setting (we are doing this to avoid unwanted fields while exporting data to excel).
    Is there a way to avoid this addition of extra fields in the table view.
    any help is highly appreciated.
    regards,
    Rk.

    Hi
    Are you getting these extra columns in 'Table' or while executing 'Define / Test Query'?
    If you are getting this in table then dont select anything while dragging the table from query. (When the systems ask to select the fields) Select the fields after creating the table & then see what is happening.
    Regards
    Sandeep

  • Problem with the table that goes on next page

    Hi all,
    In my template there is a table that stores detail information. The table property is set to display in box format meaning only the border and not grid. Also I have used <?if:position() mod 10 =0?><xsl:attribute name="break-before">page</xsl:attribute> to display only 10 rows per page. now if there are say 15 rows for detail then the remaining 5 lines are correctly printed in next page, but the table in first page is not displayed in box format.
    If needed I can provide you with the xml and template.
    Thanks in advance.
    Suresh

    quick work around
    put this table in another table
    give the box format for outer table,none for inner.

  • Проблема с оглавлением/The problem with the table of contents

    Добрый день, я использую Pages 5.5.2 и при создании оглавления у меня возникла проблема: Если поставить фильтр по заголовкам, а не использовать все, как предлагается в начале, то гиперссылки в нумерации обновлении сбиваются.
    Например: Заголовок 1       страница 1
                       Заголовок 2       страница 2
                       Заголовок 3       страница 3
                       Заголовок 1       страница 4
                       Заголовок 2       страница 5
                       Заголовок 3       страница 6 
                       Заголовок 1       страница 7
                       Заголовок 2       страница 8
                       Заголовок 3       страница 9
    это изначальный вариант, требующий форматирования, так все работает, но если отфильтровать ненужные стили заголовков, то результат будет таким:
                       Заголовок 1       страница 1 - при нажатии отправляет на страницу 1
                       Заголовок 1       страница 4 - при нажатии отправляет на страницу 2
                       Заголовок 1       страница 9 - при нажатии отправляет на страницу 3
    Скажите пожалуйста, как это исправить?
    Please tell me how to fix it?

    Courtesy of Google I can translate for you in hopes someone else will assist you, Nikita.  There are many experienced Pages users here.
    Hello, I use Pages 5.5.2 and when creating a table of contents I have a problem: If you put a filter on the title, and not to use everything as suggested in the beginning, the hyperlinks in the numbering update astray.
    For example: Title 1 page 1
                        Heading 2, page 2
                        Heading 3 Page 3
                        Heading 1 Page 4
                        Heading 2, page 5
                        Title 3 Page 6
                        Heading 1 Page 7
                        Heading 2 Page 8
                        Heading 3 Page 9
    this is the original version, which requires formatting, so it works, but if you filter out unneeded heading styles, the result will be:
                        Heading 1 Page 1 - when you send a page 1
                        Heading 1 Page 4 - when you send to the page 2
                        Heading 1 Page 9 - when you send a page 3
    Please tell me how to fix it?

  • Sort the table values in asc or desc

    I have a table named date_table contains two columns (Term,multiplier) with values given below
    Term Multiplier
    1 M
    2 M
    8 Y
    15 D
    2 Y
    24 M
    1800 D
    Values given above are term and multipiler.Means 1 M stands 1 month,15 D stands for 15 Days 2 Y stands for 2years. I need a query to select this values in asc or desc order as given below
    Term Multiplier
    15 D
    1 M
    2 M
    24 M
    2 Y
    1800 D
    8 Y

    As others have mentioned, there isn't a fixed number of days in a month or a year so it would be incorrect to assume 28, 30 or 31 days in a month or that there are 365 days in a year (as leap years have 366).
    The truest way to determine it is to calculate it using proper date functionality around a base date e.g. you could calculate it from todays date...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 1 as term, 'M' as multiplier from dual union all
      2             select 2, 'M' from dual union all
      3             select 8, 'Y' from dual union all
      4             select 15, 'D' from dual union all
      5             select 2, 'Y' from dual union all
      6             select 24, 'M' from dual union all
      7             select 1800, 'D' from dual)
      8  --
      9  select term, multiplier
    10  from t
    11  order by case multiplier when 'D' then sysdate+term
    12                           when 'M' then add_months(sysdate,term)
    13                           else add_months(sysdate,12*term)
    14*          end
    SQL> /
          TERM M
            15 D
             1 M
             2 M
             2 Y
            24 M
          1800 D
             8 Y
    7 rows selected.
    SQL>This way, oracle will accurately work out the date offsets taking into account the number of days in each month and leap years.

  • Sort the Valuenode records in table

    Hi Experts,
    Following is the code I wore to retrive and display Portal roles in a table. The context maintained is as follows and got the results properly. I want to know how to sort the table values by Role_Name?. Could some one help me?
    [Value node]      Role_table
    [Value Attribute] RoleID
    [Value Attribute] Role_Name
    [Value Attribute] PCD_Location
    //Retrive the roles from the Role factory          
    String[] theroles = rolefact.getRolesOfUser(unique_id,true);
    for(int i=0; i<theroles.length; i++ )
    //Retrive user attributes and add to the context attribute values     
    String roleid = rolefact.getRole(theroles<i>).getDisplayName();          
    String rolename = rolefact.getRole(theroles<i>).getDescription();
    String role_desc = rolefact.getRole(theroles<i>).getUniqueName();
    IPrivateUserView.IRole_tableElement rowelement = wdContext.createRole_tableElement();
    rowelement.setAttributeValue("RoleID",roleid);
    rowelement.setAttributeValue("Role_Name",rolename);
    rowelement.setAttributeValue("PCD_Location",role_desc);
    //Append the roles obtained and bind to the rolenode
    al.add(rowelement);
    wdContext.nodeRole_table().bind(al);
    Please help me with some code on how to sort the value node table?. I promise to award the points for the right solution. I appreciate coding help.
    Thank you
    Regards
    Maruti

    Hi Maruti,
    1. Get the size of the node, save it in a variable say <b>si</b>
    int si = wdContext.nodeRole_table().size();
    2. Iterate as follows
    for(int i=0;i<si;i++)   
         for(int j=i+1;j<si;j++)
             if(wdContext.nodeRole_table().getRole_tableElementAt(i).getAttributeAsText("Role_Name").compareToIgnoreCase(wdContext.nodeRole_table().getRole_tableElementAt(j).getAttributeAsText("Role_Name"))<0)
             wdContext.nodeRole_table().swapElements(i,j);
    Regards,
    Mathan MP

  • Unable to sort the records of a table

    Hi Experts,
    I have populated one z table with records. The table coloumns are as below:
    Mandt
    Pernr
    Personnel Area
    Total Points
    Rank
    I have to sort the table records in descending order of Total Points. In many cases there will be same total points for many records. In such cases we have to arrange records in following fashion:
    If more than 1 person have same total points then person having more years of service will have higher rank
    If more than 1 person have same total points and same years of service then older people (date of birth) will have higher rank.
    I have written following program. It is not working. Please help me. If you have some ready made code, please share with me.
    Regards,
    Gary
    IF NOT itab_prio[] IS INITIAL.
          CLEAR v_index.
          v_index = 1.
          SORT itab_prio BY z_prio_pts DESCENDING .
          itab_rank[] = itab_prio[].
          LOOP AT itab_prio.
    *---Check eligibility.
            CALL FUNCTION 'zmy_prg_CHECK_ELIGIBILITY'
              EXPORTING
                pernr  = itab_prio-z_pernr
              IMPORTING
                return = return.
            IF return-type = 'E'.
              itab_prio-z_prio_pts = 0.
              itab_prio-z_prio = 0.
              MODIFY itab_prio TRANSPORTING z_prio_pts z_prio.
            ELSE.
              LOOP AT itab_rank WHERE z_prio_pts = itab_prio-z_prio_pts
                                AND   z_pernr    NE itab_prio-z_pernr.
    *---Get Hiring date for same rank.
                CALL FUNCTION 'zmy_prg_GET_EMP_HIRING_DATE'
                  EXPORTING
                    pernr       = itab_rank-z_pernr
                  IMPORTING
                    hiring_date = hire_new.
    *---Get Hiring date of update emp.
                CALL FUNCTION 'zmy_prg_GET_EMP_HIRING_DATE'
                  EXPORTING
                    pernr       = itab_prio-z_pernr
                  IMPORTING
                    hiring_date = hire_old.
                IF hire_old = hire_new.
    *---Check for Birth date of both employees.
                  READ TABLE it_date WITH KEY  pernr = itab_rank-z_pernr.
                  IF sy-subrc = 0.
                    hijri_new = it_date-zzhdob.
                  ENDIF.
                  READ TABLE it_date WITH KEY  pernr = itab_prio-z_pernr.
                  IF sy-subrc = 0.
                    hijri_old = it_date-zzhdob.
                  ENDIF.
                  IF hijri_old > hijri_new.
                    flag = 'X'.
                  ENDIF.
                ENDIF.
              ENDLOOP.
              IF flag NE 'X'.
                itab_prio-z_prio = v_index.
                v_index = v_index + 1.
                MODIFY itab_prio TRANSPORTING z_prio.
              ELSE.
                itab_prio-z_prio = v_index.
                v_index = v_index + 1.
                MODIFY itab_prio TRANSPORTING z_prio.
              ENDIF.
            ENDIF.
            CLEAR : flag , return.
          ENDLOOP.
          MODIFY zhop_priority_pt FROM TABLE itab_prio.
          COMMIT WORK.
          IF sy-subrc = 0.
            MESSAGE i000(zz) WITH 'sucessfully generated'.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.
    Please use code tags to format your code
    Edited by: Rob Burbank on Sep 29, 2010 1:59 PM

    Gary,
    Firstly, to make things easier, I suggest you add service and age columns to your internal table.
    Mandt
    Pernr
    Personnel Area
    Total Points
    Service
    Age
    Rank
    Does your internal table itab_prio contain large number of rows? Is the code that determines service and age performance intensive? If the answer is 'NO', then I suggest you populate service and age for every row and sort. This will make the logic simple and easy to maintain.
    If you must query service and age only when there is a conflict, then following logic should help.
    - itab_prio_copy[] = itab_prio[].
    - Loop at itab_prio.
    -   l_next_row = sy-tabix + 1.
    -   read table itab_prio_copy index l_next_row.
    -   are points same?
    -     get service for both the employees.
    -     is the service same for both?
    -       get age for both.
    -    rank accordingly
    - endloop.
    I know I have skipped a lot of gotcha points. For example, how to handle the last row, how to update the rank to the next row, etc. I am sure you can figure that out.
    Good luck.

Maybe you are looking for