Skip to Content
0

Smart Chart using Annotation Modeler on SAP Web IDE

Jan 02, 2017 at 02:43 PM

416

avatar image

Hi all,

I am trying to create a Smart Chart by using the Annotation Modeler on SAP Web IDE. I read the examples on https://sapui5.hana.ondemand.com but I cannot find out what I missing.I am taking the following error:

When I am using the standard approach, implementing the whole logic with the standard components, everything works fine. Also, I placed some Smart Tables on my application and they correctly work.

I've tried a dozen of combinations regarding variables, chart types and annotation definition. Nothing worked at all.

Is there any available tutorial/example? I feel that I missing something on Annotation Definition

View.xml

<smartChart:SmartChart id="ItemsSmartChart" entitySet="ChartEcenterVsGlycol" smartFilterId="SmartFilterBar" 
showFullScreenButton="true" useChartPersonalisation="true" enableAutoBinding="true" showDetailsButton="false"
width="100%"/>

Annotation.xml

<Annotations Target="....ChartEcenterVsGlycolType">
<Annotation Term="UI.Chart">
<Record Type="UI.ChartDefinitionType">
<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Line"/>
<PropertyValue Property="Measures">
<Collection >
   <PropertyPath>Ecentricity</PropertyPath>
</Collection>
</PropertyValue>
<PropertyValue Property="Dimensions">
<Collection >
  <PropertyPath>DateRecTime</PropertyPath>
</Collection>
</PropertyValue>
</Record>
</Annotation>
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Dimitrios Agagiotis
Jan 05, 2017 at 11:08 AM
1

I found out the solution of this case. Chart examples on SAPUI5 SDK are correct. The issue happened from oData perspective. OData produced by HANA and they didn't have the necessary annotations. I solved it by adding the following. aggrketegates always and enable OData4SAP are the keys.

 service  { 
"test.Backend.db.views::A_CALCULATION_VIEW"
 as "AnODATAEntity" key generate local "GenID"
 aggregates always; 
}  

annotations {
   enable OData4SAP;
}


Share
10 |10000 characters needed characters left characters exceeded
Aidon Li Feb 24, 2017 at 08:07 AM
0

Hi Dimitrios Agagiotis,

I am currently also working on the smartchart. I am facing the problems cause I am new to use the annotation. Also the odata I am using is not from HANA, it's from ECC gateway.

1. For odata service in gateway, there is function to create odata model with annotation, if this part of the process which I need to implement before I use smartchart with annotation?

2. For annotation modeler on sap web ide, once I created the annotation file, how to connected to the smartchart for use? Could you give some detail about the configuration and binding?

3. The fix you used, where should the configration located? manifest file or somewhere else?

Great Thanks.

Aidon

Share
10 |10000 characters needed characters left characters exceeded