on 2024 Mar 13 2:58 PM
I am implementing a RAP based List Report app in S/4HANA On-Premise 2022 and have the need to update a key field during a determination method.
The scenario is a simple Document Header table with multiple Items (child entities), and whenever an item is deleted I want to redetermine all the Item positions of the document to make sure they stay ordered (10, 20, etc.).
Example: If Item number 10 is deleted, Item 20 would become 10, Item 30 would become 20 and so on.
However the item position field is part of the primary key of the item table, and possibly that is preventing the EML MODIFY statement from working correctly. Is there a way to update a key field in this managed scenario?
I would like to avoid having a separate GUID type key, and also deleting the items and re-inserting them inside the same determination method doesn't seem to work either.
Thank you
Hi Hugo,
there is no way to update key fields, but what you can try is to change the layout of the key.
I would suggest you use UUID based key fields. And just use the position as a semantic key which is calculated by your determination and that is used for sorting in your UI.
Kind regards,
Andre
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
is there a way to update those on create determination in managed scenario?
I have the userid as a key field, but I would like to set it from the backend and not to pass if from the UI.
Regards,
Georgi
User | Count |
---|---|
66 | |
11 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.