Skip to Content
author's profile photo Former Member
Former Member

Smart Table with Northwind odata giving error

Hi All,

I am developing smart table control with Northwind OData service when i run this application i am getting some error i am posting that screen shot please look on it.

And my code is :

View :

<smartTable:SmartTable id="smartTable_ResponsiveTable" smartFilterId="smartFilterBar" tableType="ResponsiveTable" editable="false" entitySet="Products" useVariantManagement="false" useTablePersonalisation="false" header="Products" showRowCount="true" useExportToExcel="false" enableAutoBinding="true"></smartTable:SmartTable>


<?xml version="1.0" encoding="utf-8"?> <edmx:Edmx Version="1.0" xmlns:edmx="" xmlns:m="" xmlns:sap="" xmlns:p8=""> 

<edmx:Reference Uri="http://server:port/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName=’%2FIWBEP%2FVOC_CORE’,Version=’0001′,SAP__Origin=”)/$value" xmlns:edmx=""> <edmx:Include Namespace="" Alias="UI"/> 


<edmx:DataServices m:DataServiceVersion="2.0"> 

<Schema Namespace="" sap:schema-version="1" xmlns=""> 

<EntityType Name="Product"> 

<Key> <PropertyRef Name="ProductID"/> </Key>

 <Property Name="ProductID" Type="Edm.String" sap:filterable="false" sap:visible="true"/> <Property Name="ProductName" Type="Edm.String" MaxLength="30" sap:label="ProductName" sap:filterable="false" /> <Property Name="CategoryID" Type="Edm.String" sap:label="CategoryID" sap:filterable="true" /> <Property Name="UnitPrice" Type="Edm.String" MaxLength="3" sap:label="UnitPrice" sap:filterable="false" /> 


<EntityContainer m:IsDefaultEntityContainer="true" sap:supported-formats="atom json"> 

<EntitySet Name="Products" EntityType=""/>


<Annotations Target="" xmlns=""> <Annotation Term=""> <Collection> <Record Type=""> <PropertyValue Property="Value" Path="ProductID"/> </Record> <Record Type=""> <PropertyValue Property="Value" Path="UnitPrice" /> </Record> <Record Type=""> <PropertyValue Property="Value" Path="ProductName" /> </Record> <Record Type=""> <PropertyValue Property="Value" Path="CategoryID" /> </Record> </Collection> </Annotation> </Annotations> <atom:link xmlns:atom="" rel="self” href=”$metadata"/> 




manifest.json :

"dataSources": {
			"mainService": {
				"uri": "/destinations/northwind/V2/Northwind/Northwind.svc/",
				"type": "OData",
				"settings": {
					"odataVersion": "2.0",
					"localUri": "test/metadata.xml"

This is my code please look on it and resolve my issue.


Sai Ram Dinesh Pallapotu

capture.png (21.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Former Member

    Hi All,

    Like above i'm trying to develop smart controls using JSON Model data that is instead of OData. This time without annotations and by using <itiallyVisibleFields="id,name"> i'm trying to show the data but i'm getting same error like above that is "There are no columns....."

    Please say how to achieve this functionality.

    Sai Ram Dinesh Pallapotu

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2016 at 02:58 PM

    The northwind oData is not annotated. You need to annotate it in a separate annotations file e.g. annotation.xml (rather then the metadata.xml as you are doing just now) and then link it to your data source in manifest.json. If you are using WEB IDE then you can use the following: Annotation Modeller and when you create it should link it automatically. The metadata.xml file should have the annotations only if they are annotated in the backend and you have manually added it in there.

    I know the documentation of Smart Table is very poor and it is hard to get your head around. The annotations are only telling which columns of the table should be initially visible. You can achieve the same by using property initiallyVisibleFields of the Smart Table

    Check the following code. It should display the product name.

    <sap.ui.comp.smarttable:SmartTable xmlns:sap.ui.comp.smarttable="sap.ui.comp.smarttable" 
    				tableType="ResponsiveTable" header="Smart Table"
    				enableAutoBinding="true" id="table" 
    				entitySet="Products" initiallyVisibleFields="ProductName"/>
    Add comment
    10|10000 characters needed characters exceeded

    • Create local annotation file and then in annotation modeller add "UI.LineItem" to define initially visible columns.

      <Annotation Term="UI.LineItem">
      		<Record Type="UI.DataField">
      			<PropertyValue Property="Label" String="Product"/>
      			<PropertyValue Property="Value" Path="ProductID"/>



  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2016 at 02:47 PM

    Hello Sai Ram Dinesh,

    Anete has described a workaround by using the code editor. Of course this is a valid workaround.
    But I'm glad to inform you that we meanwhile fixed the bug at the Annotation Editor too: it now looks for the entityContainer through all schemas. This fix should already be present in the WebIDE.

    Best regards,


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Stefan,

      Thank you so much for informing about this :). I tried in WebIDE and I'm able to do code annotation file using Annotation Modeler.

      I have another issue please see following link.

      In above I have used OData service and able to work with smart table and Annotation Modeler but now I have to use the JSONModel. In this case please suggest me how to use smart table and Annotation Modeler (or how to write annotation.xl manually) to use JSONModel in my application.

      Sai Ram Dinesh Pallapotu

  • author's profile photo Former Member
    Former Member
    Posted on Feb 15, 2017 at 04:49 PM


    I have a little different requirement, my odata version is V2 and service is created without vocabulary so no annotation are part of odata service metadata.

    my question is

    1. Can I use create a local annotation to have intial fields, value list so on with smart tabel

    2. then data will come from odata

    so data to smart table is from odata service, metadata is on local can this combination work for smart table? if yes please provide steps for the same.

    Thank you,


    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 13, 2017 at 08:44 AM

    Hello Basavaraja,

    If you plan to use the smart table, you indeed need annotations - being local or coming from any backend system.
    You can use a local annotation file in this case (at least as long as you are not working on SAP applications, then you would have to consider more constraints with regards to layering and delivery).
    Note the option of the WebIDE to create a local annotation via the context menu New > Annotation File.

    But in any case these annotation files MUST refer to a vocabulary, the references must be part of the annotation edmx.
    If you follow the proposed way with the context menu, a template will be applied that leads to an annotation file comprising the standard references.

    Add comment
    10|10000 characters needed characters exceeded