cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

List Report with OData V4: totals not supported?

MioYasutake
SAP Champion
SAP Champion
0 Likes
6,335

Hi experts,

I have created an experimental list report on top of OData V4 service generated with RAP.

The issue is, totals line is not displayed as it would with V2 service.

V4 (UI5 versoin: 1.90.6)

V2

CDS View annotations:

When I run the same app with UI5 version 1.106.1, there is an error in the console and search could not be executed. Totals with OData v4 is not yet supported, or I did something wrong?

Regards,

Mio

Accepted Solutions (1)

Accepted Solutions (1)

MioYasutake
SAP Champion
SAP Champion

I raised a support ticket and they confirmed that Analytical Table is not supported with RAP OData V4.

Troy_Li
Explorer
0 Likes

Hi Mio,

Can you please help to mentioned SAP replied in ticket raised by you?

I face the same issue with RAP V4 OData for Fiori Element APP with Analytical Table.

Thanks a lot.

maxstreifeneder1
Explorer
0 Likes
same issue here. any updates? 🙂

Answers (4)

Answers (4)

MrVila
Participant
0 Likes

Hi, I face the same error in UI5 v1.120.30. Is there any workaround? 

1.120.30.jpg
marcel_waechter
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Mio,

sorry this was misleading. This Aggregation.default is an annotation that is exposed from CAP services, although not needed by the client and not evaluated from Fiori elements. The plan is to not add it to the $metadata document in CAP services in the future.

But for sure it does not make any sense to mention it in this documentation. I already triggered the change so it disappears. Thanks so much for coming up with this.

Therefore, can you remove the Aggregation.default annotation from your example? Does it work without it?

Best regards,
Marcel

MioYasutake
SAP Champion
SAP Champion
0 Likes

Hi marcel.waechter,

Sorry for late reply. I have removed "<Annotation Term="Analytics.Measure" Bool="true"/>" and now the annotation looks like below.

        <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="local">
            <Annotations Target="SAP__self.PurchaseOrderItemType">
                <Annotation Term="Aggregation.ApplySupported">                    
                </Annotation>
            </Annotations>

            <Annotations Target="SAP__self.PurchaseOrderItemType/GrossAmount">                
                <Annotation Term="Analytics.Measure" Bool="true"/>
            </Annotations>

            <Annotations Target="SAP__self.Container">
                <Annotation Term="Aggregation.CustomAggregate" Qualifier="GrossAmount" String="Edm.Decimal"/>
            </Annotations>
        </Schema>

There is no significant errors in the console, but I still don't see the totals.

I have a similar issue with CAP based list report as well.

Is AnalyticalTable for OData V4 desinged to show totals line?

marcel_waechter
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Mio,

you also need to define the properties that are aggregable. You can find some examples here:
https://sapui5.hana.ondemand.com/#/topic/7f844f1021cd4791b8f7408eac7c1cec

Only if there is at least one the analytical table with the sums and grouping functionality is used.

Best regards,
Marcel

<Annotations Target="sap.fe.managepartners.ManagePartnersService.BusinessPartners/SalesAmount"> <Annotation Term="Aggregation.default" EnumMember="Aggregation.defaultType/SUM"/> <Annotation Term="Analytics.Measure" Bool="true"/> </Annotations> // At the entity level you must also define the Aggregation.CustomAggregate annotation which has the property name as the qualifier: <Annotations Target="sap.fe.managepartners.ManagePartnersService.EntityContainer"> <Annotation Term="Aggregation.CustomAggregate" Qualifier="SalesAmount" String="Edm.Decimal"/> </Annotations>

MioYasutake
SAP Champion
SAP Champion
0 Likes

Hi Marcel,

Thank you for your comment. I have added below annotation, but I see an error "Annotation 'Aggregation.default' is not available in vocabulary 'Org.OData.Aggregation.V1'.

            <Annotations Target="SAP__self.PurchaseOrderItemType">
                <Annotation Term="Aggregation.ApplySupported">                    
                </Annotation>
            </Annotations>

            <Annotations Target="SAP__self.PurchaseOrderItemType/GrossAmount">                
                <Annotation Term="Aggregation.default" EnumMember="Aggregation.defaultType/SUM"/>
                <Annotation Term="Analytics.Measure" Bool="true"/>
            </Annotations>

            <Annotations Target="SAP__self.Container">
                <Annotation Term="Aggregation.CustomAggregate" Qualifier="GrossAmount" String="Edm.Decimal"/>
            </Annotations>

The following is the namespace I'm using. Is this correct one?

    <edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.xml">
        <edmx:Include Namespace="Org.OData.Aggregation.V1" Alias="Aggregation"/>
    </edmx:Reference>

Thanks,

Mio

marcel_waechter
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Mio,
we do support also the Analytical Table in SAP Fiori elements for OData v4. You can find some information here: https://ui5.sap.com/#/topic/c0f6592a592e47f9bb6d09900de47412

But we introduced the support at a later point of time.
I can't judge the issue with 1.106.1 right now. Can you give it a try to use 1.107?

Best regards,
Marcel

MioYasutake
SAP Champion
SAP Champion
0 Likes

Hi marcel.waechter,

Thanks for your response.

I tried with 1.107.1, but still no luck.

I added the blow local annotation as explained here, and the error "Cannot combine $$getKeepAlive Context and $$aggregation ..." was gone. But the totals were not displayed.

<Annotations Target="SAP__self.Container/PurchaseOrderItem">
                <Annotation Term="Aggregation.ApplySupported">                    
                </Annotation>
            </Annotations>

Best regards,

Mio Yasutake

vrbaaa
Newcomer
0 Likes
Hi Mio,