Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

     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 --

 

Metadata

     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 ObjectsOData RepresentationSAP Annotation
Cube of Type QueryEntity Typesap:semantics=aggregate
DimensionPropertysap:aggregation-role=dimension
Dimension AttributePropertysap:attribute-for=<dimension name>
MeasurePropertysap: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

7 Comments