on 04-18-2016 1:12 PM
Hi Experts,
I am working in SAPUI5 Smart Controls- Smart Table. I am using MockData.json and Created the required metadata file and instantiated the Mock-server for the Smart control . i have tried to embedded the Responsive Table and Table with my Smart Table, it is working as expected. But i dont see the horizontal scroll bar in my responsive Table, so that i have tried with table type as Table. i got the horizontal scroll bar, but without Group option in the Filter section. Please refer the below image.
1. Table embedded with Smart-table:
2.After pressed the Personalisation Button at the top, Filter tab opened:
But i have checked this code at SAPUI5 explored, there it was explained that if i change the table type as Analytical-table, i will get the same output with Group tab enabled.
but when i try that code in my work space i am getting some service error.
3. Smart Control Analytical table Code:
4. Error message at my console:
Should i need to change anything at my metadata.xml for this Analytical table?
Please help me on this!!
Thank you,
Regards,
JK
Seems there is some issue in GET_ENTITYSET method for 'ControlPerformances' entity.
Can you check the call in Networks tab?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi JK,
The Smart Controls are called 'Smart' because based on metadata they can automatically construct the view details. In case of Smart Table Control based on the Line Type (Equivalent to Entityset for operational purposes) it will create the view and you need not specify the columns explicitly.
Yes, Metadata needs to be adapted with annotations when you use Smart Controls.
Please update the metadata of file. Check this for Smart Table example -
BR.
Thank you Ankit for the reply,
Yes i have read the concept regarding smart controls and metadata etc. But In my case the problem is i guess with the meta data definition. does it differ for normal table and analytical table?
For more info, i am referring the below mentioned code in the SAPUI5 Explored.(Please Refer the Image)
I dont find any difference in the code at the view. the same thing i am trying to implement my case, but not working.
My Metadata.xml:
//code starts
<edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"
Version="1.0">
<edmx:DataServices
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
m:DataServiceVersion="2.0">
<Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm"
xmlns:sap="http://www.sap.com/Protocols/SAPData" Namespace="com.greenlight.common.oData2"
sap:schema-version="1">
<EntityType Name="ControlPerformance">
<Key>
<PropertyRef Name="ControlPerformanceKey" />
</Key>
<Property Name="ComplianceArea" Type="Edm.String" sap:creatable="false" sap:updatable="false" sap:sortable="true"
sap:label="Compliance Area" />
<Property Name="Regulation" Type="Edm.String" sap:label="Regulation"
sap:creatable="false" sap:updatable="false" sap:sortable="true"/>
<Property Name="LineofBusiness" Type="Edm.String" sap:label="Line of Business"
sap:creatable="false" sap:updatable="false" sap:sortable="true" />
<Property Name="Requirement" Type="Edm.String"
sap:label="Requirement" sap:creatable="false" sap:updatable="false" sap:sortable="true" />
<Property Name="Organization" Type="Edm.String" sap:label="Organization"
sap:creatable="false" sap:updatable="false" sap:sortable="true"/>
<Property Name="Process" Type="Edm.String" sap:label="Process"
sap:creatable="false" sap:updatable="false" sap:sortable="true" />
<Property Name="SubProcess" Type="Edm.String" sap:label="Sub Process"
sap:creatable="false" sap:updatable="false" sap:sortable="true"/>
<Property Name="Control" Type="Edm.String" sap:label="Control"
sap:creatable="false" sap:updatable="false" sap:sortable="true" />
<Property Name="ControlOwner" Type="Edm.String" sap:label="Control Owner"
sap:creatable="false" sap:updatable="false" sap:sortable="true" />
<Property Name="Monitor" Type="Edm.String" sap:label="Monitor"
sap:creatable="false" sap:updatable="false" sap:sortable="true" />
<Property Name="AssetGroup" Type="Edm.String"
sap:label="Asset Group" sap:creatable="false"
sap:updatable="false" sap:sortable="true" />
<Property Name="Asset" Type="Edm.String" sap:label="Asset"
sap:creatable="false" sap:updatable="false" sap:sortable="true" />
<Property Name="AssetOwner" Type="Edm.String" sap:label="Asset Owner"
sap:creatable="false" sap:updatable="false" sap:sortable="true" />
<Property Name="Risk" Type="Edm.String" sap:label="Risk"
sap:creatable="false" sap:updatable="false" sap:sortable="true" />
<Property Name="Status" Type="Edm.String" sap:label="Status"
sap:creatable="false" sap:updatable="false" sap:sortable="true" />
<!-- <Property Name="LastVerifiedDate" Type="Edm.DateTime" sap:display-format="Date" sap:label="Last Verified Date"
sap:creatable="false" sap:updatable="false" sap:sortable="true" /> -->
</EntityType>
<EntityContainer Name="ODataEntityContainer"
m:IsDefaultEntityContainer="true">
<EntitySet Name="ControlPerformances" EntityType="com.greenlight.common.oData2.ControlPerformance" />
</EntityContainer>
<Annotations xmlns="http://docs.oasis-open.org/odata/ns/edm"
Target="com.greenlight.common.oData2.ControlPerformance">
<Annotation Term="com.sap.vocabularies.UI.v1.LineItem">
<Collection>
<Record Type="com.sap.vocabularies.UI.v1.DataField">
<PropertyValue Property="Value" Path="ComplianceArea" />
</Record>
<Record Type="com.sap.vocabularies.UI.v1.DataField">
<PropertyValue Property="Value" Path="Regulation" />
</Record>
<Record Type="com.sap.vocabularies.UI.v1.DataField">
<PropertyValue Property="Value" Path="LineofBusiness" />
</Record>
<Record Type="com.sap.vocabularies.UI.v1.DataField">
<PropertyValue Property="Value" Path="Requirement" />
</Record>
<Record Type="com.sap.vocabularies.UI.v1.DataField">
<PropertyValue Property="Value" Path="Organization" />
</Record>
<Record Type="com.sap.vocabularies.UI.v1.DataField">
<PropertyValue Property="Value" Path="Process" />
</Record>
<Record Type="com.sap.vocabularies.UI.v1.DataField">
<PropertyValue Property="Value" Path="SubProcess" />
</Record>
<Record Type="com.sap.vocabularies.UI.v1.DataField">
<PropertyValue Property="Value" Path="Control" />
</Record>
<Record Type="com.sap.vocabularies.UI.v1.DataField">
<PropertyValue Property="Value" Path="ControlOwner" />
</Record>
<Record Type="com.sap.vocabularies.UI.v1.DataField">
<PropertyValue Property="Value" Path="Monitor" />
</Record>
<Record Type="com.sap.vocabularies.UI.v1.DataField">
<PropertyValue Property="Value" Path="AssetGroup" />
</Record>
<Record Type="com.sap.vocabularies.UI.v1.DataField">
<PropertyValue Property="Value" Path="Asset" />
</Record>
<Record Type="com.sap.vocabularies.UI.v1.DataField">
<PropertyValue Property="Value" Path="AssetOwner" />
</Record>
<Record Type="com.sap.vocabularies.UI.v1.DataField">
<PropertyValue Property="Value" Path="Risk" />
</Record>
<Record Type="com.sap.vocabularies.UI.v1.DataField">
<PropertyValue Property="Value" Path="Status" />
</Record>
<!-- <Record Type="com.sap.vocabularies.UI.v1.DataField">
<PropertyValue Property="Value" Path="LastVerifiedDate" />
</Record> -->
</Collection>
</Annotation>
</Annotations>
</Schema>
</edmx:DataServices>
</edmx:Edmx>
//code ends
Hi Jayakrishnan,
I faced the same issue with Analytical Table type of Smart table.
What helped for me that I added the following annotaion to the EntityType level:
sap:semantics="aggregate"
and to each Property of this EntityType you expose I added:
sap:aggregation-role="dimension"
I was also looking at this demo kit smart table + analytical
and fetched the metadata.xml through the Network..
Hope it will help you
Regards,
Vered
Hi Vered,
It is working partially, as you suggested i have added the value in my metadata. But it is working for single property. But if i have more property in my metadata i am not getting the table. it is saying loading loading with busy dialogue.
Error:
undefined:1 Uncaught (in promise) filter expression does not contain required property BusinessGroup_OrganizationName
metadata.xml:
<edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"
Version="1.0">
<edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="UI"/>
<edmx:DataServices
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
m:DataServiceVersion="2.0">
<Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm"
xmlns:sap="http://www.sap.com/Protocols/SAPData" Namespace="com.greenlight.common.oData2"
sap:schema-version="1">
<EntityType Name="Organization" sap:semantics="aggregate">
<Key>
<PropertyRef Name="OrganizationKey" />
</Key>
<Property Name="OrganizationKey" Type="Edm.String" Nullable="fasle"
sap:filterable="true" sap:creatable="true" sap:updatable="true"
sap:required-in-group="true" sap:aggregation-role="dimension" />
<Property Name="BusinessGroup_OrganizationName" Type="Edm.String"
sap:creatable="false" sap:updatable="true" Nullable="fasle"
sap:required-in-filter="true" sap:aggregation-role="dimension" />
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.