Skip to content

Commit b4ae2d6

Browse files
Merge branch 'main' into draft-Bypassing-warning
2 parents 29f5c1b + 588639c commit b4ae2d6

File tree

6 files changed

+155
-25
lines changed

6 files changed

+155
-25
lines changed

.github/workflows/ai-review.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: AI Review
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
merge_group:
7+
8+
concurrency:
9+
group: pr-sap-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
ai-review:
14+
name: AI Review
15+
if: ${{ contains(github.event.pull_request.labels.*.name, 'AI Review') }}
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
pull-requests: write
20+
steps:
21+
- uses: SAP/ai-assisted-github-actions/pr-review@v3
22+
with:
23+
aicore-service-key: ${{ secrets.AICORE_SERVICE_KEY }}
24+
model: anthropic--claude-4-sonnet
25+
model-parameters: '{"temperature": 0.1}'
26+
prompt: |
27+
- As an AI bot reviewing documentation pull requests on GitHub, please focus on the following areas to ensure high-quality and effective documentation:
28+
- Check for spelling errors in English and provide corrections.
29+
- Identify and correct grammatical errors and incorrect punctuation.
30+
- Provide suggestions for improving the clarity and conciseness of the text to make it more understandable.
31+
- Consider the guidelines that can be found in .github/workflows/assets/editor.md and apply them.
32+
- Ensure that the tone is appropriate for technical documentation, maintaining a professional and informative style.
33+
- Verify that the structure of the document is logical and that headings and subheadings are used effectively.
34+
- Check for consistency in terminology and style throughout the document.

advanced/fiori.md

Lines changed: 101 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
shorty: Fiori UIs
32
synopsis: >
43
CAP provides out-of-the-box support for SAP Fiori elements front ends.
54
permalink: advanced/fiori
@@ -9,7 +8,7 @@ impl-variants: true
98
uacp: Used as link target from Help Portal at https://help.sap.com/products/BTP/65de2977205c403bbc107264b8eccf4b/e4a7559baf9f4e4394302442745edcd9.html
109
---
1110

12-
# Serving Fiori UIs
11+
# Serving SAP Fiori UIs
1312

1413
{{ $frontmatter.synopsis }}
1514

@@ -23,13 +22,13 @@ This guide explains how to add one or more SAP Fiori elements apps to a CAP proj
2322

2423
## SAP Fiori Preview
2524

26-
For entities exposed via OData V4 there is a _Fiori preview_ link on the index page. It dynamically serves an SAP Fiori Elements list page that allows you to quickly see the effect of annotation changes without having to create a UI application first.
25+
For entities exposed via OData V4 there is a _Fiori preview_ link on the index page. It dynamically serves an SAP Fiori elements list page that allows you to quickly see the effect of annotation changes without having to create a UI application first.
2726

2827
::: details Be aware that this is **not meant for production**.
2928

3029
<div class="impl node">
3130

