cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hello, getting Resource not found for segment ''. when we run sap/opu/odata/SAP/SRA004_SRV/Travels('2000000155').

For some reason, this GET_ENTITY call works fine in Fiori itself, but when testing the call from gateway client or browser we get that error or sometimes Resource not found for segment 'Travel'.

Tried clearing cache and loading metadata, but that didn't help.

sap/opu/odata/SAP/SRA004_SRV/Travels comes back 200, so it can see the resource.


This also happens in our Z extension of the project, and for any new GET_ENTITY we make in that project.


Any ideas?

0 Likes
View Entire Topic
dave_price
Participant

OK, it turned out to be something fairly obvious -- we were calling this as a Read (GET_ENTITY) when only Query (GET_ENTITYSET) was set up (this was not totally obvious, because none of this was implemented in SEGW, it's all custom methods).  Somehow I got the impression from the web side that the Travel app was calling a Read but now I'm pretty sure they are only doing the Query.  Apparently within these non-SEGW implementations, sometimes even the generic READ method to find the correct entity READ method doesn't get called, let alone the actual READ entity method in the DPC_EXT class.

So, at least I learned that the "resource not found" error can result from SAP looking for methods that are not implemented (as opposed to returning the "not implemented" error from within the method itself).

Leaving this here in case it helps someone else!