Skip to Content

Help in clearing out/removing the default Sorting Order in our smart table

Hi Experts,

I have a fiori application that uses Smart table in displaying a list of accounting line items. In one column, "GL account" , we enabled sorting property annotation. But everytime the app is launched, the sorting directly defaults to Ascending.

In back-end side (*get_entity_set), the parameter IT_ORDER now always gets to be filled with the 'ASC' value for the field "GL Account", hence will trigger the code for sorting the line items.

Please advise if there is a way to remove or clear out the Sorting Order and place it back whenever we need (e.g. when the user manually chooses what order to use in the "GL account field").

Do advise as wel if there is a better approach.

Thank you in advance

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Feb 01, 2019 at 07:29 PM

    Hi,

    This seems to be default behavior according to the documentation (if you used UI.PresentationVariant.sortOrder annotations for enable sorting, which is meant to enable default sorting).

    Following blog seems to explain that more in detail:

    https://blogs.sap.com/2018/01/11/fiori-elements-list-report-sorting-grouping-and-table-types/

    The Smart Table should enable sorting by default, as long as the metadata of the oData service has the sortable attributes. Maybe have a look at following example:

    https://sapui5.hana.ondemand.com/#/sample/sap.ui.comp.sample.smarttable/preview

    Best regards,

    Geert-Jan Klaps

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.