on 02-01-2019 9:17 AM
Hi,
The generic handlers in the APM for SCP apparently support the draft concept: https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/00823f91779d4d42aa29a498e05...
However I can't find any ressource on how to use this feature. I just looked at the code of the cds npm modules and found out that I need to add the following annotation to enable drafts for an entity:
@odata.draft.enabled: true
I tried to add this annotation to enable drafts for a very simple Todo entity. With CDS 2.10 I get the following error when I try to access the service:
Service not available: TodoService.
Switching to CDS 3.0, things are a bit better and I can see that the framework created some new tables for draft support:
DRAFT_DRAFTADMINISTRATIVEDATA
TODOSERVICE_TODOS_DRAFTS
TODO_TODOS
However when I try to GET the data, I get the following error:
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code>CDSRuntimeException.INTERNAL_ERROR</code>
<message xml:lang="en-US">Internal Error Occured</message>
</error>
And I can see some exceptions in the logs and I don't really know what to do next:
"com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [257] (at 115): sql syntax error: CDS error: Sub artifact \"ISACTIVEENTITY\" not found in \"ROOT_ENTITY_ALIAS\": line 1 col 116 (at pos 115)"
Does anyone know how to enable draft support for APM for SCP?
Note: I'm using Java with the HANA Service (2.0 SPS 04) in the Web IDE Full-Stack.
Cheers,
Pierre
Hi Pierre,
We are working on OData v2 draft. It should be available by the middle of March.
Regards
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh,
Thanks for your answer. I tried to enable draft support for OData v4 with Node.js and it seems to work just fine. However as long as SAPUI5 and Fiori Elements don't fully support v4 it's not really useful so I'm eagerly waiting for v2 support.
Thanks,
Pierre
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Pierre, Christian,
Basic draft support for OData V2 and V4 is available since Service SDK Java version 1.28.
Can you please use the latest available version 1.32.0 and see if it helps.
Thanks,
Kranti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh,
is OData v2 draft now supported in SCP? I still run into the same error.
Kind regards
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.