cancel
Showing results for 
Search instead for 
Did you mean: 

ODATA service on HANA based on Calc. view with parameters.

Former Member
0 Kudos

Hi,

I have an issue with OData service declaration based on the view with input parameters.

Service declaration :

service  {

      "sizegrid::GROUP_SEARCH" as "Cartons"

      keys generate local "Box_HID"

      aggregates always

      parameters via entity "InputParams";

}


Calculation view GROUP_SEARCH has 2 input parameters :


After service has been activated, I can succesfully access $metadata and .xsodata links. However, if I try to pass inbound parameters, there is an error :

http://instance:8000/sizegrid/ztest/services/cartons.xsodata/InputParams(positive_selection_threshol...?


<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">

<code/>

<message xml:lang="en-US">Illegal query syntax.</message>

</error>

I've searched through all the blogs and discussions but still can't understand what is wrong with the syntax.

Can somebody help, please ?

Thanks !

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member182500
Contributor
0 Kudos

Your URL looks incorrect, it should be something like this:

/blah/blah/cartons.xsodata/InputParameters(P_PARM1='X', P_PARM2='Y')/Results

pfefferf
Active Contributor
0 Kudos

Hello Yuri,

which types do your parameters in the view have? I had the issue one time, because I passed a double value within quotes (e.g. '10.00') to a parameter of type double. Maybe the type of your parameter "ordered_boxes" is not a character based type.

At the end of the URL you have a '?'. This causes no issue, but if you wann get the results you should add "Results" which is the default name for the result navigation property.

Best Regards,

Florian

Vlado
Advisor
Advisor
0 Kudos

Moved to