Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9159

ODATA Parameter Entity Sets

$
0
0

I am stuck trying to define navigation between an entity (a table) and a parameterized entity (a calculation view with input parameters) in the ODATA service definition.

 

The paragraph 7.1.6.8 "ODATA Parameter Entity Sets" of "SAP HANA Developer Guide" says:

 

To enable navigation between an entity and a parameterized entity, you must perform the following steps:

  1. Specify the parameters as part of the key of the target entity
  2. Define the association between the entities


Enabling navigation between an entity and a parameterized entity is only possible if the parameters are part of the entity-type key in the OData service definition file. To make the parameters part of the key of the target entity, use the via key syntax, as illustrated in the following example:

 

service {

      "sap.test::calcview" key ("theKeyColumns") parameters via key and entity;

}

 

You also have to define an association between the source and target entities, for example, with additional entries introduced by the via parameter keyword, as illustrated in the following example:

 

service {

     "sap.test::table" as "Tab" navigates ("avp" as "ViewNav");

     "sap.test::calcview" as "View" key ("theKeyColumns") parameters via key and entity;

     association via parameter "avp"

          principal "Tab"("paramValue") multiplicity "*"

          dependent "View"("parameter") multiplicity "*";

}

 

What I cannot figure out is how "theKeyColumns" should look in my case.

 

If, let's say, my calculation view is defined with 2 input parameters named PROJECT_ID and USER_ID, then should it become:

 

....

"sap.test::calcview" as "View" key ("PROJECT_ID", "USER_ID") parameters via key and entity;

....

 

?

 

When I try that, I am getting the following error:

 

 

HANA ODATA error.png

 

Obviously, I am missing something. But what?


Viewing all articles
Browse latest Browse all 9159

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>