Skip to Content

SAPUI5 Smartchart sorting or filtering isn't triggering correct get request

I am trying to get the smartchart filtering to work. I have tried this on several different charts, data-sources, applications and odata services.

  1. Create an app
  2. Create a smart table
  3. Create a smart smart
  4. Use same data-source for both (odata entityset)

-> Apply sorting on anything

On the table this work just fine, if you check the GET request in chrome developer view:

GET Z_I_OTHEREVENTS_Z1?$skip=0&$top=58&$orderby=event_code%20asc&$select=event_code%2cext_loc_id%2ctor_id%2cyear_%2cmonth_ HTTP/1.1

On the smartchart however nothing is sorted or filtered, because the GET request isn't correct:

GET Z_I_OTHEREVENTS_Z1?$skip=0&$top=58 HTTP/1.1

What am I doing wrong? Why is the GET request not being properly built?

Here my XML:

<mvc:View xmlns:core="sap.ui.core" xmlns="sap.m" controllerName="test1.test1.controller.View1" xmlns:smartchart="sap.ui.comp.smartchart"
    xmlns:sl="sap.ui.comp.navpopover" xmlns:mvc="sap.ui.core.mvc" xmlns:data=""
    xmlns:smartTable="sap.ui.comp.smarttable" xmlns:smartFilterBar="sap.ui.comp.smartfilterbar">
        <smartTable:SmartTable id="LineItemsSmartTable" entitySet="Z_I_OTHEREVENTS_Z1"  tableType="Table"
            useExportToExcel="true" beforeExport="onBeforeExport" useTablePersonalisation="true" header="Line Items"
            showRowCount="true" initiallyVisibleFields="event_code" enableAutoBinding="true">
            <!-- layout data used to make the table growing but the filter bar fixed -->
                <FlexItemData growFactor="1" baseSize="0%"/>
            <smartchart:SmartChart enableAutoBinding="true" entitySet="Z_I_OTHEREVENTS_Z1" chartType="bar"></smartchart:SmartChart>
Add a comment
10|10000 characters needed characters exceeded

  • Hi, can you give us your annotations please?



  • Here my Annotations. Thank you so much for helping me.

    <Annotations Target="Z_I_OTHEREVENTS_Z1_CDS.Z_I_OTHEREVENTS_Z1Type">
    				<Annotation Term="UI.Chart">
    					<Record Type="UI.ChartDefinitionType">
    						<PropertyValue Property="Title" String="Gross Amount by Customer"/>
    						<PropertyValue Property="Description" String="Line-chart displaying the gross amount by customer"/>
    						<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Column"/>
    						<PropertyValue Property="Dimensions">
    						<PropertyValue Property="Measures">
    				<Annotation Term="UI.LineItem">
    						<Record Type="UI.DataField">
    							<PropertyValue Property="Value" Path="event_code"/>
    						<Record Type="UI.DataField">
    							<PropertyValue Property="Value" Path="ext_loc_id"/>
    						<Record Type="UI.DataField">
    							<PropertyValue Property="Value" Path="tor_id"/>
    						<Record Type="UI.DataField">
    							<PropertyValue Property="Value" Path="year_"/>
    						<Record Type="UI.DataField">
    							<PropertyValue Property="Value" Path="month_"/>

Related questions

1 Answer

  • Best Answer
    Posted on Apr 01 at 12:24 PM

    I found the issue. Setting the Opertation Mode to "Auto" in the Manifest results in the Smartchart not binding the correct GET request.

    Setting the Operation Mode to Server solves this issue.

    Can someone explain?

    unbenannt.png (86.9 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.