on 09-25-2017 11:09 AM
Hi Experts,
I'm developing a XSODATA service using HANA 1.0 SPS12.
This service exposes one principal CDS entity ('Project') and I need to create or update data entries for this entity from ABAP stack.
Typically, the entries should be created during the first call and updated during the following calls.
But the ABAP client is not aware of the right operation (CREATE/POST or UPDATE/PUT).
I have implemented first a XSJS service which receives only POST requests. This way, I was able to put the logic create/update on server side. Now, I would like to have the same behavior in XSODATA but I don't know how to achieve this.
I thought about calling a procedure during creation but is it really relevant for updating entries?
A kind of UPSERT statement for XSODATA and HANA 1.0 would be perfect...
What is recommended here?
Thank you,
Sophie
Hi Sophie
You can override the generic Odata POST/PUT/DELETE operations by using Odata modification exits that can be written in either XSJS/SQL Script. For the PUT operation, we will have to send a key i.e the ID to be updated. If it fits your usecase so that you can send in the ID and you are still ok to do an UPSERT, then you can do it via OData exits.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
67 | |
8 | |
7 | |
7 | |
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.