Complex Tree Hierarchical Fiori Elements based List Report – Challenges & Technical Solution Design Part 1
While working in Fiori Elements from quite a long time, I felt complex hierarchical tree report was one of challenging task. It is not because of only development perspective but overall performance point of view when we have specially millions of backend hierarchical data.
Here, I would try to give insight about the few challenges and Technical solutions to handle those problems.
This is first blog for the Complex Hierarchical Tree Report using Fiori Elements , for the practical demo refer next blog
“Thanks to Fiori Elements Framework, who made our life so easy for this complex Development”
- Complex Hierarchical Tree Report with lot of backend logic, which might not be easy in CDS but can be achieved with Table Function (SQL Script easily).
- Start the Tree Report / Hierarchy with a particular Node, i.e., selection
- Finally, in case of huge backend data, Performance is also a major concern which cannot be compromised.
Few Real Time Business scenario:
- Complex Handling Unit Hierarchy in WM where we can have millions of Data.
- Functional Location Hierarchy in Plant Maintenance.
- HR hierarchies like Org Unit etc.
Technical Design & Solutions
I will be discussing Technical solutions into 3 major categories and will discuss respective important steps to be taken care of:
- Backend CDS Data Model Design for complex backend logic
- Gateway Project & OData Service Development.
- UI Application Development.
In this blog, I will mainly concentrate on the technical design solution and in my next blog, I will demonstrate all these steps with one real time business scenario.
Backend CDS Data Model Design for complex backend logic
As mentioned, we can have complex Backend logic which might be challenging in CDS but can be easily achieved via Table Functions.
Gateway Project & OData Service Development
- Create a Gateway Project
- Use the Parameterized CDS as Reference Data Source.
- Re Define the MPC_EXT Class.
- Write Tree Annotations to support Tree Generation via Fiori Elements Framework.
- Parameterized Entity set will be called as follows
Below are the fields for which needs to add the annotation in MPC_EXT.
- Drill Down State
(A property holding the drill state of a hierarchy node)
- Hierarchy Level
(A property holding level numbers for a hierarchy structure)
- Node Id
(A property holding node IDs for a hierarchy structure)
- Parent Node id
(A property holding parent node IDs for a hierarchy structure)
UI Application Development:
- Generate the Fiori Elements based app with List Report / Object Page Template.
- Needs to adjust the table type as manifest.json as “Tree Table”
- Extend the Generated Fiori Elements report for “Action”
- Put code to update the URL Path in onBeforeRendering method to support parameterized Entity Set.
so here is end of this blog, In the next blog i will be demonstrating all the above steps with some real time business scenario.