ALV after sorting modifying problem

Hi all,
I use ALV with function.On ALV output when i sort output for some field ITAB was not modify new index key. Forexample,
Record before sorting index key 10, then after sorting it was same 10. How can i solve this problem?
Best regards,
Munur

Hi Munur,
if you want to see the same thing after sorting on the grid, save it in a layout.
or else before displaying the grid , sort the itab contents and push them on to alv.
Thanks & regards,
Sasi Kanth.

Similar Messages

  • Reading a ALV after sorting

    Hi all,
           I have a Alv grid display.After the ouput is shown
    suppose i have it ascending or descending.Now i want to get the sorted alv into my internal table .Bcoz when i double click a particular row it goes to the next screen with the contents of that particular line.Does any one know how to do that here i am using OOPS Alv.
    regards
    Ahasan

    Hi,
    You cannot directly get the SORTED table, but you get the SORT info and do the SORTING yourself, so that the internal table will be the same as that of the display.
    The method get_frontend_layout will give you the layout info and the method <b> GET_SORT_CRITERIA </b>, will give you the sort criteria applied by the user.
    The table parameter ET_SORT will have the name of the fields sorted. Then what you can do is
    SORT itab BY (FIELDNAME). FIELDNAME is from the ET_SORT table.
    Regards,
    Ravi
    Note : Please mark the helpful answers.

  • Subtotal in alv after sort

    i have six fields,
       based upon the sorting of all 5 fields, i should get the subtotal for sixth field in the alv list report(i have used func module alv_list_display').
    How can I set the sorting sequence in IT_SORT?
    and display the sub-total.

    Hai
    Go through the following Example Code
    Refer to this similar thread.
    alv Display :Total and subtotal
    for sub totals you have to use
    sort table.
    sort-fieldname = 'VBELN'.
    sort-tabname = 'ITAB'.
    sort-up = 'X'.
    sort-subtot = 'X'.
    append sort to it_sort.
    Or
    Define SORT table and FIELDCATALOG table .
    Data :i_field type slis_t_fieldcat_alv,
    w_field like line of i_field,
    i_sort type slis_t_sortinfo_alv,
    w_sort like line of i_sort.
    2.Grand Total
    While buildingfieldcatalog,We have to set DO_SUM = 'X' for quantity field .
    ex.
    w_field-fieldname = 'MENGE'.
    w_field-tabname = 'I_TAB'.
    w_field-DO_SUM = 'X'.
    append w_field to i_field.
    clear w_field.
    3.Subtotal
    Whenever WERKS is changed Subtotal is displayed .
    Build sort table .
    Clear: w_sort,i_sort[].
    w_sort-spos = 1.
    w_sort-fieldname = 'WERKS'.
    w_sort-up = 'X'.
    w_sort-subtot = 'X'.
    append w_sort to i_sort.
    clear w_sort.
    4.
    Pass this I_SORT table thru REUSE_ALV_LIST_DISPLAY function module ..like fieldcatalog table.
    Or
    For sub totals you need to sort and pass the sort table to FM.
    But for total you need to pass to field catalog like below
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.       "Display column total
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
    Thanks & regards
    Sreeni

  • ALV - Editing a Row after Sorting  - REAL HEADACHE.....

    Hi,
    I have a ALV table with a DropDown in one of the columns. The user can enter a value in the dropdown boxes.
    Now the proble is, lets say I have SORTED the table by another column. Now the user enters a value in one of the rows of the dropdown and clicks the SAVE Button.
    How do i find out, which Row the User Has entered the value ?
    I tried using the table it_modified_cells in the event handler for ON_DATA_CHECK . However it gives wrong row indexes, that is if, the row number '10' is Row number '1', after sorting, and if this row is modified, then it_modified_cells table gives Row '1' as modified rather than Row '10'.
    So ina  nut shell, after sorting , if a row is edited, How to find out which is this row...... ?

    Nithya,
    Look at this thread of mine....
    Re: ALV - Lead Selection of Node When FILTERS ACTIVE
    I had this issue when after filtering in ALV Table, th e bound Node wtill held original records......
    So is it something likeSORTING Updates the context,,,,,FILTERING does not ?
    Thanks
    Anand

  • Field should not display in the subtotal row in ALV report after sorting .

    we have a requirement, after sorting and subtotaling, the output in ALV is -
    vbeln        amount1  amount2  amount3
    123           11              12            13
    123           12             13             14
    123           23             25             27 
    133           11              12            13
    133           12             13             14
    133           23             25             27
    Now the customer wants the ALV outpput in this fashion -
    123           11              12            13
    123           12             13             14
                     23             25             27    --->123 (vbeln) should not come in subtotaling row
    133           11              12            13
    133           12             13             14
                      23             25             27--->133(vbeln) should not come in subtotaling row

    Hi,
    if it helps you could create a hierachy. In this way you can define the field catalog for the lines and for the subtotal columns. The only thing is that you would always show the subtotal rows.
    You have references of hierachy alvs in
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c060fcb4-2c62-2b10-d2b2-f32407a5cc6f
    ALV Hierarchy
    alv hierarchy
    In this case it also sorts
    Sorting for ALV hierarchy
    I hope it helps.
    Edited by: Oscar Pecharroman on Aug 2, 2010 1:13 PM

  • Problem in deleting Rows of JTable after sorting it

    Hi all,
    I'm getting problems in Removing Row(s) after sorting a JTable.
    Please find the code snippets at this URL. Thanks for your time...
    http://forum.java.sun.com/thread.jsp?forum=31&thread=459736&start=15&range=15&hilite=false&q=

    Hi Abhijeet,
    I tried it the way you said using
         wdContext.nodeBirhtday_List().nodeItab().moveFirst();
         //     loop backwards to avoid index troubles
         for (int i = n - 1; i >= 0; --i)
              current_date  = wdContext.nodeBirhtday_List().nodeItab().currentItabElement().getGbdat().getDate();
              current_month = wdContext.nodeBirhtday_List().nodeItab().currentItabElement().getGbdat().getMonth();
              if (( current_date != date_today ) && ( current_month != month_today ))
                   wdContext.nodeBirhtday_List().nodeItab().removeElement(wdContext.nodeBirhtday_List().nodeItab().
                                  getElementAt(i));                
              wdContext.nodeBirhtday_List().nodeItab().moveNext();     
    It adds records...
    According to Valerys Solution, the IPrivate<CustomController> doesnt show me the required nodes. and gives me 'Unable to resolve' error.
    Can you please suggest where I am going wrong
    Regards
    Abdullah

  • Hi, I have recently updated my iMac from OS x mountain lion to OS X Mavericks. After that I can't upload any video and some files to my personal email account. Can anyone please help me to sort this problem.

    Hi,
    I have recently updated my iMac from OS x mountain lion to OS X Mavericks.
    After that I can't upload any video and some files to my personal email account.
    I have tried to send a small video clip to the sender as attachment. i have done this before
    with the same video same and same email account. This problem found just after installed the
    OS X Movericks. Can anyone please help me to sort this problem.
    Thanks.
    Roman

    Please follow these directions to delete the Mail "sandbox" folders. In OS X 10.9 there are two sandboxes, while in earlier versions there is only one.
    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    ~/Library/Containers/com.apple.mail
    Right-click or control-click the highlighted line and select
    Services ▹ Reveal
    from the contextual menu.* A Finder window should open with a folder named "com.apple.mail" selected. If it does, move the selected folder — not just its contents — to the Desktop. Leave the Finder window open for now.
    Log out and log back in. Launch Mail and test. If the problem is resolved, you may have to recreate some of your Mail settings. You can then delete the folder you moved and close the Finder window. If you still have the problem, quit Mail again and put the folder back where it was, overwriting the one that may have been created in its place. Repeat with this line:
    ~/Library/Containers/com.apple.MailServiceAgent
    Caution: If you change any of the contents of the sandbox, but leave the folder itself in place, Mail may crash or not launch at all. Deleting the whole sandbox will cause it to be rebuilt automatically.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combinationcommand-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar, paste into the box that opens (command-V). You won't see what you pasted because a line break is included. Press return.

  • I just upgraded to iTunes 12 and had all sorts of problems.  After several restores I seem to be able to sync my iPad with iTunes BUT I can't delete anything off my iPad from iTunes.  Any ideas on what to do?

    I just upgraded to iTunes 12 and had all sorts of problems.  After several restores I seem to be able to sync my iPad with iTunes BUT I can't delete anything off my iPad from iTunes.  Any ideas on what to do?

    -Me again - it also won't upload the few new pictures I have on the computer onto the iPad without deleting all the photos that are already there....

  • ALv to excel download problems

    HI friends,
    Probelm I'm facing while saving an ALV report to Excel Sheet by clicking
    on the 'Save as File Icon' button on the ALV output.=0D
    Here data is going into a new Line after 65 columns.I've used Function
    Module 'RSAQ_ALV'.This function module is ultimately using
    'REUSE_ALV_GRID_DISPLAY' and 'REUSE_ALV_LIST_DISPLAY' function
    modules.ALV output I'm getting correctly but when I save this ALV output
    to Excel,columns are getting wrapped and going into 2nd row after 65
    columns.=0D
    Could anybody tell me what could be the reason ?=0D
    Thanks,
    Sreekanth.G
    Moderator message: duplicate post locked.
    Edited by: Thomas Zloch on Jul 9, 2010 12:36 PM

    ch_alv_layout-info_fieldname = 'COLOR'. "infofield for listoutput
      ch_alv_layout-colwidth_optimize = 'X'.
    try commenting the above values.and also check the Fieldcatlog.
    Check the issue similar issue was resolve by checking catalog and layout:
    [ALV Issue solution|Re: Problem when export ALV.]
    Regards,
    Gurpreet

  • Row doesn't get selected after sorting

    I have a table bond to a javabean data control. I have enabled multi row selection. I get some rows on the table and then I select one of those rows, after that I use the value of the selected row for some operations.
    I have 3 columns, first name, lastname , email. The first 2 are sortable. If I click on the header of firstname, the information gets sorted ok (asc / desc). The problem is that after sorting, I can NOT select any rows. When I click on the row, it doesn't get highlighted, and If I try to use the value of the selected row I get a null pointer exception.
    Again this is happening only after sorting. If I don't sort, it works ok.
    I'm using JDEV + ADF 11.1.1.5.
    This is my code
    <af:table value="#{bindings.User1.collectionModel}" var="row" partialTriggers="::cb1"
    rows="#{bindings.User1.rangeSize}"
    emptyText="#{bindings.User1.viewable ? identityBundle.no_data_to_display : identityBundle.access_denied}"
    fetchSize="#{bindings.User1.rangeSize}" rowBandingInterval="0"
    id="t1" rowSelection="multiple"
    selectionListener="#{AssignRolesBean.onTableSelect}"
    binding="#{AssignRolesBean.searchResultsTable}"
    columnStretching="last">
    <af:column sortProperty="firstname" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.firstname.label}" id="c1"
    width="136">
    <af:outputText value="#{row.firstname}" id="ot4"/>
    </af:column>
    <af:column sortProperty="lastname" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.lastname.label}" id="c2"
    width="182">
    <af:outputText value="#{row.lastname}" id="ot2"/>
    </af:column>
    <af:column sortProperty="mail" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.mail.label}" id="c4"
    width="361">
    <af:outputText value="#{row.mail}" id="ot5"/>
    </af:column>
    <af:column sortProperty="uid" sortable="false"
    headerText="#{bindings.User1.hints.uid.label}" id="c3"
    visible="false">
    <af:outputText value="#{row.uid}" id="ot3"/>
    </af:column>
    </af:table>
    I have a selection listener only, I don't have a sort listener.
    My bean;
    AssignRolesBean
    public void onTableSelect(SelectionEvent selectionEvent) {
    GenericTableSelectionHandler.makeCurrent(selectionEvent);
    My makeCurrent method
    public static void makeCurrent( SelectionEvent selectionEvent){
    RichTable _table = (RichTable) selectionEvent.getSource();
    CollectionModel tableModel = (CollectionModel) table.getValue();
    JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding) tableModel.getWrappedData();
    DCIteratorBinding tableIteratorBinding = adfTableBinding.getDCIteratorBinding();
    Object selectedRowData = table.getSelectedRowData();
    JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding) selectedRowData;
    Key rwKey = nodeBinding.getRowKey();
    tableIteratorBinding.setCurrentRowWithKey( rwKey.toStringFormat(true));
    SHOULD I IMPLEMENT A SORT LISTENER FOR THIS TABLE IN ORDER TO HANDLE ROW SELECTION PROPERLY AFTER SORTING?
    Is there a guideline for handling row selection after sorting?
    Thanks

    I have a table bond to a javabean data control. I have enabled multi row selection. I get some rows on the table and then I select one of those rows, after that I use the value of the selected row for some operations.
    I have 3 columns, first name, lastname , email. The first 2 are sortable. If I click on the header of firstname, the information gets sorted ok (asc / desc). The problem is that after sorting, I can NOT select any rows. When I click on the row, it doesn't get highlighted, and If I try to use the value of the selected row I get a null pointer exception.
    Again this is happening only after sorting. If I don't sort, it works ok.
    I'm using JDEV + ADF 11.1.1.5.
    This is my code
    <af:table value="#{bindings.User1.collectionModel}" var="row" partialTriggers="::cb1"
    rows="#{bindings.User1.rangeSize}"
    emptyText="#{bindings.User1.viewable ? identityBundle.no_data_to_display : identityBundle.access_denied}"
    fetchSize="#{bindings.User1.rangeSize}" rowBandingInterval="0"
    id="t1" rowSelection="multiple"
    selectionListener="#{AssignRolesBean.onTableSelect}"
    binding="#{AssignRolesBean.searchResultsTable}"
    columnStretching="last">
    <af:column sortProperty="firstname" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.firstname.label}" id="c1"
    width="136">
    <af:outputText value="#{row.firstname}" id="ot4"/>
    </af:column>
    <af:column sortProperty="lastname" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.lastname.label}" id="c2"
    width="182">
    <af:outputText value="#{row.lastname}" id="ot2"/>
    </af:column>
    <af:column sortProperty="mail" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.mail.label}" id="c4"
    width="361">
    <af:outputText value="#{row.mail}" id="ot5"/>
    </af:column>
    <af:column sortProperty="uid" sortable="false"
    headerText="#{bindings.User1.hints.uid.label}" id="c3"
    visible="false">
    <af:outputText value="#{row.uid}" id="ot3"/>
    </af:column>
    </af:table>
    I have a selection listener only, I don't have a sort listener.
    My bean;
    AssignRolesBean
    public void onTableSelect(SelectionEvent selectionEvent) {
    GenericTableSelectionHandler.makeCurrent(selectionEvent);
    My makeCurrent method
    public static void makeCurrent( SelectionEvent selectionEvent){
    RichTable _table = (RichTable) selectionEvent.getSource();
    CollectionModel tableModel = (CollectionModel) table.getValue();
    JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding) tableModel.getWrappedData();
    DCIteratorBinding tableIteratorBinding = adfTableBinding.getDCIteratorBinding();
    Object selectedRowData = table.getSelectedRowData();
    JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding) selectedRowData;
    Key rwKey = nodeBinding.getRowKey();
    tableIteratorBinding.setCurrentRowWithKey( rwKey.toStringFormat(true));
    SHOULD I IMPLEMENT A SORT LISTENER FOR THIS TABLE IN ORDER TO HANDLE ROW SELECTION PROPERLY AFTER SORTING?
    Is there a guideline for handling row selection after sorting?
    Thanks

  • How to avoid restart weblogic after I modify EJB implementation class?

    I am sure I redeploy my application after I modify EJB implementation class. It
    is unacceptable to restart weblogic server if I changed some EJB . Is there any
    way to avoid this?
    Thanks!

    I would open a case with BEA support. I would take a look at it, but I'm going
    on vacation :(
    pat
    "CottonXu" <[email protected]> wrote:
    >
    My WLS version is 7.0 and I use weblogic console to redeploy the entire
    application.
    I am sure that EJBs are not in classpath.
    What should I do ?
    "Pat Bumpus" <[email protected]> wrote:
    Hi,
    I haven't seen this behavior. My EJBs seem to redeploy and pick upthe
    EJB bean
    changes. Make sure that your EJB is not in the system classpath that
    could cause
    this problem.
    What version of WLS?
    How are you deploying the EJB?
    pat
    "CottonXu" <[email protected]> wrote:
    I am sure I redeploy my application after I modify EJB implementation
    class. It
    is unacceptable to restart weblogic server if I changed some EJB .
    Is
    there any
    way to avoid this?
    Thanks!

  • Read From Alv After Filter

    Hi Experts,
                I Want to tead The ALV after appliying a filter. that means.. if my alv contains 50 rows. after filter suppose it reduce to 10 lines. i want to read those 10 lines into an itab.
    Please suggest asap
    Regards
    Sarath Satheesan

    Hi Sarath,
    Try this code:
    DATA: lr_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE,
    l_VALUE type If_Salv_Wd_Table=>S_Type_Param_Get_Ui_Info.
    try.
    lr_INTERFACECONTROLLER = wd_This->wd_CpIfc_alv_invoice( ).
    catch CX_WDR_RT_EXCEPTION.
    endtry.
    if not lr_INTERFACECONTROLLER is initial.
    l_VALUE = lr_INTERFACECONTROLLER->Get_Ui_Info(
    endif.
    Regards,
    Shemim

  • I am using iPhone 4 from the last one year and went dead and got it replaced by paying Rs.12500/- to Nyasa Sion Koliwada Mumbai Service Provider but now again after 38days the problem has started, what do i do? Is this is the quality & service we boost?

    I am using iPhone 4 from the last one year and went dead and got it replaced by paying Rs.12500/- to Nyasa Sion Koliwada Mumbai Service Provider but now again after 38days the problem has started, what do i do? Is this is the quality & service we boost? On visiting the store we get only one reply you may write to Apple directely. we have the similar kind of problem with iPad which is being used by my wife Mr.Neelam Vij and paid Rs.16000/- to get it replaced within a year & 6months use. so in totality we have paid Rs.28500/- + Rs. 3000/- diagnostic charges.
    1. iPhone 4 , 32 GB Black with Sr. No. 88******A4T
    2. iPad 2, 16GB White with Sr. No.DL*******KPH
    Moreover, we have no information to contact whom. even the replace set has a warranty of only three month which further confirm that Apple itself is not confident wheather product will last after replacement for more then three month. Such kind of happening do not encourage anyone to recomend this product to anyone. Would appriciate a faster response to our problem if someone from Apple is going to read this email.
    Thanks & Regards
    A K Vij
    <Personal Information Edited by Host>

    http://support.apple.com/kb/he57?viewlocale=de_de
    India
    (91) 1800 4250 744
    www.apple.com/in/support/
    hope it helps

  • How do I uninstall an application from my Macbook Pro? I have been having all sorts of problems with Adobe products, and need to uninstall so I can re-install them

    How do I uninstall an application or software from my Macbook Pro? I have been having all sorts of problems updating Adobe Reader and Flash player on my mac that I need to uninstall them so I can re-install them.

    Uninstall Flash
    http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-mac-os.html
    For Reader search "unistall adobe reader mac" for the version you are running
    https://forums.adobe.com/message/4793407  XI
    http://helpx.adobe.com/acrobat/kb/installing-uninstalling-acrobat-x-mac.html  X

  • After a startup problem with my macbook pro i put it as slave and formatted the internal Hard drive. Now i want to install OS X Mavericks from USB

    After a startup problem with my macbook pro i put it as slave and formatted the internal Hard drive. Now i want to install OS X Mavericks from USB
    How can i do that?

    What did you "put as slave?" What Mac model do you have, exactly?

Maybe you are looking for