on 11-03-2022 8:40 PM
We want to create a RAP service and use it both with a Fiori Elements app and as a web api. The prerequisite is the use of OData V4, with which I am forced to turn on the DRAFT mode.
The Fiori App works so far and I can create/edit entries etc..
In addition, I have now created a new service binding as a web API and am trying to create a record using postman and POST.
Unfortunately the created record is only created in the draft table.
How do I get the record persisted now?
Or do I have to create new CDS-Views/Behavior Definitons without DRAFT?
Thanks 🙂
Hi Tobias,
Also found this blog on uri patterns that may be helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tobias,
you can check the requests sent by your application in the browser developer tools under network. When hitting "Save" on a draft instance a batch request is sent which contains the execution of two actions: Prepare and Activate. During the preparation determinations and validations of your BO are called if specified. If the preparation is executed successfully, the activation can be executed. This persists the data stored in your draft in the active database table.
For more details you can check the documentation.
Prepare:
https://help.sap.com/docs/BTP/923180ddb98240829d935862025004d6/8eb32c2936904f95acffaec95ab1edd5.html
Activate:
https://help.sap.com/docs/BTP/923180ddb98240829d935862025004d6/a53cb0362b4c499f8488b7ab7c70e387.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tobias,
My understanding of RAP framework and the Draft Lifecycle is that the draft actions as listed below would need to be implemented. The create operation is used create a new draft instance hence why you wouldn't see any data in the persistent table. Once a draft instance is compete, it has to be activated in order for the details to be persisted.
draft action Resume;
draft action Edit;
draft action Activate;
draft Discard;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
8 | |
8 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.