cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori UI for Hierarchies (Hierarchical Treeview, Recursive Hierarchy)

gregorw
Active Contributor

Hello SAP RAP and Steampunk Experts, Hi andre.fischer,

I'm struggling to get the Hierarchical Treeview on the SAP Fiori UI working in my BTP ABAP Environment (Free Tier). I've imported the ABAP Flight Reference Scenario for RAP on ABAP Platform Cloud using abapGit and activated all objects. When I now run the preview of the Employee entity of the Service Binding /DMO/UI_EMPLOYEE_HR_O4 I see this screen:

Which stays empty even when I click the Go button. In the Console I see the attached errors: e271e2ad-826d-4381-b753-7dcea97005a0abap-webeu10ha.txt.

I've also tried to create a project in BAS. Here the result when using the "List Report Page V4" template looks like that:

So you see that I was able to create the sample data. But the data isn't displayed as a hierary.

Looking forward for your input.

Best Regards
Gregor

FrankJentsch
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Gregor,

sorry for the inconveniences caused. Both issues are known:

1) The preview works fine for Z-objects, but not for objects with ABAP namespaces. The fix will be delivered as part of the 2402 Upgrade in February.

2) The deployment requires today an enhancement of the yaml file to include the required UI5 control. We are working to add this include also as part of the standard deployment.

BR, Frank

gregorw
Active Contributor
0 Kudos

Hi Frank,

based on the consumption view /DMO/C_Employee_HR I've created this Service Definition:

@EndUserText.label: 'Hierarchy: Read Only: Employee'
@ObjectModel.leadingEntity.name: '/DMO/C_Employee_HR' define service ZC_Employee_HR { expose /DMO/C_Employee_HR as Employee; }

When I expose it as this Service Binding:


I can start the preview. But when I click the Go button I don't get any result and there isn't even a request issued in the network tab:

I see a lot of errors in the console.

So I think it's also an issue with the SAPUI5 version or?

Best Regards
Gregor

volkerdrees
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Gregor,
thanks for your patience.

It's unfortunately not sufficient to only re-create the Service Definition and the Service Binding in the Z-Namespace. The CDS-Views need to have the Z-Namespace as well. In particular the @OData.hierarchy.recursiveHierarchy annotation in the C-View that you expose can't have a /DMO/-Namespace, as this name is reflected in the manifest as hierarchyQualifier and that causes the problem.

Best Regards, Volker

View Entire Topic
Christoph_G
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Gregor, I'm referring to the visualization in the List report. In SAP Fiori elements for OData V4 we support the tree table for none-draft RAP services (and with SAPUI5 version 1.120). You can use the SAP Fiori tools Page editor to enable it after generation (make sure the project's ux-specification module is 1.120 or higher), by setting the "Type" of the table to "TreeTable". Also you have to specify the "Hierarchy Qualifier" for the table.

Best regards,
Christoph

gregorw
Active Contributor
0 Kudos

Hi Christoph,

thank you for your response. Should it work also with a CAP based non-draft OData V4 service? If yes, then it would be great if SAP Fiori elements for OData V4 Feature Showcase would be enhanced to have a working example.

Best Regards
Gregor