Default sorting in cl_gui_alv_tre

Hi there,
I have an application where I use cl_gui_alv_tree. The user can group the entries of the tree by selecting a button and deciding upon the field he wants to use. The function module LVC_SORT is used to do this. My questions is: can such a sorting value be saved, so that the user does not have to call the grouping functionality again when restarting the transaction (default sorting)? The layout seems to only save the displayed fields.
Thank you,
Ferenc

Hi,
See this code
* Create emty tree-control
  CLEAR: it_emptytab.
  REFRESH: it_emptytab.
  CALL METHOD gd_tree->set_table_for_first_display
     EXPORTING
               is_hierarchy_header  = gd_hierarchy_header
               it_list_commentary   = gd_report_title
               i_logo               = gd_logo
*               i_background_id      = 'ALV_BACKGROUND'
<b>               i_save               = 'A'</b>
*               is_variant            = ls_variant
     CHANGING
               it_outtab            =  it_emptytab      "Must be empty
               it_fieldcatalog      =  gd_fieldcat.
ENDFORM.                    " CREATE_EMPTY_ALVTREE_CONTROL
Check this lik for reference
http://www.sapdevelopment.co.uk/reporting/alv/alvtree.htm
Hope this helps.

Similar Messages

  • How to change the default sorting in iTunes

    Hi,
    Does anyone know how to change the default sorting method for all items in iTunes?  I use the third option for organizing the library as a whole (the one that has a list of icons for bands that you double click to show only that band's songs).  The only sorting method I use is to sort by Album by Year (ascending), this makes the most sense to me.  I can tell that iTunes is attempting to remember when I do this for certain artists, but it epically fails at maintaining this sorting pattern.
    To be clear, say I open Radiohead and click through to have it sort with the above method.  Everything works great, but when I return a few days later to play Radiohead again, the sorting is not maintained.  It could be as simple as sorting in a descending direction, or could even be trying to sort by the number it was added in my library.
    I'd really appreciate it if someone knew of a way (maybe even through scripts if possible / the only solution) to eliminate this problem and have every (NOT just the artists who I've told iTunes to sort a specific way) artist sort that way.
    I don't know if my copy is just corrupt?  It may be, since for some artists it's started playing them in the above mentioned order they were added to my library even if I force a sort by album by year (i.e. it will go from playing a 2007 album to a 2002 album and not the 2008 album).
    Thanks!

    Andrew, I know I am extremely late to the party but I too use Grid View.  I had the same problem that you had but have found this to work for me.  I used it and it is still holding as my default sorting even after switching between the Artist page and Grid View.
    Once you are inside of the Artist page continue to click on the Album column until it shows Album by Artist/Year.
    That will give you each album sorted by the year instead of it randomly sorting it for you each time you leave an Artist's page and then back again.
    Hope this helps.

  • Change Default Sort Logic Of ADF Table?

    Hello All,
    In my application is an ADF table with lots of rows. The default sort logic for one of the columns is from 'Oldest to Newest'. The user has to click on the sort again to get 'Newest to Olderst'. This takes away a lot of time.
    How can I change the default sort logic to 'Newest to Oldest' ?
    Thanks,

    Is this jdeveloper 11.1.1.2?
    What is the problem with the normal scenario - just add 'order by' the view object clause?
    The table offers ascending and descending ordering.

  • Set Default Sort in File Manager

    Hi,
    When i go to File Manager, Media Card, Photos, the default "sort" is set to Name and "order" Ascending. If i want to change it to "sort" date and "order" descending, i select date and then it jumps back to the actual pictures. I have to go back into the menu to do the second selection "sort" descending". So can the development team create an option where you change all the settings first and then you save them which then brings you back to the actual pictures? And also look into the option of remembering your preferred sort/order preferences? because once you go out of file manager and go back in, you have to do these steps again. 
    if I am overlooking this feature (maybe it's already a setting somewhere which i missed) feel free te let me know.
    Thanks

    Hi,
    It's not about set of key field in MDM Import Manager but the reason is that you can not select more than 1 category(Lookup Taxonomy) in maintable for one record. thats why error is coming because for this Property Multi-valued always No.
    Even, you can try this in Data Manager manually create three Category A, B and C in taxonomy mode on selecting Sub table Categories, then on selecting main table, when you select category field(which is lookup to categories table)for a particular record you could able to select only one category A, B or C.
    i would suggest make a Attribute of type text having three values A, B and C and mark this as Multi-Valued in Attribute Detail and link this Attribute with your category. in this way you can attach three values A, B and C with your Record.
    Other thing you can do,make this category field as (Lookup Hierarchy not lookup taxonomy) in main table to Subtable(Hierarchy) then for this field in main table you can set Property Multi-valued = Yes in MDM console and then after Import using MDM Import Manager finally only one record will get created in Data Manager as:
    Name Category
    1         A;B;C
    Hope it will Help you,
    Rewards if Useful.....
    Mandeep Saini
    Edited by: Mandeep Saini on Jun 20, 2008 8:46 AM

  • Default Sorting in Customer open item clearing ( F-32, F-28)

    Is it possible to make a user specific default sorting key in F-32 or F-28 other than the sort key in customer master?

    Hi,
    Create your own sorting format and tell the user assin it in editing options of tcode f-32 and f-28 or Directly FB00.
    Regards,
    Azeem

  • Windows native file dialog default sort is by date instead of name

    I somehow managed to get the Windows common file dialog default sort to be by date instead of name, so I have to resort by name every time I select a VI to load. I haven't been able to identify the registry entry that tell how the MRU list is sorted. How do I make the default sort by name instead of date, short of removing and reinstalling LabVIEW?

    I think its a Windows issue and nothing to do with LabVIEW since LabVIEW just calls the MS common dialog. Do you see the same behaviour when using Windows Explorer? I know that with Win2K, I can set the default folder view to always sort by date. To go back to the default, select My Computer>Tools>Folder Options>View>Reset All Folders. I don't have easy access to any computers with a different OS right now so I can't describe what the process is for them.

  • Default Sort Order for Library View

    It would be fantastic if there were a user defined preference for a default sort order in Library view. For example, some users may prefer to always view the images by File Name, or Rating, etc, without having to change the sort order for each individual folder they view via Lightroom.
    Thanks!

    Thanks for your suggestion Allan, but it doesn't work.
    I'm specifically referring to the defaults that Aperture 3 adopts when you use the "File, Import, Folders as Projects with the projects and albums setting.
    What I'm finding is regardless of the setting in the Library preferences, the default sort order for the project is Date and Manual for the album.
    Yet if I create a project manually the default sort order is as per the Library prefs. Strange.

  • How do I change the default "sort by" on import?

    I've been pouring over the forums for a few minutes with minimal success... It seems many people are set on ranting rather than looking for solutions.
    I'm finding that I can import photos easily, but upon import (in the library grid view), I have to then switch the sort-by from "import order" to my preferred sequence of "file name".
    Is there a way to change the preferences so that the default sorting order of a newly imported batch of photos is "file name" (or anything else for that matter)? I feel clueless for not being able to find such a setting.
    Thanks for the help in advance!
    -Cody

    @ Ian: thanks for the message, I was afraid that might be the case. It's not generally a bother, but from time to time, my pictures show a sequence of things and it's just plain silly that LR imports with the default being whichever order LR decides to import in.
    @ John: I generally import photos from a SD card inserted into my computer, so it just imports it via the default dialog. From looking at the freshly imported gallery, it generally shows that the sort order = "Import order" rather than by filename/capture time.

  • Want to change the default sort order of a Advanced table

    Hi all ,
    Hope all of you doing good.
    I am trying to change the deafult sort order of a " View Applicants" advanced table on Irecruitment selfservice page , using personalization feature but its not sorting as expected.
    The default sort order is asc by the name of the applicants. I wanted to override it by " Date Applied " desc using personalizing the advanced table.
    But its not sorting by Date applied and still shows the sort by applicant name.
    Any inputs will be greatly helpful
    I am using the Oracle Apps 11.5.10 version.

    Hey guys m I got the answer for the below question.
    Oracle have few Restriction and limitation on such Advanced table in sorting the data,
    Few of them are as mentioned below ...
    1. Sorting is not allowed for tables that allow inserts.
    2. Sorting is not supported for tables containing updateable columns
    3. Sorting is disabled when the Select column is checked for a row in a table or when Hide/Show is present in a table.
    Because of the above limitations , we cannot sort or override the existing alphabetical name sort order to Date applied sort order on the View Applicant advanced table.
    You can observe that , View Applicant page is having an option called "Update Status" which allow us to update applicant’s status or rating in the Advanced table.
    On such updatable advanced tables, oracle does not allow us to override the sort order on any of the table columns.
    Keeping it in a nutshell , I can say it's does not allow us to change the sort order of the view applicant advanced table ( which is having updateable columns ) to sort them in Date applied instead of Name( which is default ).

  • How to restore default sort order on a table?

    Have an ADF table with some sortable columns, populated by an SQL view (having its own Order By).
    Looking for a way to let user revert to default sort order after sorting columns.
    Currently, I have a button linked to:
    public String cmdRefreshOrders() {
    this.getTblOrders().setSortCriteria(null);
    DCIteratorBinding iter = ADFUtils.findIterator("iterUnderlyingTable");
    iter.executeQuery();
    return null;
    This doesn't work
    Any ideas?

    Tried. Doesn't work.
    Iterator doesn't have a setOrderByClause() -- closest I see is applySortCriteria(), which takes an array of SortCriterias, not a String. Might be able to parse Order By string to create array of SortCriterias, but this smells wrong. Probably wouldn't work anyway because ...
    Tried doing iter.applySortCriteria(null) before executeQuery. This accomplished nothing -- the sort created from clicking the column header persisted.
    Looks to me like the sort is persisting as some property in the table or in the display column.
    Any more ideas?
    Thanks
    Ed

  • How to set default sorting order in ADF Table

    Hi,
    I want to set the default sorting order as ascending in adf table. Please help me regarding how can we do it.
    Using JDev 11.1.1.5.0

    Hi Frank,
    Thanks for the quick reply.
    I have done binding of table with list of pojos.
    The Class for which Data control is created is as:-
    public class DemoDC {
        private List<TableEntity> tableList =
            new ArrayList<TableEntity>();
        public List<TableEntity> getTableList() {
            return tableList;
        public void setTableList(List<TableEntity> tableList) {
            this.tableList = tableList;
    where TableEntity is a pojo which has all the columns as its attributes.
    Now when i do the above steps , after clicking on pencil icon and seecting the iterator name in the iterator tab (DemoDC-> tableList) , and selcting the 'sort criteria' tab when i select a column and try to set the sort order  I get error as ' Iterator can not be created for the selected node ' .

  • ITunes default sort

    I have a problem with my iTunes.. I set the sort as "album by year" but when i close it, and then re-open it, iTunes still sorts the songs by "track". Is there any way to change this in order to put "album by year" as the default sort?
    Also, is there any way to change the last column in "browser mode" to show album by year, instead of ordering them alphabetically?
    Sorry 'bout my english . And tahnk you so much

    Thank you, maybe I wasn't clean. grrr my english *****.
    For example, I select grid view, and then double click a band. Then it show the albums by the band... once there i click the column header "Album by year".. and it sort the "playlist" by album's year.
    When I close, and re-open iTunes and select any band, it's sorted by "track" and not by album year, even if it's the same band I changed.
    Maybe it's more clear now.. I hope
    Thanks for your answer really ~

  • Default sorting order used by oracle

    Can anyone please let me know whether oracle uses any default sort order or not when executing an sql which does not have any sort order/ order by clause?
    I have a sql query where no sort order is specified.
    Now if I add some more columns in the select clause and execute the same query, the number of records returned are same and also the records are same.
    But the order in which they are displayed is different from the previous query.
    Could anyone please let me know whether oracle uses any default sort order or not when executing an sql which does not have any sort order/ order by clause
    or does it depend on the columns of the table?
    Thanks in advance.

    To answer your direct question "why the order in the previous example differ".
    When you added additional columns to the select list, that changed the query plan generated for the query. This caused Oracle to pick up the rows in a different order. There are a number of reasons this could happen, the new selected columns caused a different index (or no index) to be used for one of the tables in the query, it caused a different table to be be used as the "driving" table (i.e. the first one accessed), it caused a different join method to be used.
    HTH
    John

  • Changing default sort direction

    Hi there
    The standard table analysis item that can be included in a template comes with functionality whereby a user can sort the data. The default sort direction is ASCENDING.
    It is now my task to determine how to make that DESCENDING ... any ideas on how the default / initial sort direction can be altered?
    Cheers,
    Andrew

    Hi Andrew,
    maybe make the sort direction of the query DESCENDING.
    regards,
    Raymond Baggen
    Uphantis bv

  • Default Sort in Presentation in Oracle BPM 10

    I have a sortable (sort enabled) table in a presentation
    And I want my table to be loaded with a default sort.
    How can I do that?

    Hi user9293762,
    To pass the BPM object to the JSP page, please follow the below steps:
    1) Place an interactive activity after the method execution.
    2) Right click on the Interactive activity and select Main Task
    3) In the Main Task wizard select Implementation Type as BPM Object Interactive Call
    4) Select the BPM Object Variable, here you can pass your BPM object to the jsp page but make sure that the object you want to pass is an instance variable of type your BPM object
    5) Click on the Use JSP Presentation and choose for your jsp page you want to attach with the interactive activity.
    6) Finally click on OK
    Now you can access the BPM object in your jsp page.
    Bibhu

Maybe you are looking for

  • Logic pro X crashes when I try to use Fade Out in the automation section

    when I click mix/automation/fade out   my logic pro X crashes I need some help.

  • My skype number is not active

    my skype number is not active this is my number [redacted for privacy]i call this number but is busy not riningi hope to check this problem thanks u 

  • Dynamic parameter selection

    Hello All, Is there any way to choose selection parameters dynamically (not a whole structure as with FM FREE_SELECTIONS_DIALOG), I'd want to represent the input parameters of a Function Module without either to know the FM at design time nor regener

  • Apple tv is reducing tv volume

    Whenever I turn on my apple tv, the volume on my TV immediately and automatically goes down to zero.  I have had the apple tv and been using it with the same Sony Bravia TV for over a year without any problem until yesterday.  Both devices have fully

  • ITunes disk trouble

    Okay I am trying to run an application on a CD on my computer, but everytime I insert it iTunes goes in and makes another CD icon of the songs on the disk. When I try to run the application it tries to run off of the CD with the songs on it that iTun