cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CDS View with Structure and Hierarchy Node Filter

former_member644878
Discoverer
3,150

Hi Experts,
I have the following "problem": an existing Report Writer Report should be replaced with an analytical query based on a CDS View,

The report contains a fix row structure, which can be realized via
@AnalyticsDetails.query.onCharacteristicStructure: true

BUT: every Structure node have to be filtered / restricted to an HierarchyNode within a Hierarchy. My understanding is, that in this case its not possible to work with parameters:
" parameter is not supported. Use @Consumption.filter.selectiontype: #HIERARCHY_NODE to define a hierarchy node filter"
However also the Consumption filter is not working in my case. The restriction / filtering is not working.
Any idea how to realize such an requirement with a CDS View?

Coding Sample:

@AnalyticsDetails.query.onCharacteristicStructure: true @EndUserText.label: 'CORONA_SUCKS' @AnalyticsDetails.query.elementHierarchy : { parent : 'H1' , initiallyCollapsed : false } @Consumption.filter :{selectionType: #HIERARCHY_NODE, defaultHierarchyNode.node:[ {element: 'GlAccount' , value: 'HIERARCHY_NODE' }], hierarchyBinding : [ {type :#CONSTANT,value :HIERARCHY'}], hidden: false}

case

when

FunctionalArea = 'CORONA'

then 1

end as H22,


Best regards

jens

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member644878
Discoverer

Hi Niroj,
unfortunately not with a CDS. For these kind of Reports we used Embedded BW functionality. I know, shame on me, but we did not find any other way.

Best regards

jens

niroj_singha
Explorer

I am also facing same issue . How did you solved this?

LuizF
Participant
0 Likes

Has there been an update / solution regarding the handling of hierarchy node filters in CDS views? 

baljinder_nagra
Explorer
0 Likes

Embedded BW is one way yes - the other way I did to try to stick with CDS analytical query modelling is by taking my Hierarchy and "flattening" it to a custom table that transposed the hierarchy levels to a columnar format. That way I can select column levels (i.e. "node filters") of the hierarchy in the case logic of the onCharacteristicStructure structure. This will mean you know you hierarchy will have a finite set of levels and the hierarchy you are dealing with is stable in definition etc.