Skip to Content
0
Dec 09, 2020 at 08:58 AM

cap call OData Service generated by key-user-tools

43 Views

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