2025 Jun 25 9:27 AM - edited 2025 Jun 25 9:28 AM
Hello,
I'm building an iFlow using oData adapters (v2) in integration suite. When trying to update (PUT) the record adapter returns error:
com.sap.it.rt.adapter.http.api.exception.HttpResponseException: An internal server error occured: Wrong literal format for literal: 'f5cc9649-59ab-1[...]'I tried to workaround this problem by:
GUID is defined as:
<Key>
<PropertyRef Name="GuID"/>
</Key>
<Property Name="GuID" Type="Edm.Guid" Nullable="false" sap:display-format="UpperCase" sap:label="UUID" sap:quickinfo="16-byte UID in 32 chars (hexadecimal)" sap:updatable="false"/>
And using it manually (postman) is possible and works. I found that CI produces incorrect requests (in batch), skiping 'guid' part in key definition. Example batch requests, looks like this:
PUT entityName(GuID='f5cc9649-59ab-1[...]') HTTP/1.1instead of (which would work):
PUT entityName(GuID=guid'f5cc9649-59ab-1[...]') HTTP/1.1So either key validation fails in adapter or (with batch) in backend. How to make it work? I tried sap.support and adapter's configuration but there's nothing about such problems.
Here's my payload I'm testing with:
<entitySetName>
<entityName>
<GuID>f5cc9649-59ab-1[...]</GuID>
<ProcessedAt>1990-01-26T06:40:03.02</ProcessedAt>
</entityName>
</entitySetName>
And adapter's config:
Request clarification before answering.
@DamianKolasa try passing the guid'f5cc9649-59ab-1[...]' literal to the /batchParts/batchChangeSet/batchChangeSetPart/uri of your batch OData request payload. I had a similar sort of a requirement where I had to pass the datetime'YYYY-MM-DDT00...' literal as an encoded URI component for a MERGE call. It worked for me.
You can also refer to Batch Operation in OData V2 Adapter in SAP Cloud P... - SAP Community @ariel_martinez3 comment on this blog where they have faced a similar issue that you are facing with the guid literal. As per their comments it seems like populating the uri component of the batch payload fixed the issue for them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Phos,
Thanks for a tip, but still it doesn't work. I think it may be sth wrong with odata itself (maybe GUID is not supported in adapters, as a key)...
Damian
Hi,
Could you use HTTP adapter instead of ODATA? I faced the similar issue a few years back and used HTTP adapter to mitigate the issue.
Regards,
Priyanka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 7 | |
| 7 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.