cancel
Showing results for 
Search instead for 
Did you mean: 

How to use time hierarchy in a cloud story based on a ABAP CDS View datamodel?

Hello Everyone,

I want to use a time hierarchy in my SAP Analytics Cloud story with a ABAP CDS View based datamodel.

At first I want to provide my system information:

  • SAP Netweaver 752 Version 0003
  • DB: SAP HANA 2.0 SPS03 Rev 031.00
  • SAP Analytics Cloud Test Tenant Versions 2018.15.2 (Client) + 2018.15.1 (Server)

I'm accessing my ABAP CDS Query View via a S/4 Hana Live Connection (no data upload to the cloud). Below my ABAP CDS Query View there is a Cube-View where I defined an association to the SAP standard calendar view "I_CalendarDate". I've added all the fields coming with this I_CalendarDate view to my Cube and Query view.

I'm able to see the hierarchy (Year, Month, Date - see screenshot) in SAP transaction RSRT. But not in the cloud. Does anyone of you know, how to activate the time hierarchy to use it in a cloud story?

And this is how my ABAP CDS Views are implemented:

...and the Query-View on top of the Cube-View:

When using this query view in a cloud story, there is no drilldown functionality available.

Thank you very much,

best regards,

Thorsten Wülpern

former_member656861
Discoverer
0 Kudos

Hello Thorsten,

I’m having the same requirement as you but I can not show the hierarchy on RSRT.

I applied the same code as you, but the hierarchy is still not visible.

Could you please provide the code of your CUBE and QRY?

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

I have found out where the hierarchy can also be activated.

If you choose the dimension for a chart in design mode, you can also call up a filter menu by clicking on the filter icon. In the next screen you only have to open a further menu and then you can switch on the hierarchy there! See screenshot.

And finally:

Answers (8)

Answers (8)

Hi, sorry, for answering late. Thomas is right - At first you have to generate hierarchies with transaction Transaktion RSRHIERARCHYVIRT. I never did this on my one - a colleage already did this in advance for me - sorry.

best regards,

Thorsten

Probably you have converted hierarchy to flat presentation or SAC has taken Date field has just YYYY.

Go to story>edit>data>on the particular date field> other interactions>select hierarchy>change based on your requirements.

If this didnt work out select Calendar date in the chart, define hierarchy.

Hello Gurudev,

Thank you for your reply! I didn't know about this option. So I did, what you've mentioned. But in the end, there was no change in my current visualisation chart. Even a new chart of type "Time Series" has at least no hierarchy in the dimension "Calendar Date" - is there anything else I have to do?

Thank you!

best regards,

Thorsten

Hi Thorsten,

Just check in se11>dd27m whether calendar date is in date format or char data type.

If Date, is it of dd mm yyyy format??

Thanks,

Gurudev

0 Kudos

Hi Gurudev, thank you again for your reply.

I checked all that what you've mentioned and I think that everything is fine at that stage. But the date format will be YYYYMMDD. It's is the standard SAP DATS datatype (see screenshots).

Thank you.

I'll try to provide you a little documentation with screenshots of my current cloud story. Maybe you will be able to help me better.

Best regards,

Thorsten

anna389
Participant
0 Kudos

Hi,

may anyone of you try if this is still working?

I created many SAC stories with time hierarchies like this in CDS and it worked fine for a long time. Since our tenant was updated to Q3 2020 all charts including the time hierarchy throw errors and aren´t displayed.

So is this just me or do you face the same issue?

Best Regards

Anna

thomas_knobloch
Advisor
Advisor
0 Kudos

Hi Thorsten,

I need to do exactly the same as you. As I can see you didn't do anything regarding virtual time hierarchies.? You just coupled I_CalendarDate and added the needed field (hierarchy level)..?

So you didn't use transaction RSRHIERARCHYVIRT to generate time hierarchies.?

I'm surprised that in SAC you can see hierarchy 0YEA_MON_DAY when you define filter for that field.

Thanks and best regards, Thomas

BhargavaReddy
Active Participant
0 Kudos

Hi Thorsten,

I want to show a time hierarchy in RSRT / Query Report same as your example in question. I have followed the steps as you mentioned in your example snapshots but I didn't get that.

Could you please help me, How to achieve that?

Thanks in advance,

Bhargava

amayer1
Discoverer
0 Kudos

Hi Bhargav,

is it working for you now?

Thanks in advance,

Andreas

mtandreola
Explorer
0 Kudos

Hi,

yes, I can use it now. I think I was not using all the annotations that I needed at the begining.

Thank you

surajyadavtokas
Participant
0 Kudos

Could you please help me, How to achieve that?

Regards

Suraj Kumar

mtandreola
Explorer
0 Kudos

Hi,

I am trying to do exactly the same example: I am using the I_CalendarDate standard view on my cube, and then on top of my Query, but I am not able to see the hierarchy on RSRT transaction.

Somebody can help me? Thanks in advanced

amayer1
Discoverer
0 Kudos

Hi María,

is it working for you now?

Thanks in advance,

Andreas

former_member613062
Participant
0 Kudos

Did you get this to work.. I am also trying .. can you show your CDS code for cube and query if you got it to work?

0 Kudos

This is how it looks like in my current SAC Story.

I activated the hierarchy. As you can see, there is a drill down functionality available.

But in my story, nothing has changed:

Thank you!

Best regards,

Thorsten

lucas_costa3
Active Contributor
0 Kudos

Hi Thorsten,

From your screenshot, it seems like you filtered calendar year in SAC but in the BW screenshot, you were using Calendar Date.

Have you tried using Calendar Date in SAC as well?


0 Kudos

Thank you for your reply!

Yes I also used Calendar Date in SAC. It seems, that Gurudev's reply is a big hint in this regard.