on 11-23-2023 11:40 AM
Hello dear SAP community!
I would like to create an action in my RAP model that creates a child entity with the keys plant, material number and workcenter for an existing root with the keys plant and material number. The work centre is specified by the user in a dialogue window. The action is located on the object page of the root node.
If I click on the action and enter a work centre, I do not encounter an error but end up with an empty object page. A table entry with the new child is also created, but as soon as I click on the entry in the table in the app, the message 'The requested data was not found' is displayed.
Below are the corresponding screenshots of the code. Thanks in advance 🥳
Hi Patrick, Very similar to your GIF but in my case , I need to create multiple child entities. I ended up using your initial suggestion of static factory action in main page. It worked well . But I am getting below error. I am using Odata V4 and this error seems to be intermittent. I see my header and child entities in mapped table after create by association fine. I am being navigated to the object page but only see key values of the header and nothing else.
I followed this while creating the child entities:
Can you tell what the issue might be. Thanks again for your time!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you define a static factory action for the child entity, you do not get the parent keys.
When you define a factory action for the child entity, you must select an existing entity as a reference.
When you define a factory action for the parent entity, you have the parent keys, but in a standard Fiori elements app, the action button is in the header area instead of next to the child table. If the table is not refreshed after executing the action try defining a side effect in the behavior definition.
Another approach could be to enable inline creation mode for the child table. The user can quickly create new entries where the parent keys are prefilled. It's faster than clicking on an action button.
Factory action on root level to create child entity:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
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.