on 12-09-2020 8:58 AM
Hi guys,
With the app custom business object (which is part of the key user tools) I created an object and let a OData Service be generated. The OData Service is called 'TBUSINESSOBJECT_CDS'. I want to connect cap to the generated service, which is working for the complete dataset (i.e. for all entries in the database table) but it is not working for a single entry.
When checking the metadata (uri/.../TBUSINESSOBJECT_CDS/$metadata) they key is 'SAP_UUID'. Hence, I would assume that the url to a single entry ends with (uri.../TBUSINESSOBJECT_CDS/xJSSxTBUSINESSOBJECT(SAP_UUID=000...000)). Unfortunately from the service I see that a call to a single entry looks like the following (uri.../TBUSINESSOBJECT_CDS/xJSSxTBUSINESSOBJECT(guid'000...000')).
The problem is, that cap creates the url for the single entry with SAP_UUID (i.e. the second link above), which is correct in my opinion. However, I'm wondering why the generated OData Service wants to be called with 'guid' instead of 'SAP_UUID' for a single entry and is there a way to change it?
Also I'm wondering if there is a nice workaround for cap (e.g. to call the service manually with axios, if it is possible)?
P.S. I used the key user tools on an s/4hana on-premise system.
Cheers,
Thorsten
if there is only one key, you can omit the keys name, so xJSSxTBUSINESSOBJECT(value) would be perfectly valid
guid'...' is the syntax for specifying a guid => check odata-version-2-0/overview/, Chapter 6
so basically, it is the same as
xJSSxTBUSINESSOBJECT(SAP_GUID=guid'...')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.