Technical Articles
Fiori elements – List Report – Sorting, Grouping and Table Types
Latest Update November 2020: THIS POST IS NOW RETIRED – Please go directly to SAP Community topic for Fiori elements
It’s hard to believe that 4 years have passed since I first started blogging on SAP Fiori elements.
Since then it has grown from strength to strength. SAP Fiori elements apps are now the:
- Preferred choice for SAP Fiori apps delivered for SAP S/4HANA
- As at November 2020 nearly 900 of the more than 2K apps available are SAP Fiori elements app
- Preferred and recommended choice for efficient development of your own custom-built apps
- Preferred build approach for many of our customers… see the SAP TechEd 2020 session: Yorkshire Water uses SAP Fiori Elements to build Fiori apps quickly
The tooling has also changed from SAP Web IDE on SAP Cloud Platform Neo, to the next generation tooling SAP Fiori Tools. SAP Fiori Tools are an extension of SAP Business Application Studio on SAP Cloud Platform Cloud Foundry that guide you through creating your own SAP Fiori elements apps – and they can be run offline on VSCode too.
So it’s time for this blog post to step gracefully aside and instead refer you to the current best resources for Fiori elements, including:
- SAP Community topic for Fiori elements – get the latest resources, ask questions, and swap experiences with other customers, partners, independents, and SAP employees
- The official documentation on SAP Help Portal: Developing Apps with SAP Fiori elements
- You can also find this documentation via the SAPUI5 SDK at https://ui5.sap.com > Documentation > Developing Apps with SAP Fiori elements
- The video playlist on Youtube: Getting started with SAP Fiori elements playlist
- The Tutorials for SAP Fiori Tools on https://developers.sap.com
One last big hint: One of the most beneficial additions to the official documentation is the SAP Fiori elements feature map which explains what is available per floorplan for your SAPUI5 version – definitely worth a read!
But hey all knowledge has value so if you want to read how this used to work in the SAP Web IDE… read on!
*****
Having seen and understood the basics of List Reports and the main annotations, you are ready to explore other UI annotations. You might want to start with some simple changes – sorting and grouping. Certainly your users can sort and group a list report using the settings icon. However if you are creating a custom report you will probably want to default the sorting and grouping for them. In this blog you will see how to set the default sort order and grouping as a developer.
It’s worth remembering that, as well as guiding the design of the List Report through annotations, there are always some List Report behaviours end users can control for themselves. Naturally, if there’s a common preference among many end users you will want to default those behaviours up front using annotations. It’s also necessary to set certain default behaviours – such as sorting and grouping – if you want to add more advanced aggregation features such as totals, subtotals, and other analytics.
As a developer you can also adjust the Sort Order and Grouping using the annotation UI.PresentationVariant. Using annotations to default the Sort Order is straightforward. Setting up a default Grouping, however, requires you to have a little more knowledge than just the annotations. You will need to understand the difference between the different table types supported by the Fiori element List Report, and how that impacts grouping and other table behaviours.
IMPORTANT: For simplicity in this blog you will see firstly how to default sorting and grouping using local annotations. However remember that if you are creating a specific custom CDS View to provide the data for your List Report you are recommended to build the annotations into the CDS View using a Metadata Extension. You can find out more about Metadata Extensions in the ABAP Programming Model for SAP Fiori.
Below you see a simple Sales Order list report. This is your starting point for the rest of the examples in this blog.
TIP: This report is based on a ABAP CDS View exposed as an OData Service, as recommended in the ABAP Programming Model for SAP Fiori.
Before you attempt to use the PresentationVariant, you need to understand a little about List Report table types. Because the SAP Cloud Platform Web IDE makes the annotations easy to understand, you will see how to sort and group using the Annotation Modeler first, and then you will see some alternative approaches using XML or a metadata extension of your CDS View. So in this blog you will find:
- A brief introduction to Table Types
- A little revision on annotations basics to get you started
- How to default the Sort Order
- How to default Grouping
- Using PresentationVariant in annotation XML files
- Using PresentationVariant in the metadata extension of a CDS View
The examples in this blog are based on:
- SAPUI5 1.50
- SAP NetWeaver AS ABAP 7.52 (as part of a SAP S/4HANA 1709 solution)
- SAP Cloud Platform Web IDE Full Stack version 180104
- Ecliipse Oxygen
A brief introduction to Table Types
There are 3 main table types used:
- Responsive
- Grid
- Tree
The Responsive type is a simple lean table. This table type is recommended for use on all types of devices including smartphones.
With a responsive table you can Sort and add a single level of Grouping as a business user, using the Settings icon. However you are not permitted to default this as a developer.
This example shows single level grouping on the Company Name.
The other table types are known collectively as Analytical table types. They are intended to handle larger amounts of data, and are therefore recommended for larger devices, e.g. desktop and tablet.
With analytical tables you can Sort and do multiple levels of Grouping, both as a business user and as a developer.
You’ll also find features you would expect in a desktop or tablet app, such as:
- Reorder columns via drag and drop
- Adjust column width using the cursor on the column border
- Sort, filter, group or freeze columns using the column header
- Automatic totalling and subtotalling for aggregated data
TIP: In the latest versions you even get a Show Details link for a totals dialog summarizing a column of amounts in multiple currencies into a consolidated total into a total per currency.
A Grid table is the default table type used when your OData Service includes aggregated data, i.e. attribute sap:semantics is set to “aggregate”.
TIP: You can see this setting on the Entity Type tag in the metadata of your OData Service, e.g.
<EntityType Name="ZC_SO_SalesOrderItemType" sap:semantics="aggregate" sap:label="Sales Order Items" sap:content-version="1">
Aggregated data can be shown with summary information such as totals.
If you are following the ABAP Programming Model for SAP Fiori, the easiest way to set sap:semantics to aggregate is to include the following annotation in your CDS View itself against any numeric field, such as amount or quantity:
@DefaultAggregation: #SUM
TIP: You cannot use DefaultAggregation annotations in metadata extensions. You can find out more about Default Aggregations in the ABAP Programming Model for SAP Fiori.
A Tree table is used to show lists with hierarchical tree structures. When you add grouping properties to a Grid table, the Fiori elements automatically converts to a Tree table. This has the added bonus that as you adjust the grouping, totals and subtotals can be shown as well.
TIP: If necessary you can can override the table type to some extent in the manifest.json by using the gridTable and treeTable settings within sap.ui.generic.app > pages (of the List Report Page) > component > settings.
A little revision on annotations basics to get you started
Start by opening your Fiori elements list report project in the SAP Cloud Platform Web IDE. If you don’t have one already you can find out how to do that in Fiori Elements – How to Develop a List Report – Basic Approach
You can use the Web IDE Annotation Modeler to assist you as you will find explained in Fiori Elements – How to Develop a List Report – using Local Annotations
TIP: You can also change the annotations.xml file directly.
When you view the annotations file using the Annotation Modeler you can see the being used by the List Report. These annotations were assigned when you created the List Report using the List Report application wizard. In the Annotation Modeler, you can see both the local annotations and the external annotations inherited from the OData Service.
TIP: When following the ABAP Programming Model for SAP Fiori, the annotations are created as a metadata extension to the CDS View. And the CDS View has been exposed as an OData Service.
You start the process by adding to the Local Annotations. The easiest way to do that is by using the Annotation Modeler and the + icon on the local annotations row.
TIP: If you need to change an external annotation, just select the matching redefine icon in the Actions column.
So now you are ready to add your annotations.
How to default the Sort Order
The sort order is defaulted using the UI.PresentationVariant annotation properties:
- sortOrder – this collects the sorting parameters
- sortOrder.by – this nominates the property for sorting
- sortOrder.direction – Ascending or Descending (the default is Ascending)
If you want to sort by more than one field, you simply use the sortOrder property to collect multiple sets of sortOrder.by and sortOrder.direction combinations.
You can add these using Local Annotations. Start by adding the UI annotation PresentationVariant.
TIP: PresentationVariant has a number of subnodes that technically must exist even if they are not used. That’s all the red asterisk indicates in the Annotation Modeler.
Within the subnode SortOrder, for each property you want to include in your Sort Order, you add a SortOrderType annotation. The sequence in which you have defined the SortOrderType properties determines the sort sequence.
Set the Property of the SortOrderType to the OData entity property you want to sort by.
By default Sort is ascending, if you need to you simply add the Descending subnode of SortOrderType. This is a Boolean value and all you need to do is set it to true.
In this example you can see the annotations that will sort the Sales Order list firstly by Company Name and within company by Sales Order ID descending.
Because PresentationVariant is used in many different scenarios – including Overview Page analytic cards – to complete your PresentationVariant annotation you also need to set:
- the Visualization subnode to point to your @UI.LineItem annotation used by your List Report
- the RequestAtLeast subnode to include your sort properties
IMPORTANT: If you forget to do this in local annotations your app may hang!
In this example you can see the Visualization and RequestAtLeast subnodes of the Sales Order List Report.
Once you have saved the annotations and restarted your app, your Sales Order list looks like this:
You can find more information on defaulting the Sort Order in the SAPUI5 SDK > Developing Apps with Fiori elements > How to use List Report and Object Page Templates > Preparing UI Annotations > Annotations relevant for List Reports and Object Pages > Tables > Default Sort Order.
How to default Grouping
You can default the grouping by setting the GroupBy subnode of the UI.PresentationVariant.
TIP: If you want to group by more than one property, just use the + icon in the Annotation Modeler.
VERY IMPORTANT: Remember however that how the grouping is applied depends on the table type. So if you try to apply grouping to a responsive table, the app is will ignore your settings!
Provided you make sure you are using an analytical table, then your grouping will work, and your grid table will convert to a tree table.
So then your Sales Order List Report will look like this.
Notice the differences to a responsive report:
- the sort indicators in the column headers show that you have sorted the report by Company Name ascending and Sales Order ID descending
- instead of just clicking on a row to see the details, we now have a final column with a > icon to reach the related Object Page to see the details of the row
NOTE: You do not need to sort before grouping – grouping will still work. However like me you will probably find that most business users are likely to expect that the data is sorted within your grouping.
Using PresentationVariant in annotation XML files
If you prefer to code this directly in the annotation XML editor – rather than using the annotation modeler – this is what it should look like.
Using PresentationVariant in the metadata extension of a CDS View
Of course, if you have created a CDS View specifically for this list report, you might prefer to follow recommended best practice and include your annotations as part of your CDS View.
The correct way to do this is to add your PresentationVariant and other UI annotations in a metadata extension of your CDS View. Metadata extensions enable you to layer annotations on top of existing CDS Views.
For the Sales Order list example, your Presentation Variant is formatted like this:
@UI.presentationVariant: [{
sortOrder: [
{ by: 'CompanyName' },
{ by: 'SalesOrder', direction: #DESC } ],
groupBy: [ 'CompanyName', 'SalesOrder' ],
visualizations: [{ type: #AS_LINEITEM }],
requestAtLeast: [ 'CompanyName', 'SalesOrder' ]
}]
As the PresentationVariant applies to the whole report, you add your annotation above the “annotate view” statement as in this example.
Find out more about MetaData Extensions and UI Annotations in the ABAP Programming Model for SAP Fiori
Taking your Fiori elements app to the Next Level
If you are interested in Fiori elements you might also like to look at these videos on Youtube:
And you can find more information on Developing apps with SAP Fiori elements in the SAPUI5 SDK
Lastly you will find a collection of blogs, videos and other material in the Fiori elements wiki.
And if you are creating custom Fiori apps for SAP S/4HANA, you will find many resources to help you in the Expert Deep Dive section of the SAP Fiori for SAP S/4HANA wiki
Brought to you by the S/4HANA RIG
Hello Jocelyn,
Thanks for this precious information. It will be nice to have the same for the ObjectPage.
Is the ObjectPage react the same as the ListReport (in the case where we have sections with table) ?
Regards,
Joseph
Hi Joseph,
Yes much the same although if you have more than one @UI.Identification or @UI.Lineitem annotation in your report it is always best to use a Qualifier to distinguish between them so that the template always knows which annotation you mean.
Rgds
Jocelyn
Thanks Jocelyn.
Great article!
Are the settings (grouping, sorting, ..) also saved in the (user) Variant?
Yes that's right. Remember that there may be 2 variants - one for the filter and one for the table - or a single combined variant depending on how the list report has been written.
Hello Jocelyn,
It is possible have multi-lines text in a column, to same id row, in the grid table?
Best regards
Pedro Ferreira
Hi Pedro
Try annotation UI.multiLineText as mentioned in per https://help.sap.com/viewer/cc0c305d2fab47bd808adcad3ca7ee9d/7.51.1/en-US/62c32d02c4ee4b1b84dd3347e01a2075.html
Rgds,
Jocelyn
Oh and blog it if you do it - we don't have that one in a blog yet 🙂
Thanks Jocelyn for the wonderful Blog!
Can we use @UI.presentation variant for value helps based on Modeled Views?
Thanks,
Vik
Hi Vikram
It's not quite as simple as that as the OData Service needs to be adjusted to provide the value help as well. You can find more info on Providing Value Helps n the ABAP Programming Model for SAP Fiori
https://help.sap.com/viewer/cc0c305d2fab47bd808adcad3ca7ee9d/1709%20000/en-US/ce9deec2b91746f7b2f1ca4421256754.html
Rgds
Jocelyn
Hi Jocelyn ,
Thanks for nice blog .We are trying to add filter on column header same as sort and group but cannot find it in the UI annotation. Can you help here.
Thanks,
Monica
Hi Monica,
I am not quite sure what you mean? Do you mean you want to adjust which columns are displayed in the list? That is controlled by the @UI.LineItem annotation.
Rgds,
Jocelyn
Hi Jocelyn,
I am getting sort ,freeze in column header but i am not getting filter in column header of table .Could you please help.
Thanks,
Monica
Please ask questions as a separate post in answers.sap.com not in blog comments.
As per the SAP Community Rules of Engagement.
Hi Jocelyn,
I'm using a list report smart template application. On scroll the the UI is sending batch requests again and again to the backend and say if i have 300 records, those 300 records are bound infinite times.
This happens on scroll
Can you please help with a solution for this?
HI Akshaya, please raise questions as separate posts in answers.sap.com not as blog comments.
At a guess it sounds like your OData Service isn't supporting top/skip/filter options correctly.
If you want more please raise a question in answers.sap.com
Rgds
Jocelyn
Hi Jocelyn,
Does it work with OData V2 ?
Regards,
Joseph
Yes absolutely.
I confirm, it's working 🙂
thanks
Does it work for OData V4 service? Fails to load the metadata file when I try.
Hi Jocelyn,
I have set gridTable:true in my manifest for list report table. But for Navigation to object page, it shows a "Show Details" button instead of Carousel. Can you please help me get a carousel for GridTable ?
Hi Akshaya,
I think perhaps you mean the > icon rather than a Carousel? The Show Details link shows depending on how your actions are defined. If you have more than one inline action you automatically get Show Details instead of the > icon.
Rgds
Jocelyn
Hi Jocelyn,
Can we have filter,group and sort in smart settings dialog using annotations?
Hi Akshaya
I'm not sure what you mean? The filter, group and sort settings are automatic in all List Reports - just look for the settings icon on the top RH of the Smart Table. Any defaults you set via annotations will show in the settings as well.
Rgds,
Jocelyn
Hi Jocelyn Dart ,
nice blog, helped me a lot to get a view behind the scenes.
is it possible to skip the navigation on the list. So I just need a list to show a specific status and do not need to navigate. Did not find anything at the annotations which sounded like that.
Alternative I will create an second odata, which will show the details, but this would be just for workaraound, because noone need it.
~Florian
Hi Florian, Yes you can override the default navigation in the manifest.json file. There is help on this in the SAPUI5 SDK re Developing Apps with Fiori elements > Configuring Navigation
https://sapui5.hana.ondemand.com/#/topic/8bd546e27a5f41cea6e251ba04534d70
Rgds
Jocelyn
Dear Jocelyn Dart , Florian Henninger
I am trying to override the default navigation to an object page and implement cross application navigation in a standard Fiori list report.
I managed to do this using coding in a controller on a custom list report already.
The link you shared,Jocelyn Dart, is a little confusing to me. I would need to navigate to an external application (also registered on the launchpad) with two parameters from the original application. I'm using version 1.3.0 of sap.ui.generic app as the links states "The example above applies to sap.ui.generic.app->_version 1.2.0."
Any suggestions on how to achieve this?
Kind regards,
Maxim
Jocelyn,
I have a gridTable report, where I really need totals calculated. This report also has an Association to _line data.
I have found that if I add @DefaultAggregation: #SUM to the _parent CDS view, it changes the KEY of that view to GENERATED_ID, which breaks the navigation to _line (due to key mismatch).
Hi Tim,
Interesting... usually we opt for GUIDs as the technical id and then relate that back to a semantic key. You could perhaps use a table function for that? Or else just adjust the on condition of the $projection relationship between the parent and line views.
Rgds
Jocelyn
Two problems:
So, as it stands, it is impossible to get totals, unless you use an analytical view, and you can't navigate with an Analytical view....
Is there any other way to get calculated totals on Responsive, or gridTable? I tried local annotations, and it did NOT work.
Thanks,
Tim
Hi Tim,
Local annotations only adjust the UI - they can't make your OData Service provide new functionality. Since the aggregation itself (i.e. the totalling of values) needs to be part of the OData Service it needs to be part of the CDS View itself.
This is one of the reasons why it helps to use Metadata extensions rather than put all of your UI annotations inline in your CDS View. Using Metadata extensions helps you clarify, for both your developers and your support people, which annotations are directly influencing the UI, versus which annotations are influencing the capabilities of the OData Service itself.
Rgds
Jocelyn
And for what it is worth, this did not work either: @AbapCatalog.preserveKey: true, but it did change SQL view key back to semantic key.
Take a look at any SQL View with “Default Aggregation” (using SE11) — you see that all fields are key, but the “Generated_ID” will not be listed.
Hi Tim, what I would advise is looking at how this problem is solved in delivered Fiori apps in S/4HANA - if you don't have one perhaps grab a CAL Fully Activated Appliance to understand what is happening under the covers in a more advanced scenario than can be explained in a blog.
https://blogs.sap.com/2017/12/14/sap-s4hana-1709-fully-activated-appliance-create-your-sap-s4hana-1709-system-in-a-fraction-of-the-usual-setup-time/
My suspicion is that your approach may not be providing what you need because too much is being attempted in the one CDS view. Typically CDS Views are layered into a Virtual Data Model approach. Using those layers gives you the flexibility to combine transactional and analytical approaches.
In any case, at this point your questions are too specific to be handled as blog comments. So I recommend creating a separate post with the details of your issue including the backend system release and SAPUI5 release in answers.sap.com. That would also give the opportunity for some of our analytics experts to weigh in, rather than rely on a single blog author.
Rgds
Jocelyn
I debugged it, and found enough to search OSS. Unfortunately, I am on 7.50 not 7.52, but looks like this is fixed in 7.52 SP 1.
I will request a downport... who knows.
Tim
EUREKA (sort of)
After a ton of debugging, 30 seconds at a time, I have figured out that navigation works, IF all fields in ASSOCIATION condition are displayed in the List (not hidden) – in my case two of the fields are mandatory selection fields (so I didn’t display them)
I guess it makes sense, as the association were passed as “$projection”.
on $projection.gjahr = _line.gjahr
and $projection.monat = _line.monat
and $projection.kostl = _line.kostl
and $projection.hkont = _line.hkont
As association fields (gjahr and monat), were not “projected” (the hidden key fields), the generated_id did not include those fields, and not retrieved by:
if_sadl_gw_dpc_util~get_dpc( )->get_keys_from_analytical_id(
EXPORTING io_tech_request_context = io_tech_request_context
IMPORTING et_keys = DATA(lt_keys) ).
Sorry for adding so many comments to your blog…I need to look at alternative methods of association.
-Tim
Last comment. Problem solved.
Make sure all fields in the "on condition" ($projection or not) of an ASSOCIATION are specified (using Local Annotations) in:
Local Annotations->UI.PresentationVariant->RequestAtLeast
Thank you for all of your great posts.
-Tim
Glad you sorted it Tim! And thanks for posting the solution... it's always the non-obvious ones that are the most frustrating. But as you say it does make sense... with the benefit of hindsight!
Hi Jocelyn Dart,
I've added an Entity Set to our OData Service that return a hierarchy with annotations based on the section 2. Hierarchy using annotations of the blog post: TreeTable Odata binding. I want to consume that EntitySet on the ObjectPage of a Fiori Elements List Report Application. For that I've followed the example provided in Setting the Table Type. My sap.ui.generic.app section looks like this:
The SalesdocumentFlowSet content is displayed, but only in a normal Responsive Table and not in a TreeTable. Do you have any hint for me? Is there anywhere a full documentation of sap.ui.generic.app?
Best regards
Gregor
Hi Gregor
Ok so your manifest.json looks fine. However if the Fiori element is not happy with the hierarchy annotations it will default to a responsive table. Similarly if you render the table on a phone treetable setting will be ignored.
Those references are rather old.. you might want to cross check against the latest annotations reference for hierarchy annotations https://help.sap.com/viewer/cc0c305d2fab47bd808adcad3ca7ee9d/1709%20002/en-US/23473e6a8b1c4da2b0ba5be4f319a16c.html
This one on how the OData aggregation is interpreted also explains more about the grouping and filtering behaviour that is also related to hierarchy usage.
https://help.sap.com/viewer/cc0c305d2fab47bd808adcad3ca7ee9d/1709%20002/en-US/f352ab0a8fda4e3b8262927074f0b0c1.html
No we do not provide public documentation for sap.ui.generic.app itself nor are their any plans to do so. The template itself is updated very frequently. We do provide documentation for using the annotations.
I agree there's not much publically on the hierarchy annotations themselves. If I find a hint I'll add some more.
Rgds
Jocelyn
Hi Gregor,
Ok so with the latest versions the manifest.json has changed a little and you can try this approach instead:
"name"
:
"sap.suite.ui.generic.template.ObjectPage"
"settings"
: {
"sections"
: {
"to_ProductText::com.sap.vocabularies.UI.v1.LineItem"
: {
"navigationProperty"
:
"to_ProductText"
,
"entitySet"
:
"STTA_C_MP_ProductText"
,
"treeTable"
:
true
<Property Name=
"HIERARCHY_NODE"
Type=
"Edm.String"
Nullable=
"false"
MaxLength=
"32"
sap:hierarchy-node-
for
=
"HIERARCHY_NODE"
/>
// Odata annotation: sap:hierarchy-node-for
<Property Name=
"LEVEL"
Type=
"Edm.Int32"
sap:hierarchy-level-
for
=
"HIERARCHY_NODE"
/>
//Odata annotation: sap:hierarchy-level-for
<Property Name=
"PARENT_NODE"
Type=
"Edm.String"
MaxLength=
"32"
sap:hierarchy-parent-node-
for
=
"HIERARCHY_NODE"
/>
// Odata annotation: sap:hierarchy-parent-node-for
<Property Name=
"DRILLDOWN_STATE"
Type=
"Edm.String"
MaxLength=
"16"
sap:hierarchy-drill-state-
for
=
"HIERARCHY_NODE"
/>
// Odata annotation: sap:hierarchy-drill-state-for
Hi Gregor Wolf and Jocelyn Dart,
Any idea on how to add the sap:hierarchy annotations on calculation views, not on CDS views? Any possibility of adding similar parameters on the frontend (V4 annotations on WebIDE) instead of relying on the odata metadata?
Best regards,
André
Hi Jocelyn,
I added a question regarding generating hierarchy annotations for CDS for the SAP ALV tree control. I am having trouble generating the sap:hierarchy properties using annotations. I want to do this without using an MPC class. Can you please take a look at my question? Your help is appreciated. https://answers.sap.com/questions/13192367/sap-cds-how-to-add-hierarchy-annotations-saphierar.html
Thanks,
Jay
Hi Jocelyn Dart
I have successfully created my Fiori Elements List Tree table embedded together with CDS and also added annotation properties for my odata MPC method Define by followed this blog. It also same as what you mentioned at the top.
My Hierarchy/Tree report design is Business Partner(Parent/Root)->Supplier(child)->Company Code(child). When I implemented my selection search to Business Partner and Supplier in CDS, I encounter a problem the search function only work for Business Partner but not Supplier.
After I debug the odata request call I found out the filter always start with ‘LEVEL/hierarchy-level-for = 0 and (Business Partner=4000000000 and Supplier=”)’. Then I found out a SAP website mentioned I need to implement hierarchy-node-descendant-count-for so that the Fiori element search will know the Hierarchy level is not 0 and it will auto expand all the nodes.
After I implemented this annotation(hierarchy-node-descendant-count-for) it enable me to search for supplier however it break my hierarchy/tree structure mean my company code data all missing.
https://help.sap.com/viewer/468a97775123488ab3345a0c48cadd8f/1709.001/en-US/45250c7f2247410187bca9cfc4760127.html
Appreciate you can help me or share me any solution that I can fix the search child node issues. Custom UI5 Tree application will be my last choice to go.
Thank you.
Regards,
Gim
Hi Gim, It is very difficult for authors to respond to specific issues in blog comments. It can be quite some time when you are relying on one very busy person to get to your comment. Please Ask a Question with the topic "Fiori elements" where many others in the SAP Community can help you. Lots of customers, partners, independents, and SAP employees who already use SAP Fiori elements are there to help you!
Hi Jocelyn,
I am using a list report with responsive table. Is there any way to merge duplicate via annotations in CDS, If not how to achieve this functionality?
Thanks in advance.
Regards,
Monika
Able to merge duplicate via SAP UI5 Visual Editor.
Hello Jocelyn,
Can you please provide me the tutorials of CDS view for this project
Thanks in advance.
Regards,
Kaushik
Hi Kaushik,
Sorry there are no such tutorials. You need to work through the blog
Thanks
Jocelyn
Hello Jocelyn,
Thank you for this informative blog post.
I have a Question concerning I have made a List inside a fiori elements object page using Local annotation in the Web IDE. ( I has to be local because we ae merging data from SRM and ECC in the samme service )
By default the list has a Navigation arrow at the end of each line item.
How do I remove this?
Normally in Ui5 I can set list item type to "Inactive " and the will solve it.
but how is this done using Annotation ?
Best
August
Hi August
The > arrow at the end of each line is the default Expand option. You can remove this by adjusting the configuration to disable the navigation. See the section in the SAPUI5 SDK on Developing Apps using SAP Fiori elements > How to use SAP Fiori elements > Configuring Navigation > Changing Navigation to the Object Page.
Rgds
Jocelyn
Hi Jocelyn
This is a very informative blog post, thank you.
How would I add
sap:semantics="aggregate"
to my Services metadata within the CDS View?
Hi Jocelyn
I figured it out (beside it is stated in the blog post); However I had the problem that only one sum-up row was shown in the analytical table;
This is because the Line-Item keys has to be selected as well; this can be fixed using the RequestAtLeast-Annotation.
Best regards
Jan
Well done in sorting it out!
Hi Jocelyn,
By any chance can we set default grouping to 1 field in responsive table? So that user opens the app with group-by set. Like you mentioned, this only works for Grid and analytical table. If I want to customize, any hint on how i can start ?
Regards,
Tejas
Hi Tejas, Unfortunately grouping is not available at all in responsive tables. It is not supported.
Thanks
Jocelyn
Hey, we managed to achieve it with controller extension.
Well that's a new use for extensions I had not thought of! Well done. Worth blogging!
Hi Tejas,
May I know How did you achieve this via controller extension??
Thanks in advance.
Regards,
Abbilash
Thank You Jocelyn for the wonderful blog. Is there any chance to do this grouping on value help for entity properties..? Like I tried for one, but it's not reflecting.
I added value help annotation in MPC_EXT :
cl_fis_shlp_annotation=>create(
EXPORTING
io_odata_model = model
io_vocan_model = vocab_anno_model
iv_namespace = 'FAC_FINANCIAL_STATEMENT_SRV'
iv_entitytype = 'FinancialStatementList'
iv_property = 'ProfitCenter'
iv_search_help = 'FISSH_PRCTR'
iv_search_help_field = 'PRCTR'
iv_valuelist_entityset = 'PCHierSet'
iv_valuelist_property = 'ProfitCenter'
)->add_out_parameter( iv_property = 'ParentNode'
iv_valuelist_property = 'ParentNode'
)->add_out_parameter( iv_property = 'HierarchyNode'
iv_valuelist_property = 'HierarchyNode'
And able to see values like this. But i want see the grouped data for Parent Node Value (say). Is that possible via annotations ?
Many Thanks,
Gaurav
Hi Gaurav, As you can see it is very difficult for authors to respond to specific issues in blog comments. It can be quite some time when you are relying on one very busy person to get to your comment. Please post a question on https://answers.sap.com where many others in the SAP Community can help you. Lots of customers, partners, independents, and SAP employees who already use SAP Fiori elements are there to help you!
Jocelyn Dart Great blog! I have a similar requirement where I have to group the responsive table in an object page. I see now grouping is available from ui5 1.65 version.
However, I tried to extend the table, by setting group to 'true' onbeforetablerebind. It dint work. Would even the extensions not work? We are in version ui5 1.60.1
Thanks,
Shiny
Hi Shinynickitha, As you can see it is very difficult for authors to respond to specific issues in blog comments. It can be quite some time when you are relying on one very busy person to get to your comment. Please post a question on https://answers.sap.com where many others in the SAP Community can help you. Lots of customers, partners, independents, and SAP employees who already use SAP Fiori elements are there to help you!
Great Blog! I have a question.
My Value Help is not sortable and i can sort it in the Core Data Service.
I have a Table Function that give me the result in the correct order but if i consume this table function the result is in a wrong order. The sort doesnt work in the CDS that consume the table function with the correct order.
Could you Help me pls!
Hi Sven, As you can see it is very difficult for authors to respond to specific issues in blog comments. It can be quite some time when you are relying on one very busy person to get to your comment. Please post a question on https://answers.sap.com where many others in the SAP Community can help you. Lots of customers, partners, independents, and SAP employees who already use SAP Fiori elements are there to help you!
Hi Jocelyn Dart
I have a question regarding making totals or more then one level grouping by using to set sap:semantics to aggregate" I tried to set for a numeric field in my application created using ABAP programming model for fiori and it worked fine. list has totals , more then one level grouping.
But when i created a similar application using restful abap programming model and gave aggregation for field then list did not show any changes . no totals or multiple grouping option. what is the diff using same in application created using RAP . Can you please help?
Thanks
Amit Gupta
THIS POST IS NOW RETIRED – Please go directly to SAP Community topic for Fiori elements
Hi Jocelyn Dart,
I have applied the Default Sort Order and Group By on the Annotation file on my Fiori Elements app.I have four PresentationVarients for the same EntitySet with qualifiers.
Sorting is getting applied to the Analytical table but GroupBy is not getting applied. Our current UI5 version is 1.60.18. When i check it on the latest version this seems to work.
Do i need to add any additional attribute to make the Grouping to work on the lower UI5 versions?
Regards,
Srinivasan V
THIS POST IS NOW RETIRED – Please go directly to SAP Community topic for Fiori elements and ask your question there.
Hi Srinivisan ,
I am facing the same issue, could you get to a resolution? Thanks.
Hi Jocelyn,
Very nice blog, can you share some reference CDS and UI code for having sum in tree table as per your image shared in this blog.
We need this very desperately.
Regards
Ravi