From 8d9f873cdb5d81f9713ca98f37b3b42c90db7b55 Mon Sep 17 00:00:00 2001 From: Rene Jeglinsky Date: Mon, 4 May 2026 14:10:49 +0200 Subject: [PATCH 1/2] add information for draft --- guides/uis/localized-data.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/guides/uis/localized-data.md b/guides/uis/localized-data.md index 0aba63fc45..c5292354e2 100644 --- a/guides/uis/localized-data.md +++ b/guides/uis/localized-data.md @@ -431,3 +431,18 @@ ID,locale,title,descr ... ``` ::: + +:::details Using SAP Fiori draft and SAP HANA ... +In this case the required technical primary key element `ID_texts` has to be added to the initial data as follows: + +::: code-group +```csv Books_texts.csv +ID_texts,ID,locale,title,descr +d2a65a27-9f2a-480f-bc38-84ee8ec5c13e,201,de,Sturmhöhe,Sturmhöhe (Originaltitel: Wuthering Heights) ist der einzige Roman... +8c42c706-a979-41cf-9ffe-91e6cf1383a0,201,fr,Les Hauts de Hurlevent,Les Hauts de Hurlevent (titre original : Wuthering Heights)... +9e1c4c81-dc90-4600-85b1-e9dd4bf12ce0,207,de,Jane Eyre,Jane Eyre. Eine Autobiographie (Originaltitel: Jane Eyre. An Autobiography)... +9be0524b-4cb9-4fc1-9dc2-d65b1c13cf53,252,de,Eleonora,Eleonora ist eine Erzählung von Edgar Allan Poe. Sie wurde 1841... +``` + +[Learn more about Enabling Draft for Localized Data.](./fiori#draft-for-localized-data){.learn-more} +::: \ No newline at end of file From fccb4349579820a3f4298ae0ed78d630e3d911f4 Mon Sep 17 00:00:00 2001 From: Christian Georgi Date: Fri, 26 Jun 2026 14:19:33 +0200 Subject: [PATCH 2/2] Cosmetics, more links --- guides/uis/fiori.md | 2 +- guides/uis/localized-data.md | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/guides/uis/fiori.md b/guides/uis/fiori.md index b19884ef22..b5c48471d2 100644 --- a/guides/uis/fiori.md +++ b/guides/uis/fiori.md @@ -487,6 +487,7 @@ annotate sap.capire.bookshop.Books with @fiori.draft.enabled; :::info Background SAP Fiori drafts require single keys of type `UUID`, which is not the case for [`.texts`](./localized-data#behind-the-scenes) entities, that are generated for localized data. The `@fiori.draft.enabled` annotation tells the compiler to add an additional technical primary key element named `ID_texts`. +[Learn how to add initial data for such draft-enabled localized entities.](localized-data#adding-initial-data){.learn-more} ::: ![An SAP Fiori UI showing how a book is edited in the bookshop sample and that the translations tab is used for non-standard languages.](draft-for-localized-data.png){style="margin:0"} @@ -494,7 +495,6 @@ SAP Fiori drafts require single keys of type `UUID`, which is not the case for [ [See it live in **capire/bookstore**.](https://github.com/capire/bookstore/blob/main/app/admin-books/fiori-service.cds#L78){.learn-more} - ## Fiori Tree Views Following the same principle of convenience as for Value Helps, CAP provides a shortcut annotation to define hierarchies on entities with recursive associations, which are then rendered as Tree Views in SAP Fiori clients. diff --git a/guides/uis/localized-data.md b/guides/uis/localized-data.md index c5292354e2..2b3750fb35 100644 --- a/guides/uis/localized-data.md +++ b/guides/uis/localized-data.md @@ -173,7 +173,7 @@ It isn't allowed to extend `sap.common.TextsAspect` with * localized elements * key elements -For entities that have an annotation `@fiori.draft.enabled`, the corresponding *.texts* +For entities that have an annotation [`@fiori.draft.enabled`](./fiori#draft-for-localized-data), the corresponding *.texts* entities also include the aspect, but the element `locale` isn't marked as a key and an element `key ID_texts : UUID` is added. @@ -432,11 +432,11 @@ ID,locale,title,descr ``` ::: -:::details Using SAP Fiori draft and SAP HANA ... -In this case the required technical primary key element `ID_texts` has to be added to the initial data as follows: +#### Add `ID_texts` for SAP Fiori Draft on SAP HANA +If you set `@fiori.draft.enabled`, you need to manually add the technical primary key `ID_texts` to the initial data as follows: ::: code-group -```csv Books_texts.csv +```csv{1} [Books_texts.csv] ID_texts,ID,locale,title,descr d2a65a27-9f2a-480f-bc38-84ee8ec5c13e,201,de,Sturmhöhe,Sturmhöhe (Originaltitel: Wuthering Heights) ist der einzige Roman... 8c42c706-a979-41cf-9ffe-91e6cf1383a0,201,fr,Les Hauts de Hurlevent,Les Hauts de Hurlevent (titre original : Wuthering Heights)... @@ -445,4 +445,3 @@ d2a65a27-9f2a-480f-bc38-84ee8ec5c13e,201,de,Sturmhöhe,Sturmhöhe (Originaltitel ``` [Learn more about Enabling Draft for Localized Data.](./fiori#draft-for-localized-data){.learn-more} -::: \ No newline at end of file