cancel
Showing results for 
Search instead for 
Did you mean: 

group option is missing in smart table with Analytical table

former_member374496
Participant
0 Kudos

Hi Experts,

i am using smart table type as AnalyticalTable, and when i do so the group option is not coming in smart control setting button, Please Help,

please find the below code :

<core:View xmlns:core="sap.ui.core" xmlns:smartTable="sap.ui.comp.smarttable" xmlns:html="http://www.w3.org/1999/xhtml" controllerName="SmartTest.controller.View1" xmlns:table="sap.ui.table" xmlns="sap.m">

<smartTable:SmartTable id="AnalyticalTableID" useExportToExcel="true" entitySet="Results" tableType="AnalyticalTable" useVariantManagement="true" useTablePersonalisation="true" showTablePersonalisation="true" header="Line Items" showRowCount="true" persistencyKey="vehicleDetails.smartTable" enableAutoBinding="true" beforeRebindTable="onBeforeRebindTableExtension" requestAtLeastFields="EVT_DATE,VEHICLE_TYPE,OWNER_NAME,VEHICLE_NAME,VILLAGE_TRIPS">

<table:Table id="Table1">

<table:columns>

<table:Column filterProperty="EVT_DATE" leadingProperty="EVT_DATE"> <table:customData> <core:CustomData key="p13nData" value='\{"columnKey": "EVT_DATE","leadingProperty": "EVT_DATE","filterProperty": "EVT_DATE"}'/> </table:customData> <Label text="EVT_DATE"/> <table:template> <Text text="{path : 'EVT_DATE', type : 'sap.ui.model.type.Date',formatOptions: { style : 'medium'}}"/> </table:template> </table:Column> <table:Column sortProperty="VEHICLE_NAME" filterProperty="VEHICLE_NAME" leadingProperty="VEHICLE_NAME"> <table:customData> <core:CustomData key="p13nData" value='\{"columnKey": "VEHICLE_NAME","leadingProperty": "VEHICLE_NAME","sortProperty": "VEHICLE_NAME","filterProperty": "VEHICLE_NAME"}'/> </table:customData> <Label text="VEHICLE_NAME"/> <table:template> <Text text="{VEHICLE_NAME}"/> </table:template> </table:Column> <table:Column sortProperty="VEHICLE_TYPE" filterProperty="VEHICLE_TYPE" leadingProperty="VEHICLE_TYPE"> <table:customData> <core:CustomData key="p13nData" value='\{"columnKey": "VEHICLE_TYPE","leadingProperty": "VEHICLE_TYPE","sortProperty": "VEHICLE_TYPE","filterProperty": "VEHICLE_TYPE"}'/> </table:customData> <Label text="VEHICLE_TYPE"/> <table:template> <Text text="{VEHICLE_TYPE}"/> </table:template> </table:Column> <table:Column filterProperty="OWNER_NAME" leadingProperty="OWNER_NAME"> <table:customData> <core:CustomData key="p13nData" value='\{"columnKey": "OWNER_NAME","leadingProperty": "OWNER_NAME","filterProperty": "OWNER_NAME"}'/> </table:customData> <Label text="OWNER_NAME"/> <table:template> <Text text="{OWNER_NAME}"/> </table:template> </table:Column>

</table:columns> </table:Table> </smartTable:SmartTable> </core:View>

Please Help.

Accepted Solutions (1)

Accepted Solutions (1)

jamie_cawley
Advisor
Advisor
0 Kudos

Maybe you didn't copy your entire view, it's not a valid structure? You can find an example at

https://sapui5.hana.ondemand.com/explored.html#/sample/sap.ui.comp.sample.personalization.example5/c...

Regards,

Jamie

former_member374496
Participant
0 Kudos

Hi Jamie Cawley,

Thank you for replying, i have referred the same link , please find the attachments for the output , where the grouping is missing, and also i am using custom fields to display.

Thanks,

Pradeep

Answers (3)

Answers (3)

jamie_cawley
Advisor
Advisor

In the example refer to the metadata doc

https://sapui5.hana.ondemand.com/explored.html#/sample/sap.ui.comp.sample.personalization.example5/c...

Within here you will find the annotations

sap:semantics and sap:aggregation-role

The smart template relies on these for grouping. Does your service include these?

Regards,

Jamie

former_member374496
Participant
0 Kudos

Hi

you mean to say, there should be annotations should be provided in the back end Odata service?

jamie_cawley
Advisor
Advisor
0 Kudos

Yes, the smart table uses them to determine how to use the data.

Regards,

Jamie

former_member374496
Participant
0 Kudos

is it not possible to handle form the front end annotaion?

former_member374496
Participant
0 Kudos

Could you please share any example if you have any,?

Former Member
0 Kudos

Hi,

I am facing the same issue, where you able to solve this ?

former_member374496
Participant
0 Kudos

Screen Shot attached for the reference.