Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to use a CDS hierarchy defined with "define hierarchy" as a analytical CDS dimension?

WRoeckelein
Active Participant
0 Kudos

Hi all,

has anyone an example on how to use a CDS hierarchy defined with "define hierarchy" as a analytical CDS dimension? I only found examples without using CDS hierarchy but only with analytical hierarchy annotations.

Thanks,

Wolfgang

1 ACCEPTED SOLUTION

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Yes it is planned that this will be part of the next on premise shipment as well.

I got the information that when using „define hierarchy“ in analytics there are some known restrictions:

  • structuctures may not be time-dependent
  • one must not use analytics.dataExtraction

Kind regards,

Andre

ceterum censeo RAP esse utendam
7 REPLIES 7

WRoeckelein
Active Participant
0 Kudos

ingo.braeuninger Do you have an idea who could help here?

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Wolfgang,

unfortunately this is not possible yet.

In 2205 it is possible to create CDS hierarchies in ABAP language version 5, it is however not possible to use the same in analytical queries.

This is currently planned for 2208.

Kind regards,

Andre

ceterum censeo RAP esse utendam

WRoeckelein
Active Participant
0 Kudos

Hi andre.fischer,

thanks, ok, will wait for 2208 then...

Is there also a timeline for S/4HANA onpremise available? CDS hierarchy is available since 753 (temporal hierarchy was added in 754), but when could one use these in analytical queries onpremise?

Regards,

Wolfgang

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Yes it is planned that this will be part of the next on premise shipment as well.

I got the information that when using „define hierarchy“ in analytics there are some known restrictions:

  • structuctures may not be time-dependent
  • one must not use analytics.dataExtraction

Kind regards,

Andre

ceterum censeo RAP esse utendam

pbist0103
Participant
0 Kudos

DEFINE HIERARCHY can be consumed in ABAP, but for SAP Analytics you have to create using the annotations defining 3 pieces - one base entity of type dimension another that reads from the node (HRRP_NODE) of the type #HIERARCHY and the 3rd one reads from HRRP_DIRECTORY. Just check how the hierarchies for Profit Center or Cost Center are implemented it's very simple.

The base will declare the NODE as hierarchy association and the node refer back to base as a foreign key association and the node will also have an association to the CDS that reads from the HRRP_DIRECTORY. I created a custom one recently and did a lot of Googling but I don't know how to share directly here with less effort as typing takes too much time.

0 Kudos

Thanks for your answer, but I do not get it. I was asking about using ABAP DEFINE HIERARCHY as an analytical (hierarchical) dimension. I can't really match your answer to this question.

0 Kudos

As the guy from SAP mentioned DEFINE HIERRACHY won't work for Analytical CDS. So I shared the solution assuming that your need is to create an analytical CDS hierarchy. If it's a Yes and No match the answer is NO. DEFINE Hierarchy do not support CDS based analytics.