2024 Apr 23 2:31 PM - edited 2024 Apr 23 2:32 PM
I am using ABAP CDS and an Odata service to create a Fiori Elements app (List Report and Object Pages). I'm having issues with making the grouping annotation work correctly, while setting the grouping manually on the app works fine.
Here is the relevant code from the CDS:
[...]
@UI: {
presentationVariant: [{
groupBy: [ 'CriteriaType' ],
sortOrder: {
by: 'CriteriaType'
},
visualizations: [{
type: #AS_LINEITEM
}]
}]
}
define view ZABAC_VOBJ_CRIT_NB_DEFAULT
as select from ZABAC_VOBJECT_CRIT_NB
association [*] to ZABAC_VCRILOADTYPE_TEXT as _criteria_type_text on $projection.CriteriaType = _criteria_type_text.CriteriaTypeId
[...]
{
[...]
@ObjectModel.text.association: '_criteria_type_text'
@ObjectModel.readOnly: true
@EndUserText.label: 'Type de critère'
// @UI.lineItem: [{ position: 25, importance: #HIGH }]
_criteria.criteria_type as CriteriaType,
[...]
}
Here is how the table renders by default on the app (responsive table on an Object Page). Sorting does work correctly:
I can set the grouping manually inside the app, so grouping is possible with this table type:
The service has been refreshed and regenerated multiple times, and the metadata has been reloaded both on the backend side and on the Fiori Elements application. I also tried clearing/invalidating the caches, with no effect.
According to the documentation, the current version of the CDS should be enough to make this work. Am I missing something?
Thank you for your help
Request clarification before answering.
If you're using OData V4, try adding a UI.SelectionPresentationVariant that points to the UI.PresentationVariant.
https://sapui5.hana.ondemand.com/#/topic/49a6ba5b8d6946208322a9f7e16837c2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
58 | |
10 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.