cancel
Showing results for 
Search instead for 
Did you mean: 

How to create OData service on Hana Calculation View with input parameters (Hana SPS12)

former_member565459
Participant
0 Kudos
694

Hello,

I'm trying to create an xsodata service on Hana calculation view.

But I'm getting error below error:

{ "error": { "code": "", "message": { "lang": "en-US", "value": "Resource not found for the segment 'Results' at position 37."}}}

Below is my service code:

 service
{
    "test::CV_PH_ODATA_SERVICE" as "PhOdataservice" 
    keys generate local "ID" 
    parameters via entity "PhOdata_InputParams" results property "Execute"; 
}

And below is the url I'm using :

https://myhost:port//ALERTS/RRA_CAMPAIGN_MGR/ph_service.xsodata/PhOdata_InputParams(IP_STORE='2000')/Results?$format=json

Can any one help me with the same.
florian.pfeffer

TIA.

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor

You got the message

{ "error": { "code": "", "message": { "lang": "en-US", "value": "Resource not found for the segment 'Results' at position 37."}}}

but have defined that the navigation property for the results is called "Execute" (and not Results like you used in the URL above).

So your URL should be

https://myhost:port//ALERTS/RRA_CAMPAIGN_MGR/ph_service.xsodata/PhOdata_InputParams(IP_STORE='2000')/Execute?$format=json
former_member565459
Participant
0 Kudos

Thankyou for your reponse florian.pfeffer 🙂
As suggested I've changed the url.
But still getting an html issue.
Is this because my Calculation View and xsodata service don't reside at the same path?
Or am i missing on any files ?
PFA the attached screenshot.
TIA. capture1.png

pfefferf
Active Contributor

As I said alreay above, check your HANA logs to find out the reason for the internal server error. Without knowing the details of your calc. view implementation nothing more can be said.

former_member565459
Participant
0 Kudos
florian.pfeffer, one of my colleague could get the desired json output using the same url. But he accesses it through SYSTEM user.

Is there any kind of authorisation needed to call these urls?

If yes then could you please enlighten me about the same.

Answers (0)