32-
The preview not meant as a replacement for a proper SAP Fiori Elements (UI5) application.
31+
The preview is not meant as a replacement for a proper SAP Fiori elements (UI5) application.
3332
It is only active locally where the [development profile](../node.js/cds-env#profiles) is enabled.
3433

3534
To also enable it in cloud deployments, for test or demo purposes maybe, set <Config>cds.fiori.preview:true</Config>.
@@ -38,7 +37,7 @@ To also enable it in cloud deployments, for test or demo purposes maybe, set <Co
3837

3938
<div class="impl java">
4039

41-
The preview not meant as a replacement for a proper SAP Fiori Elements (UI5) application.
40+
The preview is not meant as a replacement for a proper SAP Fiori elements (UI5) application.
4241
It is active by default, but disabled automatically in case the [production profile](../java/developing-applications/configuring#production-profile) is enabled.
4342

4443
To also enable it in cloud deployments, for test or demo purposes maybe, set <Config java>cds.index-page.enabled:true</Config>.
@@ -744,4 +743,101 @@ Cache Control feature is currently supported on the Java runtime only.
744743

745744
<div id="fiori-compat" />
746745

746+
## Hierarchical Tree Views
747+
748+
Recursive hierarchies are parent-child hierarchies, where each entity references its parent and through that defines the hierarchical structure. A common example is a company organization structure or HR reporting, where each employee entity references another employee as a direct report or manager.
749+
750+
Database support for a generic hierarchy implementation by CAP runtimes:
751+
752+
| Runtime\DB | SAP HANA | H2 | PostgreSQL | SQLite |
753+
|-------------|----------|----|------------|--------|
754+
| CAP Java |||| |
755+
| CAP Node.js || |||
756+
757+
758+
### Example
759+
Let's assume we have the following domain model and its projection in a service:
760+
761+
::: code-group
762+
```cds [schema.cds]
763+
namespace my.bookshop;
764+
765+
entity Genres { //...
766+
parent : Association to Genres;
767+
}
768+
```
769+
:::
770+
771+
::: code-group
772+
```cds [AdminService.cds]
773+
service AdminService {
774+
entity Genres as projection on my.bookshop.Genres;
775+
}
776+
```
777+
:::
778+
779+
780+
Annotate/extend the entity in the service as follows:
781+
782+
```cds
783+
// declare a hierarchy with the qualifier "GenresHierarchy"
784+
annotate AdminService.Genres with @Aggregation.RecursiveHierarchy #GenresHierarchy : {
785+
NodeProperty : ID, // identifies a node, usually the key
786+
ParentNavigationProperty : parent // navigates to a node's parent
787+
};
788+
789+
extend AdminService.Genres with @(
790+
// The computed properties expected by Fiori to be present in hierarchy entities
791+
Hierarchy.RecursiveHierarchy #GenresHierarchy : {
792+
LimitedDescendantCount : LimitedDescendantCount,
793+
DistanceFromRoot : DistanceFromRoot,
794+
DrillState : DrillState,
795+
LimitedRank : LimitedRank
796+
},
797+
// Disallow filtering on these properties from Fiori UIs
798+
Capabilities.FilterRestrictions.NonFilterableProperties: [
799+
'LimitedDescendantCount', 'DistanceFromRoot', 'DrillState', 'LimitedRank'
800+
],
801+
// Disallow sorting on these properties from Fiori UIs
802+
Capabilities.SortRestrictions.NonSortableProperties : [
803+
'LimitedDescendantCount', 'DistanceFromRoot', 'DrillState', 'LimitedRank'
804+
],
805+
) columns { // Ensure we can query these columns from the database
806+
null as LimitedDescendantCount : Int16,
807+
null as DistanceFromRoot : Int16,
808+
null as DrillState : String,
809+
null as LimitedRank : Int16
810+
};
811+
```
812+
813+
> Note: When naming the hierarchy qualifier, use the following pattern: <br>
814+
> `<entity name in service>Hierarchy`
815+
816+
Configure the TreeTable in UI5's _manifest.json_ file:
817+
818+
```jsonc
819+
"sap.ui5": { ...
820+
"routing": { ...
821+
"targets": { ...
822+
"GenresList": { ...
823+
"options": {
824+
"settings": { ...
825+
"controlConfiguration": {
826+
"@com.sap.vocabularies.UI.v1.LineItem": {
827+
"tableSettings": {
828+
"hierarchyQualifier": "GenresHierarchy", // [!code focus]
829+
"type": "TreeTable" // [!code focus]
830+
}
831+
}
832+
}
833+
}
834+
}
835+
},
836+
},
837+
},
838+
```
839+
840+
> Note: use the `hierarchyQualifier` declared earlier
841+
747842
<div id="reserved-words" />
843+

menu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
### [AsyncAPI](advanced/publishing-apis/asyncapi)
5656

5757
## [Serving UIs](advanced/fiori)
58-
### [Fiori UIs](advanced/fiori)
58+
### [SAP Fiori UIs](advanced/fiori)
5959

6060
## [Databases](guides/databases)
6161

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/assets/help/cds-version-md.out.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
| your-project | https://github.com/&lt;your/repo&gt; |
66
| ---------------------- | --------------------------------------- |
7-
| @sap/cds | 9.4.3 |
7+
| @sap/cds | 9.4.4 |
88
| @sap/cds-dk | -- missing -- |
9-
| @sap/cds-compiler | 6.4.2 |
10-
| @sap/cds-dk (global) | 9.4.1 |
9+
| @sap/cds-compiler | 6.4.6 |
10+
| @sap/cds-dk (global) | 9.4.2 |
1111
| @sap/cds-fiori | 2.1.0 |
12-
| @sap/cds-mtxs | 3.3.1 |
12+
| @sap/cds-mtxs | 3.4.2 |
1313
| @cap-js/asyncapi | 1.0.3 |
14-
| @cap-js/db-service | 2.5.1 |
14+
| @cap-js/db-service | 2.6.0 |
1515
| @cap-js/openapi | 1.2.3 |
16-
| @cap-js/sqlite | 2.0.3 |
16+
| @cap-js/sqlite | 2.0.4 |
1717
| Node.js | v22.20.0 |
1818
</pre>

tools/assets/help/cds-version.out.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<pre class="log">
33
> cds version
44

5-
@sap/cds: 9.4.3
5+
@sap/cds: 9.4.4
66
@sap/cds-dk: undefined
7-
@sap/cds-compiler: 6.4.2
8-
@sap/cds-dk (global): 9.4.1
7+
@sap/cds-compiler: 6.4.6
8+
@sap/cds-dk (global): 9.4.2
99
@sap/cds-fiori: 2.1.0
10-
@sap/cds-mtxs: 3.3.1
10+
@sap/cds-mtxs: 3.4.2
1111
@cap-js/asyncapi: 1.0.3
12-
@cap-js/db-service: 2.5.1
12+
@cap-js/db-service: 2.6.0
1313
@cap-js/openapi: 1.2.3
14-
@cap-js/sqlite: 2.0.3
14+
@cap-js/sqlite: 2.0.4
1515
Node.js: v22.20.0
1616
</pre>

0 commit comments

Comments
 (0)