Skip to Content

Transform SAP BW Queries into OData Service: Part 2 – Analyze OData Analytics Service

     In Transform SAP BW Queries into OData Service: Part 1 – Generation and Activation you were able to generate and activate an OData Analytic Service. In this post I will explain how to interpret the Service and Metadata document.

     An OData Analytic Service is no different from any other OData service except that it is annotated with SAP specific annotations that enriches its semantic and behavior. In Part 1 we transformed the Cube (of type query) ZCCA_D21/ZCCA_D21_Q0020 into an OData Analytic Service and we will use the same service in our analysis.

Service Document

     An OData Analytic service created for a cube of type query has one main Entity Type. The Entity Type represents the result of executing a MDX Query against the cube. The contents of the service document is shown below in the image.

— click the image —

Service Document.png



     The metadata document for the service can be accessed using $metadata OData Command. The image below shows how the Dimensions, Dimension Attributes and Measures are represented as properties of an Entity Type. The Entity Type representing the results of a MDX query is annotated as “sap:semantics=aggregate”

— click the image —


The table shows how BW objects like Dimensions, Dimension Attributes and Measures are represented in OData. The table shows only the main annotations.

BW Objects OData Representation SAP Annotation
Cube of Type Query Entity Type sap:semantics=aggregate
Dimension Property sap:aggregation-role=dimension
Dimension Attribute Property sap:attribute-for=<dimension name>
Measure Property sap:aggregation-role=measure

Now that you know your Dimensions and Measures via the annotations, you can build your solution/application by extracting this information.

Next – Transform SAP BW Queries into OData Service: Part 3 – Execute OData Analytics Service

You must be Logged on to comment or reply to a post.
  • Hi Chandan,

    I have a more important question, when i try to query my odata service i get the following response,

    System query options ‘$orderby,$skip,$top,$skiptoken,$inlinecount,’ are not allowed in the requested URI

    Ps: the Odata service was created based on a Bex easy query

    Best Regards


      • hi suma,

        the link is in an internal server , but you’ll find below the query generated , by sapui5


        but when i query the odatavia the browser Results.png

        IS there is any way so i can prevent the sapui5 from generating those system query options or how can i modify the metadata of my odata service, not that im using dataservices version 2 wich allows these kind of system query options, and im not querying any measures


        Kind Regards


        • Hi Reda,

          Looking at the URL, it seems like these query operations are fired on ‘Read’ Operation of Entity Result Collection Which is actually not supported. These are supported only on ‘Query’ Options .

          Please check the read URl that is generated.



          • Hi Reda,

            As Suma pointed out System query options like ‘$orderby,$skip,$top,$skiptoken,$inlinecount are valid only for HTTP GET on a collection.