cancel
Showing results for 
Search instead for 
Did you mean: 

Hierarchy in custom analytical query based on custom CDS

rbardiau
Explorer
0 Kudos
1,725

Hi community,

We are doing a custom analytical query based on a custom CDS which shows the GLAccounts. One of the demand is to have the GLAccount hierarchy available in the report but we weren't able to do that.

I see in standard queries that we can check the Hierarchy parameter on GLAccount field, but this option doesn't appear in the query builder which brings me to think that we missed something when creating the custom CDS.
I also didn't find any documentation on how to have a hierarchy available from a custom CDS into the Analytical Query builder.

I tried to add the propertiy Master Data View in the custom CDS but was blocked as the field is already in use in the query. Do I really have to remove it from the query (if not delete the query at all) to do an evolution on that field?

Any link / help on that subject is welcomed.

Regards,
Romain

Accepted Solutions (1)

Accepted Solutions (1)

Amith_Nair
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Romain,

I took the example of I_ACTAULPLNJOURNALENTRYITEM (an example from the past)

1. Create a new Custom CDS View based on I_ACTAULPLNJOURNALENTRYITEM.

2. Add the ChartOfAccounts field, and the 2 Associations, _GLACCOUNTINCHARTOFACCOUNTS, and _PROFITCENTER

3. At this point you will need to go to the Field Properties section of the CDS View and add _GLACCOUNTINCHARTOFACCOUNTS as the Master Data View for GLAccount, and _PROFITCENTER as the Master Data View for ProfitCenter

4. Now create a query based on this CDS View and you will be able to add Hierarchies.

Please note that if you have already built a Custom Analytical Query on top of your CDS View and if you try to modify the Custom CDS View, you might run into some inconsistencies.

If you have any further questions around this, I would encourage to raise an incident with us with Component: BC-SRV-APS-EXT-AQD

Thank you! Amith Nair

rbardiau
Explorer
0 Kudos

Thanks Amith,

I thought of trying that but didn't wanted to redo the query and hoped that it was something else... I will do that then.

Is there a documentation to explain the Master Data View property?

Best Regards,

Romain

Amith_Nair
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Romain,

I couldn't find one with the conext that we have. but I just created one blog out of this:

https://blogs.sap.com/?p=539

hope this helps!

Best Regards,

Amith Nair

Answers (0)