on 2021 Dec 16 1:07 PM
Hello CAP Community,
I've created a service which is based on deep insert sample from sapmentors.
Draft capabilities has been enabled for a Fiori Element apps and it's working fine.
Since I also need to consume this CAP Endpoint from SAP Integration Suite, I would like to use a post with deep insert, but I got this error:
cannot insert NULL or update to NULL: DRAFTADMINISTRATIVEDATA_DRAFTUUID:
line 1 col 1 (at pos 0)",
"stacktrace":["Error: cannot insert NULL or update to NULL:
DRAFTADMINISTRATIVEDATA_DRAFTUUID: line 1 col 1 (at pos 0)",
"at Request.reject
(/home/vcap/app/node_modules/@sap/cds/lib/req/request.js:65:39)",
"at HanaDatabase.module.exports [as _CREATE]
(/home/vcap/app/node_modules/@sap/cds/libx/_runtime/db/generic/create.js:38:9)",
"at runMicrotasks (<anonymous>)",
"at processTicksAndRejections
(node:internal/process/task_queues:96:5)",
"at async next
(/home/vcap/app/node_modules/@sap/cds/lib/serve/Service-dispatch.js:74:17)",
"at async HanaDatabase.handle (/home/vcap/app/node_modules/@sap/cds/lib/serve/Service-dispatch.js:72:10)",
"at async Promise.all (index 1)",
"at async ApplicationService._handler (/home/vcap/app/node_modules/@sap/cds/libx/_runtime/fiori/generic/new.js:87:3)",
"at async next (/home/vcap/app/node_modules/@sap/cds/lib/serve/Service-dispatch.js:74:17)",
"at async ApplicationService.handle (/home/vcap/app/node_modules/@sap/cds/lib/serve/Service-dispatch.js:72:10)"],"message":"cannot insert NULL or update to NULL: DRAFTADMINISTRATIVEDATA_DRAFTUUID: line 1 col 1 (at pos 0)",
"code":287,"sqlState":"HY000",
"position":0,"query":"INSERT INTO WBService_items_drafts ( Product_Product, ProductDesign, Quantity, unit, ID, parent_ID ) VALUES ( ?, ?, ?, ?, ?, ?, ? )",
"values":["***"],"numericSeverity":4,"id":"1752958",
"#cf":{"string":[{"k":"query",
"v":"INSERT INTO WBService_items_drafts ( Product_Product, ProductDesign, Quantity, unit, ID, parent_ID ) VALUES ( ?, ?, ?, ?, ?, ?, ? )",
"i":0}]}}
Any idea on how I could fix this issue?
Request clarification before answering.
Hi, I'm getting a similar error. How did you resolve it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.