Hi, I'm trying to develop an UI5 screen using a TreeTable(hierarchical) whose data I want to deliver using a CDS. After spending several hours learning about the ways to develop this I came to the conclusion that this would be impossible without using this CDS as 'Reference Data Source' and manage the proper tree-annotations there. I would like to know if that's true and if there's someway to make this annotations directly in the CDS in order to avoid this step of creating a 2nd Odata and make there the annotations.
Thank you in advance.
Best regards
Request clarification before answering.
Hi,
I think you should be able to create a tree table just using annotations in your CDS view.
You'll need to use the ODataTreeBinding model:
https://ui5.sap.com/#/api/sap.ui.model.odata.v2.ODataTreeBinding#overview
With the hierarchy annotations:
I don't have an example at hand, but I guess this might point you in the right direction.
Best regards,
Geert-Jan Klaps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
the point is that I have to put this annotations:
sap:hierarchy-node-for,
sap:hierarchy-parent-node-for,
...
in the metadata of my CDS without using another oData using the CDS as Reference Data and after write this annotations in the method define() of MPC_EXT class. Other possibility could be write them in the navigation properties of my UI5 app like it's shown in the first link that you wrote but if you look this method is deprecated and in my case didn't work. So the only way that there could be possible is with some annotation in the CDS Metadata extension or something like this.
Edit: It could be even a solution if I could be able to use a local file as metadata and oData/CDS only for the data provider but I didn't find the way to do this.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.