3

I have an analytical view with the following columns - sid, name, age, gender, and marks. I cannot use select * because the gender column creates an error in viewing the output. Hence I have to select all the columns except gender to view the result. I have an OData service that queries the view.

The OData service is as follows -

      service {
        "_SYS_BIC"."test_package/AN_STUDENTS" as "query"
        keys ("sid","name","age")
        aggregates always (SUM of "marks");
      }
      settings {  
        support null;  
      } 

I can view the OData result only when I use $select.

http://testservice.xsodata/query?$select=sid,name,age

Can anyone please advise how to bind a sap.m table to this OData service with its item aggregation such that the $select part is implemented in the OData call itself directly?

gkubed
  • 1,849
  • 3
  • 32
  • 45
KEB Nelson
  • 121
  • 5
  • 14
  • Is something missing from [Dopedev's answer](https://stackoverflow.com/a/40582849/5846045)? Otherwise, please accept his answer to inform others that this issue is solved now. – Boghyon Hoffmann Dec 15 '17 at 11:39

1 Answers1

5

Use parameters option with select key to specify properties to retrieve.

<List items="{path:'query', parameters: {select: 'sid,name,age'}}">
</List>
Ashish Patil
  • 1,624
  • 2
  • 11
  • 27