Skip to content

Commit a0d8ee1

Browse files
authored
Merge pull request #1494 from niloofar-flothkoetter/main
update from Original 1
2 parents f7fc474 + 0d43fb3 commit a0d8ee1

File tree

5 files changed

+15
-19
lines changed

5 files changed

+15
-19
lines changed
99 KB
Loading
-131 KB
Binary file not shown.
87.7 KB
Loading
-5.15 KB
Loading

tutorials/abap-environment-analytics/abap-environment-analytics.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Always replace `####` with your initials or group number.
3333
The new **RAP based InA service exposure** enables the SAP Business Technology Platform ABAP Environment developers to develop analytical queries(based on ABAP-CDS analytical data models) and expose them via the `InA` (Information Access) service protocol. In this Tutorial you will create a complete Analytical Data Model for Booking data. This consists out of dimensions for Carrier, Customer, Connection and Agency data, as well as an interface CDS view for Booking data which acts as a data source for the cube and query.
3434
These analytical queries can be further consumed in the SAP Analytics cloud to create analytical models, stories, multi-dimensional reports and more.
3535

36-
![overview](1.png)
36+
![overview](0010.png)
3737

3838

3939
### Import templates for Analytical CDS views
@@ -491,7 +491,7 @@ This annotation is part of the template **Define a View Entity for a Cube** that
491491
492492
- **Name**: `ZRAP500_I_BookingCube_####`
493493
- **Description**: `Booking Cube`
494-
- **Referenced Object**: `ZRAP_I_BOOKING_####` (The booking interface view)
494+
- **Referenced Object**: `ZRAP500_I_BOOKING_####` (The booking interface view)
495495
496496
![new cube](1270.png)
497497
@@ -525,7 +525,7 @@ This annotation is part of the template **Define a View Entity for a Cube** that
525525
526526
6. Comment out both lines of annotation `@Semantics.amount.currencyCode` and the property **Flight Price**.
527527
528-
7. Add the following two fields alongside with a foreign key association
528+
7. Add the following two fields alongside with a foreign key association
529529
530530
```foreignKey
531531
@ObjectModel.foreignKey.association: '_CustomerCountry'
@@ -636,7 +636,7 @@ This annotation is part of the template **Define a View Entity for a Cube** that
636636
### Implement query as CDS view entity
637637
638638
639-
Since a query belongs to the projection layer (formerly known as consumption layer) it must have a **C** in its name according to the naming convention used in the Virtual Data Model (VDM) used in SAP S/4HANA. To create a query, there is a mandatory header annotation: **@Analytics.query: true**
639+
Since a query belongs to the projection layer (formerly known as consumption layer) it must have a **C** in its name according to the naming convention used in the Virtual Data Model (VDM) used in SAP S/4HANA.
640640
641641
Again you can use a template that you have imported at the beginning of this tutorial.
642642
@@ -657,9 +657,9 @@ Again you can use a template that you have imported at the beginning of this tut
657657
658658
![template query](1130.png)
659659
660-
5. Edit the code of your query and add the annotation **@AnalyticsDetails.query.axis** to all properties except the two measures `FlightPrice` and `TotalOfBookings`. All fields beside the field `CustomerCountry` get the annotation **@AnalyticsDetails.query.axis: #ROWS**, whereas the field `CustomerCountry` gets the annotation **@AnalyticsDetails.query.axis: #COLUMN**.
660+
5. Edit the code of your query with removing **KEY** from `TravelID` and `BookingID`, add the annotation **@AnalyticsDetails.query.axis** to all properties except the two measures `FlightPrice` and `TotalOfBookings`. All fields beside the field `CustomerCountry` get the annotation **@AnalyticsDetails.query.axis: #ROWS**, whereas the field `CustomerCountry` gets the annotation **@AnalyticsDetails.query.axis: #COLUMN**.
661661
662-
6. You add a currency conversion to the field `FlightPrice` to be able to comparison all flight prices in a single currency.
662+
6. You add a currency conversion to the field `FlightPrice` to be able to comparison all flight prices in a single currency.
663663
664664
```
665665
@Semantics.amount.currencyCode: 'CurrencyCode'
@@ -676,25 +676,22 @@ Again you can use a template that you have imported at the beginning of this tut
676676
677677
![ADTquery](1131.png)
678678
679-
> Using the template the mandatory annotations for query is set automatically.
680-
> **@Analytics.query: true**
681679
> With the annotation **@AnalyticsDetails.query.axis:<VALUE>**, the elements of the view can be positioned on multiple axes: Rows, Columns and Free. The elements can be directly annotated with their axis. All measures (elements which can be aggregated) need to be on the same axis. The annotation of the first measure will therefore be used for all measures of the query. If **@AnalyticsDetails.query.axis:<VALUE>** is not found, the system positions the measures on the columns.
682680
683681
8. Your final code should look like the following:
684682
685683
```ZRAP500_C_BOOKINGQUERY_####
686-
@AccessControl.authorizationCheck: #CHECK
687-
@EndUserText.label: 'Query for Booking'
688-
689-
690-
@Analytics.query: true
684+
@EndUserText.label: 'Flights Query'
685+
@AccessControl.authorizationCheck: #NOT_ALLOWED
691686
692-
693-
define view entity ZRAP500_C_BOOKINGQUERY_#### as select from ZRAP500_I_BookingCube_#### {
687+
define transient view entity DEF23_Flights_Query
688+
provider contract analytical_query
689+
as projection on DEF23_Flights_Cube
690+
{
694691
@AnalyticsDetails.query.axis: #ROWS
695-
key TravelID,
692+
TravelID,
696693
@AnalyticsDetails.query.axis: #ROWS
697-
key BookingID,
694+
BookingID,
698695
@AnalyticsDetails.query.axis: #ROWS
699696
BookingDate,
700697
@AnalyticsDetails.query.axis: #ROWS
@@ -733,8 +730,7 @@ Again you can use a template that you have imported at the beginning of this tut
733730
734731
### Data preview
735732
736-
737-
Similar to the SAP Fiori Elements preview which is offered for OData V2 UI and OData V4 UI service bindings there is now an Analytical Data Preview available. This can be used by the ABAP developer to test the implementation of an Analytical Query since the preview uses the InA protocol.
733+
Similar to the SAP Fiori Elements preview which is offered for OData V2 UI and OData V4 UI service bindings there is now an Analytical Data Preview available. This can be used by the ABAP developer to test the implementation of an Analytical Query since the preview uses the InA protocol.
738734
739735
Now that you have created the query it is possible to use a data preview to test our implementation.
740736

0 commit comments

Comments
 (0)