Skip to Content
avatar image
Former Member

CDS View Restrict Hierarchy with Certain Default Nodes

Hello Friends,

I am trying to restrict My CDS view with certain nodes say for only profit and loss.

I am getting complete hierarchy in Fiori but unable to restrict it with certain nodes.

As you can see in screenshot, I am getting complete Hierarchy. Balance sheet, Profit & Loss, etc. I just want it to be restricted for Profit and Loss (Z010/03000000) Unable to find any annotation for the same.

Can some one guide me how to do that.

Regards,

Sunil

hier-cds.jpg (46.1 kB)
hier.jpg (101.8 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 20 at 02:00 PM

    Hello,

    Try using annotation @Consumption.filter.defaultHierarchyNode, example 9 from

    https://help.sap.com/viewer/cc0c305d2fab47bd808adcad3ca7ee9d/7.5.10/en-US/d60c0bf6798a481fb7412bc89934cb8a.html

    Sample below is relater to Internal Order custom CDS view, which Hierarchy Node is taken from table

    hrrp_node:

    hrrp_node.hryid - InternalOrderHierarchy,

    substring( hrrp_node.hrynode, 8, 35 ) - HierarchyNode

    Add comment
    10|10000 characters needed characters exceeded