avatar image
Former Member

SmartTable Binding with HANA Based oData service (generated from Calculation View)

I am trying to bind SmartTable with odata service but table showing 'No Data'. My SmartTable code in View as below:

<smartTable:SmartTable
                    id="PersonSmartTable"
                    entitySet="DataSetInODataService"
                    tableType="ResponsiveTable"
                    useExportToExcel="false"
                    useVariantManagement="false"
                    useTablePersonalisation="true"
                    header="The Persons"
                    showRowCount="true"
                    enableAutoBinding="true">
                <!-- layout data used to make the table growing but the filter bar fixed -->
                
                <smartTable:layoutData>
                    <FlexItemData growFactor="1"/>
                </smartTable:layoutData>
            </smartTable:SmartTable>

In same View I have used data binding using same OData Service and it is working. Row binding code like

rows="{ path: 'oData 2 Model Name>/DataSetInODataService' }"

I have mentioned Model in 'manifest.json' (at model section) and model can be accessible from controller because I can get model with the code.

var oModel = this.getView().getModel(MODEL NAME)

I am sure but might beproblem is happening due to $metadata. I can see metadata in service, if check in browser by typing URL as below.

Server URL / HANA_ODATA_SERVICES.xsodata?$metadata

Do I need to write something for annotations or it will manage automatically?

If I need to create metadata.xml file and need to load in manifest.json? It will be very helpful you anyone can give some example code wher SmartTable working with HANA Based odata service.

Thanks

Suman

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers

Skip to Content