on 2023 Jun 07 2:40 PM
Hello experts,
we are currently trying to create an managed application via RAP which involves a text table. The two tables are connected via association/composition and we guessed that the creation would be handled through the behavior definition and this statement:

We have two primary keys for the master data table and the description which should be inserted into the text table with the logon language.

When we enter a text and save the entry the application will only create the master data entry, not the text table entry. Now the question, is it possible to archive this in a managed scenario? Or do we have to use unmanaged approach for this?
Thanks and best regards!
Request clarification before answering.
Hello,
we kinda went the wrong way here, but now we managed to integrate the texts into this managed scenario.

We added the @ ObjectModel text element Annotation and referenced it to the description field.


Also we added the association for creation and switched to a draft-system (OData v4 requires drafts)

Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi christian.schinner ,
one possible solution would be to use the unmanaged save scenario:
[...]
define behavior for ZP4_I_PLANT_MAINT alias PlaintMaintenance with unmanaged save
[...]
In this scenario, you have the opportunity to effortlessly generate via quick fix a new method that allows you to store the texts within the text tables. Regrettably, I do not have visibility into your CDS data model, but it will be necessary for you to establish associations/joins between the text fields and the root model. This can be accomplished as follows:
[...]<br>define root view entity ZP4_I_PLANT_MAINT as select from <dtab> as dtab
left outer join <dtab_t> as _TextDE on _TextDE.ID = dtab.ID and _TextDE.spras = 'D'
left outer join <dtab_t> as _TextIT on _TextIT.ID = dtab.ID and _TextIT.spras = 'I'
left outer join <dtab_t> as _TextEN on _TextEN.ID = dtab.ID and _TextEN.spras = 'E'
[...]
_TextDE.text as TextDE,<br>_TextIT.text as TextIT,
_TextEN.text as TextENI hope that this guidance will prove beneficial to you.
Kind regards
Julian Danho
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Julian,
thank you for the answer! Sure, here are the snippets:
I-View for the header entity

-View for the description entity

Consumption view for the header entity

Consumption view for the description entity
Behavior definition header entity

Behavior definition description entity

EDIT: Updated the screenshots to reflect current reality.
Thanks and best regards!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
can you please show the snippet of your CDS and BDEF?
Kind regards
Julian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 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.